-
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
Add default configuration files for x.py
#76619
Comments
This will be annoying to implement by hand because of all the nested structs ... @Mark-Simulacrum do you mind if I use https://docs.rs/merge/0.1.0/merge/ or similar to implement it? |
Another use case: contributions to documentation. |
@est31 hmm, when writing this I lumped that together with 'contributors to the standard library' in my mind - do you expect the defaults to be different between them? I guess one difference is that writing docs would only run |
Good point, they fit into that category really well. |
…-Simulacrum Add sample defaults for config.toml - Allow including defaults in `src/bootstrap/defaults` using `profile = "..."`. - Add default config files, with a README noting they're experimental and asking you to open an issue if you run into trouble. The config files have comments explaining why the defaults are set. - Combine config files using the `merge` dependency. This introduces a new dependency on `merge` that hasn't yet been vetted. I want to improve the output when `include = "x"` isn't found: ``` thread 'main' panicked at 'fs::read_to_string(&file) failed with No such file or directory (os error 2) ("configuration file did not exist")', src/bootstrap/config.rs:522:28 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace failed to run: /home/joshua/rustc/build/bootstrap/debug/bootstrap test tidy Build completed unsuccessfully in 0:00:00 ``` However that seems like it could be fixed in a follow-up. Closes rust-lang#76619
…-Simulacrum Add sample defaults for config.toml - Allow including defaults in `src/bootstrap/defaults` using `profile = "..."`. - Add default config files, with a README noting they're experimental and asking you to open an issue if you run into trouble. The config files have comments explaining why the defaults are set. - Combine config files using the `merge` dependency. This introduces a new dependency on `merge` that hasn't yet been vetted. I want to improve the output when `include = "x"` isn't found: ``` thread 'main' panicked at 'fs::read_to_string(&file) failed with No such file or directory (os error 2) ("configuration file did not exist")', src/bootstrap/config.rs:522:28 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace failed to run: /home/joshua/rustc/build/bootstrap/debug/bootstrap test tidy Build completed unsuccessfully in 0:00:00 ``` However that seems like it could be fixed in a follow-up. Closes rust-lang#76619
…-Simulacrum Add sample defaults for config.toml - Allow including defaults in `src/bootstrap/defaults` using `profile = "..."`. - Add default config files, with a README noting they're experimental and asking you to open an issue if you run into trouble. The config files have comments explaining why the defaults are set. - Combine config files using the `merge` dependency. This introduces a new dependency on `merge` that hasn't yet been vetted. I want to improve the output when `include = "x"` isn't found: ``` thread 'main' panicked at 'fs::read_to_string(&file) failed with No such file or directory (os error 2) ("configuration file did not exist")', src/bootstrap/config.rs:522:28 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace failed to run: /home/joshua/rustc/build/bootstrap/debug/bootstrap test tidy Build completed unsuccessfully in 0:00:00 ``` However that seems like it could be fixed in a follow-up. Closes rust-lang#76619
Currently, the options are 'use the defaults' or 'read the 600 line
config.toml.example
. Even with recommended defaults from rustc-dev-guide, this is not really ideal for new contributors. As an alternative, there could be different config files for each type of user:To avoid these getting out of date, they could be included instead of copied:
include = "maintainer"
inconfig.toml
or something like that. This would also make it clear which changes are automatic and which were made by the user: the automatic changes are not in the same file.I'm imaging that the files live in
src/bootstrap/config.toml.maintainer
or similar.The text was updated successfully, but these errors were encountered: