-
Notifications
You must be signed in to change notification settings - Fork 918
Use recent lock file when checking API files #5028
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
Conversation
|
Should we also remove the We should at least warn the user before clobbering their lockfile. I would prefer we be non-destructive and just bail out if the wrong lockfile is loaded. Or we could use |
Yeah I actually played around with being non-destructive, if that is you gut reaction also then we should definitely do so. I'll re-spin.
I like that. |
fc4ad4d to
992a151
Compare
Cargo.lock.tmp
Outdated
|
|
||
|
|
||
|
|
||
| intended for manual editing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In 992a151:
👀
(This entire tempfile should be deleted, but it's funny that you clearly manually edited the "do not manually edit this" line in a way that corrupted the TOML)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah heck, how'd that get in there. I just munged it during testing to make sure my Cargo.lock wasn't being overwritten. No clue how I managed to commit the tmp file. I gotta run jj st more often ...
Recently we added `--locked` to all the `cargo` invocations in the script to check API text files. But if one has an updated lock file (newer than recent) then this achieves nothing. I.e., if one has run `cargo` _without_ `--locked` then the local lock file will have deps that are too new (*cough* serde I'm looking at you). Copy the recent lock file into place when the script is run locally but preserve the lock file state once the script is finished running.
992a151 to
e8c42a7
Compare
|
Curious why you use this tmpfile solution instead of |
|
hmm, not sure what is going on with me at the moment. I keep getting some sort of tunnel vision on what needs doing while reading review suggestions then doggedly following that path, ignoring/forgetting later and better review suggestions. Here I even acknowledged that I liked the Thanks for being so gentle with you reminder, I appreciated it. |
lolz, after all that I think you owe me a whiskey for this one: rust-lang/cargo#14421 |
|
Gah! It's there but only in nightly. So stupid. |
|
I'm gonna go ahead and merge this for the sake of fixing our CI -- but we'll have to decide what to do the next time we get somebody with an API CI failure but their local |
apoelstra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK e8c42a7; successfully ran local tests
|
More lolz, I didn't realize it was there in cargo +nightly update -Z unstable-options --lockfile-path Cargo-recent.lock
error: the lockfile-path must be a path to a Cargo.lock file (please rename your lock file to Cargo.lock)Face palm. |
|
Lol, wtf. |
Recently we added
--lockedto all thecargoinvocations in the script to check API text files. But if one has an updated lock file (newer than recent) then this achieves nothing. I.e., if one has runcargowithout--lockedthen the local lock file will have deps that are too new (cough serde I'm looking at you).Copy the recent lock file into place when the script is run locally but preserve the lock file state once the script is finished running.