-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 an unstable --no-config
flag and an equivalent environment variable
#8757
Conversation
This flag allows to ignore the contents of `.cargo/config` files.
(rust_highfive has picked a reviewer for you, use r? to override) |
Sorry for the delay in responding here! We talked about this at a Cargo meeting awhile back and I was bad and am only just getting around now to typing up a reply here. As I recall it, we were unfortunately still fairly lukewarm on merging this. The main reason, I believe is that we are hesitant to merge unstable features which don't have a clear path to stability. None of us were too thrilled about this feature as-is and we didn't think that it was likely to be stabilized. I believe we had some more nuanced discussion about the problem that you're having specifically, but unfortunately I took long enough to reply here that I've forgotten what our conclusions were in that arena. I know that this isn't really a great reply in that you're still stuck and Cargo still isn't working as you'd like, and I'm sorry about that :( |
@alexcrichton No worries! Delays happen and I also understand your hesitation on this. However, I would still like to move forward on this issue in some way, since this unfortunately blocks the next iteration of https://os.phil-opp.com/. Perhaps it makes sense to reiterate my problem in a minimal way, maybe you or someone else has a better idea how to solve it: Current StateThe project is always compiled for a custom target using the [unstable]
build-std = ["core", "alloc"]
[build]
target = "x86_64-blog_os.json"
[target.'cfg(target_os = "none")']
runner = "bootimage runner" This all works fine and allows us to run and test our kernel in QEMU using New DesignFor the new version, I want to replace the [target.'cfg(target_os = "none")']
runner = "cargo run --package qemu_runner --bin qemu_runner" This is similar to the The ProblemSince the Unfortunately, there seems to be no way to fix this problem currently. There are no command line arguments for bringing back the Please let me know if you have any ideas how to solve this problem (with or without modifying cargo). I would be happy to do the implementation work if we find a reasonable solution. |
Ok the past two weeks also haven't disappointed in terms of whirlwinds of events... In any case I feel like the best solution for your use case is to support the But the general idea is that Does that make sense? Or am I perhaps saying something that's already been suggested and pursued... |
Thank you for your thoughts on this. After thinking about this a bit more over the past two weeks, I came to the same conclusion that replicating the setting in It's great to hear that you (and Josh) are generally in favor of moving some more settings to |
I just happened to notice the zulip discussion on this. I recently lamented the lack of |
This provides a way to ignore configuration values set in
.cargo/config
files.This PR implements both an unstable command line flag named
--no-config
and aCARGO_NO_CONFIG_UNSTABLE
environment variable for this, which can be set to "1". Note that the environment variable does not have a feature gate yet since I wasn't sure how to make an environment variable unstable (hence the theUNSTABLE
suffix).Discussed in https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Opt-out.20for.20config.20file.20values/near/212360029