fix(compile): register #8128's optnone knob as a build-cache input - #8158
Merged
Conversation
`cargo-test` is red on main. `codegen_env_vars_are_build_cache_inputs` reports `PERRY_LL_RS4GC_OPTNONE_INSTRS` keying neither the build cache nor an exclusion. #8128 introduced the knob and its description says it was "registered as a build-cache key per #6394" — it was not. The knob stamps `optnone`+`noinline` on any function past the threshold, so flipping it skips the middle-end for that function and changes emitted code. It belongs in BUILD_CACHE_ENV_VARS, not the exclusion list: an exclusion asserts the variable cannot change emitted code, which is the opposite of what this one does. Without it, changing the threshold leaves the build-level no-op check reporting a match and hands back the previous build's executable. Verified failing on main at 8b1b4b9 before the change and passing after; `-p perry --bin perry` green.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe build cache input list now includes ChangesBuild cache invalidation
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
cargo-test— a required context — is red onmainright now.Reproduced on
main@8b1b4b909, so this is not any open PR's doing. It surfaced while I was triaging #8084's redcargo-test, which turns out to be inheriting this.Cause
#8128 added the knob. Its description says it was "registered as a build-cache key per
#6394" — it was not.Why
BUILD_CACHE_ENV_VARSand not an exclusionThe knob stamps
optnone+noinlineon any function past its instruction threshold, so flipping it skips the middle-end for that function and changes emitted code. An exclusion asserts the opposite — that a variable cannot change emitted code — so the exclusion list would be the wrong home and would re-break the invariant #6394 exists to hold. Without the entry, changing the threshold leaves the build-level no-op check reporting a match and handing back the previous build's executable.Verification
mainbefore the change, passing after.cargo test -p perry --bin perrygreen.Note this class is invisible to
cargo test -p perry --lib—perryhas no lib target, so the test only runs under--bin perry.Summary by CodeRabbit