[9.3.0] Register a FileValue dep on bzlCompileCache hits in BzlLoadFunction (… - #31137
Merged
iancha1992 merged 1 commit intoSep 15, 2026
Conversation
…azelbuild#30902) The KeyForBuild and KeyForBzlmod variants of a BzlLoadValue key for the same .bzl file share a single BzlCompileValue.Key, and thus a single entry in the bzlCompileCache used when BzlCompileFunction is inlined. When a BzlLoadValue node got a cache hit for an entry that was computed on behalf of a node of the other key variant, it never requested the FileValue for the .bzl file, so it was missing the Skyframe edge that would invalidate it when the file changes and kept serving stale file contents on subsequent builds. Fix this by (re-)requesting the FileValue for the .bzl file on a cache hit. Fixes bazelbuild#30900 No - [x] I have added tests for the new use cases (if any). - [ ] I have updated the documentation (if applicable). RELNOTES: None Closes bazelbuild#30902 COPYBARA_INTEGRATE_REVIEW=bazelbuild#30902 from fmeum:claude/bazel-issue-30900-gtza50 bb23137 PiperOrigin-RevId: 981304041 Change-Id: I16c31a54ad4996d2f94f7061b1b72bb0a6eb9db1
iancha1992
enabled auto-merge
September 14, 2026 20:36
Wyverald
approved these changes
Sep 14, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to no response for status checks
Sep 15, 2026
Merged
via the queue into
bazelbuild:release-9.3.0
with commit Sep 15, 2026
bf9017e
42 checks passed
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.
…#30902)
The KeyForBuild and KeyForBzlmod variants of a BzlLoadValue key for the same .bzl file share a single BzlCompileValue.Key, and thus a single entry in the bzlCompileCache used when BzlCompileFunction is inlined. When a BzlLoadValue node got a cache hit for an entry that was computed on behalf of a node of the other key variant, it never requested the FileValue for the .bzl file, so it was missing the Skyframe edge that would invalidate it when the file changes and kept serving stale file contents on subsequent builds.
Fix this by (re-)requesting the FileValue for the .bzl file on a cache hit.
Fixes #30900
No
RELNOTES: None
Closes #30902
COPYBARA_INTEGRATE_REVIEW=#30902 from fmeum:claude/bazel-issue-30900-gtza50 bb23137 PiperOrigin-RevId: 981304041
Change-Id: I16c31a54ad4996d2f94f7061b1b72bb0a6eb9db1
Description
Motivation
Build API Changes
No
Checklist
Release Notes
RELNOTES: None
Commit 2fccd6a