Skip to content
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

less noisy change-tracker #130368

Closed
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
2 changes: 0 additions & 2 deletions compiler/rustc_codegen_cranelift/scripts/setup_rust_fork.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ git -c user.name=Dummy -c user.email=dummy@example.com -c commit.gpgSign=false \
am ../patches/*-stdlib-*.patch

cat > config.toml <<EOF
change-id = 999999

[llvm]
download-ci-llvm = true

Expand Down
2 changes: 1 addition & 1 deletion config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#
# If `change-id` does not match the version that is currently running,
# `x.py` will inform you about the changes made on bootstrap.
#change-id = <latest change id in src/bootstrap/src/utils/change_tracker.rs>
#change-id = <none>

# =============================================================================
# Tweaking how LLVM is compiled
Expand Down
11 changes: 7 additions & 4 deletions src/bootstrap/src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,14 @@ fn check_version(config: &Config) -> Option<String> {
if io::stdout().is_terminal() && !config.dry_run() {
t!(fs::write(warned_id_path, latest_change_id.to_string()));
}
} else {

Some(msg)
} else if config.is_verbose() {
msg.push_str("WARNING: The `change-id` is missing in the `config.toml`. This means that you will not be able to track the major changes made to the bootstrap configurations.\n");
msg.push_str("NOTE: to silence this warning, ");
msg.push_str(&format!("add `change-id = {latest_change_id}` at the top of `config.toml`"));
};

Some(msg)
Some(msg)
} else {
None
}
}
5 changes: 1 addition & 4 deletions src/bootstrap/src/core/build_steps/setup.rs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this change, as I think "human" users should be warned about changes by default

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is mostly useful for experts and we should just include this in the documentation instead of turning it on by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ use std::{fmt, fs, io};
use sha2::Digest;

use crate::core::builder::{Builder, RunConfig, ShouldRun, Step};
use crate::utils::change_tracker::CONFIG_CHANGE_HISTORY;
use crate::utils::exec::command;
use crate::utils::helpers::{self, hex_encode};
use crate::{Config, t};
Expand Down Expand Up @@ -228,11 +227,9 @@ fn setup_config_toml(path: &PathBuf, profile: Profile, config: &Config) {
return;
}

let latest_change_id = CONFIG_CHANGE_HISTORY.last().unwrap().change_id;
let settings = format!(
"# Includes one of the default files in {PROFILE_DIR}\n\
profile = \"{profile}\"\n\
change-id = {latest_change_id}\n"
profile = \"{profile}\"\n"
);

t!(fs::write(path, settings));
Expand Down
5 changes: 0 additions & 5 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ source "$ci_dir/shared.sh"

export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse

# suppress change-tracker warnings on CI
if [ "$CI" != "" ]; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set change-id=99999999"
fi

if ! isCI || isCiBranch auto || isCiBranch beta || isCiBranch try || isCiBranch try-perf || \
isCiBranch automation/bors/try; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.print-step-timings --enable-verbose-tests"
Expand Down
Loading