feat(config): Stabilize resolver.lockfile-path config#16694
feat(config): Stabilize resolver.lockfile-path config#16694weihanglo merged 1 commit intorust-lang:masterfrom
resolver.lockfile-path config#16694Conversation
|
r? @ehuss rustbot has assigned @ehuss. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
@rfcbot fcp merge cargo |
|
Team member @epage has proposed to merge this. The next step is review by the rest of the tagged team members: Concerns:
Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
|
@rfcbot fcp concern install
Should we remove install support or have this inconsistent? |
In which cases would we need to specify the lockfile path and install binaries? This configuration is primarily for using read-only source directories. I couldn't wrap my head around coming up with a use case for it. |
This comment has been minimized.
This comment has been minimized.
Just remind that we also have an inconsistency of install not respecting |
|
Do we think the support of unsetting the lockfile path a blocker? Currently there is no way to do that. And without that, it is hard for people to unset if a global |
|
I'm not quite clear which inconsistency we're talking about.
Also, is there a more detailed description of this feature? Overall I'd like to see a more detailed stabilization report. For example, it seems to reserve |
This comment has been minimized.
This comment has been minimized.
Is this now resolved with I would also add that there is little reason to set this globally. This is more intended for local config, env variables, and CLI. |
|
@ehuss I expanded the PR description |
|
Thanks for helping resolve that! @rust-rfcbot reviewed |
This comment has been minimized.
This comment has been minimized.
|
🔔 This is now entering its final comment period, as per the review above. 🔔 |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
The final comment period, with a disposition to merge, as per the review above, is now complete. As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed. |
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Thanks! |
View all comments
What does this PR try to resolve?
Closes #14421
Overall, this seems like a low policy knob for users to tweak in config (ie out of the way) so this seems relatively safe to stabilize.
resolver.lockfile-pathis a mechanism to override the default location for lockfiles for local developmentCargo.lock{and}are reserved to keep this a two-way door--lockedworks'resolver.incompatible-rust-version,resolver.lockfile-pathdoes not apply tocargo install.cargos parent directory if.cargo/config.tomlis used and the current working directory for env variables and CLI.This started out as a principled workaround to no or outdated lockfiles on read-only filesystems. This could also help with users who juggle multiple lockfiles (e.g. "latest" vs "msrv") particularly when they can have dedicated config files for the different lockfiles and override other relevant resolver settings in the same config file.
Alternatives
--lockfile-path: which this feature started its life as, see RFE: add option to specify path to Cargo.lock #5707lockfile-pathvia an environment variable #15510 has a use case for this also to be done via an env variable (pain on user to always specify the flag)--out-dirjustified or can we find another way of accomplishing it? #6100)cargo install --lockfile-path fooimply--locked?"See also
lockfile-pathvia an environment variable #15510 (comment)Unresolved questions from the tracking issue:
cargo installno longer respectsresolver.lockfile-pathso we remain consistent on[resolver]never applying tocargo install.This was from when the we had
--lockfile-pathinstead which added its own set of policy questions.By having this be a config that just overrides the default, all other policies should remain the same.
How to test and review this PR?