Skip to content
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
10 changes: 10 additions & 0 deletions changelog.d/9777-build-cache-concat-site-cache.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
**`PERRY_CONCAT_SITE_CACHE` is now a build-cache input.** #9514's per-site
concat cache reads the variable as a build-time kill switch — setting it to
`0` removes the lowering lane entirely — but it was registered neither in
`BUILD_CACHE_ENV_VARS` nor as a justified exclusion. A build with the switch
flipped could therefore be served a cached object produced with it in the
other state.

`codegen_env_vars_are_build_cache_inputs` caught this by scanning
`crates/perry-codegen/src` for every `env::var("PERRY_…")`, which is why the
check scans the source instead of trusting a hand-maintained list.
5 changes: 5 additions & 0 deletions crates/perry/src/commands/compile/build_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ const BUILD_CACHE_ENV_VARS: &[&str] = &[
// #9026: gates the once-per-closure-entry resolution of read-only boxed
// capture cells — flipping it changes every closure body that qualifies.
"PERRY_BOX_CAPTURE_ENTRY_CELLS",
// #9514: gates the per-site concat cache. `PERRY_CONCAT_SITE_CACHE=0`
// removes the lane at build time, so a qualifying `"literal" + value`
// site lowers to a different sequence with it on and off and a cached
// object from one setting must not serve the other.
"PERRY_CONCAT_SITE_CACHE",
// The guarded-preinline IR-size ceiling: functions on either side of the
// budget inline differently, so a run with a raised ceiling must not be
// served objects a default run produced (same rule as the RS4GC budget
Expand Down
Loading