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

Add flag to ignore all parent directory configs #7621

Open
stevenroose opened this issue Nov 22, 2019 · 2 comments
Open

Add flag to ignore all parent directory configs #7621

stevenroose opened this issue Nov 22, 2019 · 2 comments
Labels
A-configuration Area: cargo config files and env vars C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.

Comments

@stevenroose
Copy link

Describe the problem you are trying to solve
Cargo often behaves very unexpectedly and often the cause of this is .cargo/config files or Cargo.toml workspace definitions in one of the parent directories. One example of an issue that could have been workaround with this feature is #7620.

Describe the solution you'd like
A flag --no-parent or something along those lines that makes cargo totally independent from configurations set in parent directories.

@stevenroose stevenroose added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Nov 22, 2019
@ehuss ehuss added the A-configuration Area: cargo config files and env vars label Dec 3, 2019
@epage
Copy link
Contributor

epage commented Nov 3, 2023

In some tools, I've seen them have an --isolated flag that causes it to not implicitly load any config, leaving it only to the --config flag / env variables.

@lure23
Copy link

lure23 commented Jul 15, 2024

Yes, please.

As a newcomer to Rust and Cargo, I am surprised there is not this option. Causes me to rearrange project folders, to avoid a parent relationship (makes the main project a "sister"). The particular "culprit" here is also Embassy - or maybe it's just the way it's used here -, which uses .cargo/config.toml for things that aren't strictly environment related but project level.

While there are efforts underway to move such things to normal Cargo.toml, I haven't found a way to move that link-arg=-Tdefmt.x line. It would certainly help to be able to cut the cord with a parent folder.

@epage epage added the S-triage Status: This issue is waiting on initial triage. label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-configuration Area: cargo config files and env vars C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

4 participants