-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Cargo config option to default to locked/frozen #8207
Copy link
Copy link
Open
Labels
A-configurationArea: cargo config files and env varsArea: cargo config files and env varsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Description
Metadata
Metadata
Assignees
Labels
A-configurationArea: cargo config files and env varsArea: cargo config files and env varsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-designStatus: Needs someone to work further on the design for the feature or fix. NOT YET accepted.Status: Needs someone to work further on the design for the feature or fix. NOT YET accepted.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Describe the problem you are trying to solve
I would like to be able to specify in a workspace's cargo config that by default running commands such as
cargo buildimply the--locked/--frozenoption so that users/build machines don't accidentally update Cargo.lock or rely on the network. To go along with this, cargo would need to support--unlocked/--unfrozenswitches orcargo vendorwould need to ignore--locked/--frozen.Describe the solution you'd like
Somewhere in
.cargo/configI am able to specify default switches for cargo invocations and cargo has command line options to unset binary switches that may be defaulted on.Notes
The intent here is to ensure that dependencies are only explicitly and deliberately updated, instead of accidentally happening if someone happens to invoke cargo incorrectly (or a tool like
rust-analyzerdoes).