Skip to content

Conversation

@weihanglo
Copy link
Member

What does this PR try to resolve?

Fixes #15510

  • When both CLI and config present, favor config
  • Plan to remove --lockfile-path in 1.95.0-nightly (if this gets into 1.94.0-nightly)

Part of #14421

How to test and review this PR?

@rustbot
Copy link
Collaborator

rustbot commented Jan 15, 2026

r? @epage

rustbot has assigned @epage.
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

@rustbot rustbot added A-cli Area: Command-line interface, option parsing, etc. A-cli-help Area: built-in command-line help A-configuration Area: cargo config files and env vars A-documenting-cargo-itself Area: Cargo's documentation A-unstable Area: nightly unstable support A-workspaces Area: workspaces S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 15, 2026
}

#[cargo_test]
fn config_lockfile_path() {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: for cases like this, I'd make the tests use the flag and have the feature commit switch to config

(likely not worth it at this point)

Copy link
Member Author

Choose a reason for hiding this comment

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

Did it in the other way then found I misunderstood your suggestion 😅.

Copy link
Contributor

Choose a reason for hiding this comment

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

I meant --lockfile-path then switch to the config so that we can show that the behavior remains the same independent of the mechanism.

Like I said, likely not worth it atm

@epage
Copy link
Contributor

epage commented Jan 15, 2026

Thanks!

@epage epage added this pull request to the merge queue Jan 15, 2026
Merged via the queue into rust-lang:master with commit 85eff7c Jan 15, 2026
29 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 15, 2026
@weihanglo weihanglo deleted the lockfile branch January 15, 2026 16:57
rust-bors bot pushed a commit to rust-lang/rust that referenced this pull request Jan 16, 2026
Update cargo submodule

15 commits in 8c133afcd5e0d69932fe11f5907683723f8d361d..85eff7c80277b57f78b11e28d14154ab12fcf643
2026-01-09 03:50:15 +0000 to 2026-01-15 16:18:08 +0000
- fix(lockfile): switch to `resolver.lockfile-path` config (rust-lang/cargo#16510)
- Moved build-script bins to `deps` directory (rust-lang/cargo#16515)
- Invalidate the whole build cache when `-Zno-embed-metadata` changes (rust-lang/cargo#16513)
- Do not create examples dir in build dir with new layout (rust-lang/cargo#16514)
- fix(git): avoid partial oid got zero padded (rust-lang/cargo#16511)
- Optimize cargo locate-project --workspace (rust-lang/cargo#16423)
- chore: Update typos (rust-lang/cargo#16507)
- refactor(git): remove unnecessary serialization (rust-lang/cargo#16505)
- fix(build-std): std link metadata propagate to user (rust-lang/cargo#16496)
- Improve error message for missing dependencies (rust-lang/cargo#16500)
- fix: preserve `dep_name` for build script metadata  (rust-lang/cargo#16494)
- refactor(toml): clarify `to_dependency` for config patch (rust-lang/cargo#16492)
- Add `--id` flag to `cargo report timings` and `cargo report rebuilds` (rust-lang/cargo#16490)
- Display lockfile path in very verbose mode when blocking (rust-lang/cargo#16491)
- fix(info): resolve underscore vs hyphen mismatch in schema lookup (rust-lang/cargo#16455)

r? ghost
@rustbot rustbot added this to the 1.94.0 milestone Jan 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area: Command-line interface, option parsing, etc. A-cli-help Area: built-in command-line help A-configuration Area: cargo config files and env vars A-documenting-cargo-itself Area: Cargo's documentation A-unstable Area: nightly unstable support A-workspaces Area: workspaces

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow to set lockfile-path via an environment variable

3 participants