Skip to content

Rollup of 8 pull requests #140012

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

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3fe0b3d
not lint break with label and unsafe block
mu001999 Feb 23, 2025
1c1febc
add new config option: `include`
onur-ozkan Apr 1, 2025
89e3bef
document config extensions
onur-ozkan Mar 25, 2025
4e80659
implement cyclic inclusion handling
onur-ozkan Apr 1, 2025
78cb453
document `include` in `bootstrap.example.toml`
onur-ozkan Apr 1, 2025
3f70f19
apply nit notes
onur-ozkan Apr 1, 2025
8e6f50b
fix path and the ordering logic
onur-ozkan Apr 15, 2025
7dfb457
add FIXME note in `TomlConfig::merge`
onur-ozkan Apr 15, 2025
22dddc6
Sort Unix env constants alphabetically by target_os
thaliaarchi Apr 15, 2025
6d52b51
add comment in `TomlConfig::merge` about the merge order
onur-ozkan Apr 15, 2025
91a0a59
Combine env consts into std::sys::env_consts
thaliaarchi Apr 15, 2025
cac458c
Handle unsupported fallback
thaliaarchi Apr 15, 2025
2024e26
Don't canonicalize crate paths
ChrisDenton Apr 15, 2025
52f35d0
Test for relative paths in crate path diagnostics
ChrisDenton Apr 15, 2025
8270478
resolve config include FIXME
onur-ozkan Apr 16, 2025
5a38550
Deduplicate nix code
RossSmyth Apr 3, 2025
d14df26
Make `parent` in `download_auto_job_metrics` optional
Kobzol Apr 16, 2025
111c15c
Extract function for normalizing path delimiters to `utils`
Kobzol Apr 16, 2025
c8a882b
Add command to `citool` for generating a test dashboard
Kobzol Apr 17, 2025
a326afd
Add buttons for expanding and collapsing all test suites
Kobzol Apr 17, 2025
4b31033
Add a note about how to find tests that haven't been executed anywhere.
Kobzol Apr 17, 2025
1a6e0d5
Render test revisions separately
Kobzol Apr 17, 2025
d2c1763
Create a macro for rendering test results
Kobzol Apr 17, 2025
aa9cb70
Print number of root tests and subdirectories
Kobzol Apr 17, 2025
08cb187
Turn `test_dashboard` into a file
Kobzol Apr 17, 2025
cecf167
Add a note about the test dashboard to the post-merge report
Kobzol Apr 17, 2025
136171c
skip llvm-config in autodiff check builds, when its unavailable
ZuseZ4 Apr 18, 2025
65ce38a
Add a note that explains the counts
Kobzol Apr 18, 2025
b18e373
Reduce duplicated test prefixes in nested subdirectories
Kobzol Apr 18, 2025
1b39302
Disable has_thread_local on i686-win7-windows-msvc
roblabla Apr 18, 2025
ac7d1be
add coverage on config include logic
onur-ozkan Apr 16, 2025
ad10d18
Rollup merge of #137454 - mu001999-contrib:fix-137414, r=wesleywiser
matthiaskrgr Apr 18, 2025
978aa0c
Rollup merge of #138934 - onur-ozkan:extended-config-profiles, r=Kobzol
matthiaskrgr Apr 18, 2025
686d407
Rollup merge of #139297 - RossSmyth:NixClean, r=WaffleLapkin
matthiaskrgr Apr 18, 2025
5b0e26b
Rollup merge of #139834 - ChrisDenton:spf, r=WaffleLapkin
matthiaskrgr Apr 18, 2025
c02d6d9
Rollup merge of #139868 - thaliaarchi:move-env-consts-pal, r=joboet
matthiaskrgr Apr 18, 2025
d134af9
Rollup merge of #139978 - Kobzol:ci-test-summary, r=jieyouxu
matthiaskrgr Apr 18, 2025
bdfd089
Rollup merge of #140000 - EnzymeAD:autodiff-check-builds, r=onur-ozkan
matthiaskrgr Apr 18, 2025
318226a
Rollup merge of #140007 - roblabla:fix-win7, r=ChrisDenton
matthiaskrgr Apr 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add new config option: include
Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Apr 15, 2025
commit 1c1febc59db038876d7fe78a1f056bf324fdff6a
25 changes: 24 additions & 1 deletion src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ pub(crate) struct TomlConfig {
target: Option<HashMap<String, TomlTarget>>,
dist: Option<Dist>,
profile: Option<String>,
include: Option<Vec<PathBuf>>,
}

/// This enum is used for deserializing change IDs from TOML, allowing both numeric values and the string `"ignore"`.
Expand Down Expand Up @@ -753,7 +754,7 @@ trait Merge {
impl Merge for TomlConfig {
fn merge(
&mut self,
TomlConfig { build, install, llvm, gcc, rust, dist, target, profile, change_id }: Self,
TomlConfig { build, install, llvm, gcc, rust, dist, target, profile, change_id, include }: Self,
replace: ReplaceOpt,
) {
fn do_merge<T: Merge>(x: &mut Option<T>, y: Option<T>, replace: ReplaceOpt) {
Expand All @@ -766,6 +767,17 @@ impl Merge for TomlConfig {
}
}

for include_path in include.clone().unwrap_or_default() {
let included_toml = Config::get_toml(&include_path).unwrap_or_else(|e| {
eprintln!(
"ERROR: Failed to parse default config profile at '{}': {e}",
include_path.display()
);
exit!(2);
});
self.merge(included_toml, ReplaceOpt::Override);
}

self.change_id.inner.merge(change_id.inner, replace);
self.profile.merge(profile, replace);

Expand Down Expand Up @@ -1600,6 +1612,17 @@ impl Config {
toml.merge(included_toml, ReplaceOpt::IgnoreDuplicate);
}

for include_path in toml.include.clone().unwrap_or_default() {
let included_toml = get_toml(&include_path).unwrap_or_else(|e| {
eprintln!(
"ERROR: Failed to parse default config profile at '{}': {e}",
include_path.display()
);
exit!(2);
});
toml.merge(included_toml, ReplaceOpt::Override);
}

let mut override_toml = TomlConfig::default();
for option in flags.set.iter() {
fn get_table(option: &str) -> Result<TomlConfig, toml::de::Error> {
Expand Down
5 changes: 5 additions & 0 deletions src/bootstrap/src/utils/change_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,4 +396,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
severity: ChangeSeverity::Info,
summary: "Added a new option `build.compiletest-use-stage0-libtest` to force `compiletest` to use the stage 0 libtest.",
},
ChangeInfo {
change_id: 138934,
severity: ChangeSeverity::Info,
summary: "Added new option `include` to create config extensions.",
},
];