-
Notifications
You must be signed in to change notification settings - Fork 2.6k
cargo generate-lockfile shouldn't silently update an existing one #4269
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
Comments
I think we basically just need to remove the |
With backwardss compatibility on this, is there something worth doing? My main workaround for this is |
I would love to see this happen; if backwards compatibility is an obstacle the second-best thing IMO would be to add a commandline flag to make it do I have encountered this limitation several times:
I also wonder if this is just the place that users are likely to look for this functionality: it may be a user-experience bug to give users a tool called "generate-lockfile" that can't do the lockfile generation step that every other cargo command does implicitly. I am not familiar with |
Independent of this specific situation, what I consider with flags are
Semantically, this feels weird to call
This would be a little different: if there is a parse error, throw out the entire lockfile. If we don't throw away the lockfile otherwise, I wonder if this would be surprising. |
I didn't mean that I was exposing the conflicted If this were lightweight enough, I could even run |
I do a lot of weird things :) I mentioned this one out of completeness, not because I think it's common enough to get first-class support. But it was the one I was working on today, and while trying to remember whether there was a way to do "lightweight lockfile resync" I rediscovered this issue. |
It should probably act like
cargo build
does, where it generates a new lockfile if one doesn't exist, and and performs minimal updates to account for changes if one does.The text was updated successfully, but these errors were encountered: