Skip to content

bootstrap: Rename profile = user to profile = dist #112078

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 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
31 changes: 30 additions & 1 deletion src/bootstrap/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,35 @@ impl Config {
include_path.push("bootstrap");
include_path.push("defaults");
include_path.push(format!("config.{}.toml", include));


// Check if an alias TOML file exists
let alias_path = format!("config.{}.alias.toml", include);
let alias_toml = get_toml(&alias_path);

// Check if the "dist" or "user" alias TOML files exist
let dist_alias_path = format!("config.dist.alias.toml");
let dist_alias_toml = get_toml(&dist_alias_path);

let user_alias_path = format!("config.user.alias.toml");
let user_alias_toml = get_toml(&user_alias_path);

// Merge the alias TOML if it exists, or the "dist" or "user" alias TOML
if alias_toml.is_some() {
toml.merge(alias_toml.unwrap());
} else if dist_alias_toml.is_some() {
toml.merge(dist_alias_toml.unwrap());
} else if user_alias_toml.is_some() {
toml.merge(user_alias_toml.unwrap());
} else {
let included_toml = get_toml(&include_path);
toml.merge(included_toml);
}
}




let included_toml = get_toml(&include_path);
toml.merge(included_toml, ReplaceOpt::IgnoreDuplicate);
}
Expand Down Expand Up @@ -1097,7 +1126,7 @@ impl Config {
crate::detail_exit(2)
}
toml.merge(override_toml, ReplaceOpt::Override);

master
config.changelog_seen = toml.changelog_seen;

let build = toml.build.unwrap_or_default();
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/defaults/config.user.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# These defaults are meant for users and distro maintainers building from source, without intending to make multiple changes.
# These defaults are meant for dist and distro maintainers building from source, without intending to make multiple changes.
[build]
# When compiling from source, you almost always want a full stage 2 build,
# which has all the latest optimizations from nightly.
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub enum Profile {
Codegen,
Library,
Tools,
User,
Dist,
None,
}

Expand Down