-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
cargo install --locked
is using dev-dependencies
#14937
Comments
Oh, interesting. As mentioned in gimli-rs/addr2line#337, if you download and run My guess as to what is happening is that the indirect dev-dependency on Stepping through the resolve code cargo/src/cargo/ops/resolve.rs Line 148 in addcc8c
ws.ignore_lock() is set to false , so we skip this
cargo/src/cargo/ops/resolve.rs Line 163 in addcc8c
require_optional_deps is set to false , so we skip this
So that means we then run cargo/src/cargo/ops/resolve.rs Lines 207 to 223 in addcc8c
Looking in my log, I see
which I believe means we got to cargo/src/cargo/ops/resolve.rs Line 697 in addcc8c
We got there by walking the entire previous resolve and filtering for things we should The definition of cargo/src/cargo/ops/resolve.rs Lines 667 to 671 in addcc8c
We'll not worry about that second definition of For our purposes, cargo/src/cargo/ops/resolve.rs Line 643 in addcc8c
It seems like we should avoid locking dev-dependencies but we have this preventing us from adding them to cargo/src/cargo/ops/resolve.rs Lines 613 to 616 in addcc8c
@Eh2406 any thoughts on what is going on here? |
Problem
I previously opened this issue in addr2line gimli-rs/addr2line#338 and I thought it was a simple matter of updating the lock file as attempted in gimli-rs/addr2line#337
However, @philipc pointed out that the dependency resolution failure was from a dev-dependency which surprised me.
I ran through
cargo tree
and I verifiedbacktrace-rs
is only in dev dependencies.Steps
Run
cargo install addr2line --locked
Possible Solution(s)
Unclear
Notes
I looked through open issues and it's not clear to me if this is a duplicate of any of these:
Cargo.toml
requirement #14916cargo install --locked
is not really locked #9289Version
The text was updated successfully, but these errors were encountered: