Skip to content

Commit e5d1164

Browse files
committed
add "library" to RUSTC_IF_UNCHANGED_ALLOWED_PATHS
Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent 2b6f672 commit e5d1164

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

src/bootstrap/src/core/config/config.rs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ use crate::utils::helpers::{self, exe, output, t};
4545
/// final output/compiler, which can be significantly affected by changes made to the bootstrap sources.
4646
#[rustfmt::skip] // We don't want rustfmt to oneline this list
4747
pub(crate) const RUSTC_IF_UNCHANGED_ALLOWED_PATHS: &[&str] = &[
48+
"!library",
4849
":!src/tools",
4950
":!src/librustdoc",
5051
":!src/rustdoc-json-types",
@@ -3148,24 +3149,10 @@ impl Config {
31483149
}
31493150
};
31503151

3151-
// RUSTC_IF_UNCHANGED_ALLOWED_PATHS
3152-
let mut allowed_paths = RUSTC_IF_UNCHANGED_ALLOWED_PATHS.to_vec();
3153-
3154-
// In CI, disable ci-rustc if there are changes in the library tree. But for non-CI, allow
3155-
// these changes to speed up the build process for library developers. This provides consistent
3156-
// functionality for library developers between `download-rustc=true` and `download-rustc="if-unchanged"`
3157-
// options.
3158-
//
3159-
// If you update "library" logic here, update `builder::tests::ci_rustc_if_unchanged_logic` test
3160-
// logic accordingly.
3161-
if !self.is_running_on_ci {
3162-
allowed_paths.push(":!library");
3163-
}
3164-
31653152
let commit = if self.rust_info.is_managed_git_subrepository() {
31663153
// Look for a version to compare to based on the current commit.
31673154
// Only commits merged by bors will have CI artifacts.
3168-
let freshness = self.check_path_modifications(&allowed_paths);
3155+
let freshness = self.check_path_modifications(RUSTC_IF_UNCHANGED_ALLOWED_PATHS);
31693156
self.verbose(|| {
31703157
eprintln!("rustc freshness: {freshness:?}");
31713158
});

0 commit comments

Comments
 (0)