-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
x setup generates config.toml into root even when run outside of root. #103697
Comments
This happens because of a weird combination of features:
I think 3 is the bug. The fix is to turn that from Note that currently we determine this by checking rust/src/bootstrap/bin/main.rs Lines 36 to 38 in 452cf4f
I think that's a mistake, since it's easy to forget the check; after changing to use an Option, that check should be config.is_none() instead.
|
This seems like an easy first issue (@jyn514 has all but fixed the issue already). May I be assigned to this one? |
@ted-tanner go for it :) |
@jyn514, these lines seem to indicate to me that Lines 922 to 924 in 452cf4f
These lines appeared in commit 4d56f09, with the following commit message: "Fallback to top-level config.toml if not present in current directory." By "top-level config.toml," the commit message probably means @pnkfelix suggested simply displaying a message saying that |
@ted-tanner it's intentional that we load the config.toml from there. but if it's not present at that path, it's not intentional that we create a config.toml there. (I'm the author of the commit you linked.) |
@jyn514 Thanks for the clarification! |
Place config.toml in current working directory if config not found Fixes an issue where bootsrapping a Rust build would place `config.toml` in `{src_root}` rather than the current working directory rust-lang#103697
Place config.toml in current working directory if config not found Fixes an issue where bootsrapping a Rust build would place `config.toml` in `{src_root}` rather than the current working directory rust-lang#103697
Place config.toml in current working directory if config not found Fixes an issue where bootsrapping a Rust build would place `config.toml` in `{src_root}` rather than the current working directory rust-lang#103697
Place config.toml in current working directory if config not found Fixes an issue where bootsrapping a Rust build would place `config.toml` in `{src_root}` rather than the current working directory rust-lang#103697
@pnkfelix I believe that this can now be closed, the linked pr was merged. |
One of our supported use cases is for when people want to put their build tree somewhere other than the root of the rust checkout.
I tried this code:
I expected to see this happen: A
config.toml
generated in the local directory that reflects the profile I selected.Instead, this happened:
x.py setup
generated a config.toml into the root of the rust.git checkout. As a user, I have no indication that I can locally copy that config.toml into my current working directory in order to impose settings that are local to this build in this working directory.(also, it was a little surprising to me, though understandable, that I was able to subsequently do a build in this local directory, even though the config.toml was sitting in the root of the source tree instead. We may want to issue a note at the beginning of the
x.py
output when it does that, i.e. something saying "local config.toml not found; using instead confg file found at ")((i mistakenly thought that the situation was worse in that the script would even overwrite pre-existing config.toml files, but I no longer believe that to be the case; I have now seen useful errors when you try to setup a new config file but one already exists at the target location.))
The text was updated successfully, but these errors were encountered: