Skip to content
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

Avoid unnecessary synchronization in {force,deref}_mut #231

Merged
merged 4 commits into from
May 29, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 15 additions & 1 deletion xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,21 @@ fn main() -> xshell::Result<()> {
let _s = section("TEST_MSRV");
let _e = push_toolchain(&sh, MSRV)?;
sh.copy_file("Cargo.lock.msrv", "Cargo.lock")?;
cmd!(sh, "cargo build").run()?;
if let err @ Err(_) = cmd!(sh, "cargo update -w -v --locked").run() {
// `Cargo.lock.msrv` is out of date! Probably from having bumped our own version number.
println! {"\
Error: `Cargo.lock.msrv` is out of date. \
Please run:\n \
(cp Cargo.lock{{.msrv,}} && cargo +{MSRV} update -w -v && cp Cargo.lock{{.msrv,}})\n\
\n\
Alternatively, `git apply` the `.patch` below:\
"}
cmd!(sh, "cargo update -q -w").quiet().run()?;
sh.copy_file("Cargo.lock", "Cargo.lock.msrv")?;
cmd!(sh, "git --no-pager diff --color=always -- Cargo.lock.msrv").quiet().run()?;
return err;
}
cmd!(sh, "cargo build --locked").run()?;
Comment on lines +51 to +65
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preview:

Screenshot 2023-05-28 at 22 07 17

}

{
Expand Down