-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Fallback to top-level config.toml if not present in current directory, and remove fallback for env vars and CLI flags #94592
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
☔ The latest upstream changes (presumably #94480) made this pull request unmergeable. Please resolve the merge conflicts. |
Speaking purely about desire end-state, loading order I think I would want:
I believe this PR is adding (4) to the list above, correct? The remaining delta from the list would then be the adjustment to relative path treatment in --config and RUST_BOOTSTRAP_CONFIG, which I am suggesting should be always relative to the current working directory, not falling back to the root (as is the case today, per #94589, if I follow correctly). Please feel free to tell me why I shouldn't want this. I did briefly look at what other tooling does -- it seems like for example Git will not try to look in $CWD at all for configuration (per man git-config). It does seem pretty useful to look in CWD by default, though, and I think probably makes sense for our purposes. |
That makes sense to me, yeah. I added the fallback behavior for I'll change this to remove the fallback for everything except the default path. |
fdaa1d6
to
9f7d321
Compare
This also preserves the behavior where x.py will only give a hard error on a missing config file if it was configured through `--config` or RUST_BOOTSTRAP_CONFIG. It also removes the top-level fallback for everything except the default path.
9f7d321
to
4d56f09
Compare
@rustbot ready |
r=me with PR description updated |
@rustbot ready (I no longer have bors permissions.) |
@bors r+ rollup |
📌 Commit 4d56f09 has been approved by |
Rollup of 5 pull requests Successful merges: - rust-lang#93283 (Fix for localized windows editions in testcase fn read_link() Issue#93211) - rust-lang#94592 (Fallback to top-level config.toml if not present in current directory, and remove fallback for env vars and CLI flags) - rust-lang#94776 (Optimize ascii::escape_default) - rust-lang#94840 (update `replace_bound_vars_with_placeholders` doc comment) - rust-lang#94842 (Remove unnecessary try_opt for operations that cannot fail) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This preserves the behavior where x.py will only give a hard error on a missing config file if it was configured through
--config
or RUST_BOOTSTRAP_CONFIG. It also removes the top-level fallback for everything except the default path; presumably if you're passing the path explicitly, you expect it to be exactly there and don't want to look in the root directory.Fixes #94589.