-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Development on Windows #368
Comments
stefan-k
pushed a commit
that referenced
this issue
Jan 14, 2024
Due to the additivity requirement on cargo features even for features that are not enabled simultaneously, together with the requirement that only one crate in the dependency tree specifies any `links` attribute, it was not possible to test multiple backend versions for ndarray-linalg by features: #368 (comment) Previously this approach worked for different versions of ndarray-linalg insofar as the used backend `netlib` just coincidentally remained the same for all tested ndarray-linalg versions. This is not the case for the intel-mkl backend, which is desirable to use as the default because it works on all three major platforms. To enable the change of the backend as well as make the testing more robust against future changes in ndarray-linalg backend versions, the tests were factored out into their own crates. This works because the strict additivity requirement for inactive features is not enforced for dependencies: rust-lang/cargo#5969 (comment)
I'm very happy that argmin now supports development on windows! Thanks yet again for the amazing effort and the patience. Am I missing something or can this be closed? |
Yes, this issue is resolved now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue is intended as documentation for the blockers of development on Windows.
The Problem
intel-mkl
results in link errors during dependency resolution. This is because multiple features to select different versions of ndarray-linalg are available for testing purposes in argmin-math. However, different versions of ndarray-linalg with the intel-mkl feature would link against different versions of intel-mkl-src, each with the samelinks
tag in their Cargo.toml. Since each test configuration only ever depends on one version of each dependency, this wouldn't be a problem if it weren't for this issue resulting from the additivity requirement on features, even if they are not active. This is not an issue for the netlib-src sub-dependency right now since it hasn't been updated in between different versions of the tested dependencies. As such, all tested versions of the dependencies resolve their netlib-src version to the exact same version, which then does not result in multiplelinks
tags with the same value in the Cargo.lock file.Possible solutions/workarounds
Since I lost much more time than anticipated in this rabbit hole after I got asked if I wanted to do a PR, I at least wanted to document what I found out. I want to emphasize that I absolutely did not feel pressured to spend this time, @stefan-k has been very forthcoming and respectful in all interactions. For me, it was quite non-obvious why I got
links
resolver errors when I just changed the dev features from one backend to the other with references to features I had disabled. Apparently,cargo tree
also doesn't work on this "broken" dependency tree.The text was updated successfully, but these errors were encountered: