Skip to content

Always take a shared lock on .cargo-lock#16886

Merged
epage merged 1 commit intorust-lang:masterfrom
ranger-ross:seperate-locks
Apr 14, 2026
Merged

Always take a shared lock on .cargo-lock#16886
epage merged 1 commit intorust-lang:masterfrom
ranger-ross:seperate-locks

Conversation

@ranger-ross
Copy link
Copy Markdown
Member

What does this PR try to resolve?

This PR changes the behavior to always take a shared lock on .cargo-lock to ensure backwards compatibility with older versions of cargo that do not lock .cargo-build-lock.

To allow cargo check and cargo build to continue running concurrently .cargo-artifact-lock was added with the original behavior of .cargo-lock.

We may be able to revert this change after the new build-dir layout is stablized. (#16807)

closes: #16853

How to test and review this PR?

See the test changes

This commit changes the behavior to always take a shared lock on
`.cargo-lock` to ensure backwards compatiblity with older versions of
cargo that do not lock `.cargo-build-lock`.

To allow `cargo check` and `cargo build` to continue running concurrently
`.cargo-artifact-lock` was added with the original behavior of `.cargo-lock`.
@rustbot rustbot added A-layout Area: target output directory layout, naming, and organization S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 14, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 14, 2026

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ehuss, @epage, @weihanglo
  • @ehuss, @epage, @weihanglo expanded to ehuss, epage, weihanglo
  • Random selection from ehuss, epage, weihanglo

@epage epage enabled auto-merge April 14, 2026 16:26
@epage
Copy link
Copy Markdown
Contributor

epage commented Apr 14, 2026

Once this is merged, can you do a beta backport? Look to past PRs to see the general structure.

@epage epage added this pull request to the merge queue Apr 14, 2026
@weihanglo weihanglo added the beta-nominated Nominated to backport to the beta branch. label Apr 14, 2026
Merged via the queue into rust-lang:master with commit 17b41ae Apr 14, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 14, 2026
epage added a commit that referenced this pull request Apr 15, 2026
Beta backports

* #16886

To resolve a regression locking compatibility with older versions (see:
#16853)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-layout Area: target output directory layout, naming, and organization beta-nominated Nominated to backport to the beta branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apparent race condition between different versions of Cargo

5 participants