diff --git a/crates/celox-test-suite/build.rs b/crates/celox-test-suite/build.rs index 3d94cad2b64..978699e3e9b 100644 --- a/crates/celox-test-suite/build.rs +++ b/crates/celox-test-suite/build.rs @@ -165,7 +165,9 @@ mod fingerprint { ".cargo/config", ] { let path = workspace.join(name); - println!("cargo:rerun-if-changed={}", path.display()); + // file() registers existing inputs. Registering a missing optional + // Cargo config makes Cargo rerun this script on every invocation. + // Cargo itself tracks settings that affect compilation. if path.exists() { file(&mut hash, &path, name)?; } diff --git a/scripts/ci-changes.mjs b/scripts/ci-changes.mjs index a97b9d17302..1af4a631c18 100644 --- a/scripts/ci-changes.mjs +++ b/scripts/ci-changes.mjs @@ -161,6 +161,14 @@ export function classifyFiles(files, { releasePlease = false } = {}) { continue; } + // Aplite has an independent release manifest. Its release notes and + // manifest need repository-policy checks, not a product rebuild. Keep + // source, Cargo.toml and Cargo.lock changes on their normal paths below. + if ([".release-please-aplite-manifest.json", "crates/aplite/CHANGELOG.md"].includes(path)) { + affected.scripts = true; + continue; + } + if (isRustOnlyPath(path)) { affected.rust = true; continue; diff --git a/scripts/ci-changes.test.mjs b/scripts/ci-changes.test.mjs index 0c856295b91..16f53c40c24 100644 --- a/scripts/ci-changes.test.mjs +++ b/scripts/ci-changes.test.mjs @@ -69,6 +69,22 @@ test("Rust test infrastructure skips bindings while retaining Rust checks", () = } }); +test("Aplite release metadata runs policy checks without rebuilding products", () => { + const metadata = [".release-please-aplite-manifest.json", "crates/aplite/CHANGELOG.md"]; + for (const files of [metadata, ...metadata.map(path => [path])]) { + for (const releasePlease of [false, true]) + assert.deepEqual(classifyFiles(files, { releasePlease }), { ...none, scripts: true }); + } + for (const path of ["crates/aplite/src/lib.rs", "crates/aplite/Cargo.toml", "Cargo.lock"]) { + assert.deepEqual( + classifyFiles([...metadata, path]), + { ...classifyFiles([path]), scripts: true }, + path, + ); + assert.equal(classifyFiles([...metadata, path]).rust, true, path); + } +}); + test("manifests and mixed runtime changes retain binding validation", () => { for (const path of [ "Cargo.toml",