-
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 --path" ignores lockfile #6983
Comments
You can tell it to use the lock file with This was intentionally changed in #6840 so that |
I guess it's a tough call whether to be consistent with |
I agree, and I'm on the fence on this change. And now I'm questioning whether or not ignoring lock files really makes sense at all. 😖 |
Hm, but there must also be something else going on... I am working on miri with this lockfile. After doing
(a) why does it update the index when it is using the lockfile, and (b) why is it rebuilding anything? |
(a) It updates the index because it is checking for yanked dependencies (it will issue a warning if any are found). vergen → chrono → num-traits (NO DEFAULT FEATURES) whereas with a regular build, dev-dependencies are included in the calculus, and: colored → winconsole → cgmath → num-traits 0.1.43 → num-traits 0.2.8 (WITH DEFAULT FEATURES, which is and due to feature unification, num-traits is built once with the Should probably document somewhere that |
Thanks! That makes sense. How can I find out the offending crate chain / feature when this happens again?^^ So is there a way that I can avoid having to rebuild anything when I do either of I guess a hacky solution would be to just move all dev-dependencies to "full" dependencies. |
Btw, even if the current behavior stays, the documentation of the
Says nothing about "without this the lock file is ignored". (To be fair, I didn't check the |
Understanding how features resolve is difficult. The process I used above:
Although not really relevant, it is also complicated by It would probably be best to have something like
As for the documentation, we are planning to stabilize the "publish lockfile" feature very soon, and as part of that I was planning on updating the documentation. I didn't really expect anyone to notice this change. 😝 |
But then when I do
I know that feeling. ;) |
I believe it will be rebuilt. You could add a direct dependency to This is generally a difficult problem, and I haven't really come to a conclusion on how it should work. It could build |
We discussed this in the team meeting, and I think everyone feels like keeping |
Problem
In a project with a local lockfile,
cargo install --path .
seems to ignore that lockfile.Steps
cargo install --path .
This will use the latest version of the dependency even though the lockfile says otherwise.
Possible Solution(s)
I suggest that
cargo install --path .
should respect the lockfile in that directory.Notes
Output of
cargo version
:cargo 1.36.0-nightly (c4fcfb7 2019-05-15)
The text was updated successfully, but these errors were encountered: