Skip to content
Merged
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
10 changes: 8 additions & 2 deletions src/bootstrap/src/core/builder/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,14 @@ fn ci_rustc_if_unchanged_logic() {
// Make sure "if-unchanged" logic doesn't try to use CI rustc while there are changes
// in compiler and/or library.
if config.download_rustc_commit.is_some() {
let has_changes =
config.last_modified_commit(&["compiler", "library"], "download-rustc", true).is_none();
let mut paths = vec!["compiler"];

// Handle library tree the same way as in `Config::download_ci_rustc_commit`.
if build_helper::ci::CiEnv::is_ci() {
paths.push("library");
}

let has_changes = config.last_modified_commit(&paths, "download-rustc", true).is_none();

assert!(
!has_changes,
Expand Down
3 changes: 3 additions & 0 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2985,6 +2985,9 @@ impl Config {
// these changes to speed up the build process for library developers. This provides consistent
// functionality for library developers between `download-rustc=true` and `download-rustc="if-unchanged"`
// options.
//
// If you update "library" logic here, update `builder::tests::ci_rustc_if_unchanged_logic` test
// logic accordingly.
if !CiEnv::is_ci() {
allowed_paths.push(":!library");
}
Expand Down
Loading