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
Add a script for updating lock files #2012
Add a script for updating lock files #2012
Conversation
Can you
|
All NixOS users say: thank you.
BTW. If you drop these scripts in a |
Sweet, thanks lads. Will re-spin |
Oh |
e98f8ca
to
55f15fa
Compare
I've used the shebang line for you nix blokes and used |
The shebang line is |
Jeez, it is hard to get good help. |
55f15fa
to
e31aa44
Compare
Rebased on master (since there were no acks) and used the correct shebang. |
contrib/update-lock-files.sh
Outdated
|
||
for file in Cargo-minimal.lock Cargo-recent.lock; do | ||
cp --force "$file" Cargo.lock | ||
cargo check --color=always --workspace --all-features --all-targets |
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.
I think we need cargo check --tests
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.
I think we get that with --all-targets
(includes examples, benches, and tests).
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.
If the goal is just to update the lockfile do we actually need any of these flags?
I'm fine to keep them but in practice I always ctrl-C the cargo check
invocation as soon as I see any output, because at that point it's already updated the lockfile.
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.
Ha, we definitely don't need --color-always
, I also ctrl-C soon as it starts scrolling past. (I just blindly cut n paste my shell alias when I wrote this.)
It feels like there should be some kind of documentation update or at least expand the comment in this file to explain what it means to "update dependencies is explicitly " and when to use this script. |
You would use this script when you'd otherwise run these commands manually. |
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 e31aa44
@yancyribbens basically you would run this script if you ever edit Cargo.toml. It would probably be good to add a comment to Cargo.toml about this actually.. |
e31aa44
to
1297089
Compare
Removed |
FWIW I'm pretty sure none of |
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 1297089
So obvious once I read it :( Plain old |
Every time one of the dependencies is explicitly changed we have to update the minimal/recent lock files. Add a script to do so.
1297089
to
8b84227
Compare
Lol, I'm not sure I'd say it's "obvious" -- I mostly know this from reading the cargo source code around lockfiles. |
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 8b84227
Oh I thought it was obvious because we just discussed Ctl-c'ing the |
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 8b84227
lgtm |
Every time one of the dependencies is explicitly changed we have to update the minimal/recent lock files. Add a script to do so.