You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invalid cache hits for compilation actions using different version of CC - the other side of the coin #9296
Typical problem that Bazel C++ users face is that they have to run bazel clean --expunge or with Bazel 1.0 bazel sync --configure each time they upgrade their compiler or system header versions.
A variation of this problem that bazel clean --expunge doesn't fix is remote cache poisoning. Action outputs produced by the old version of CC are stored in the cache and used for builds with the new version of CC. And C++ header validation fails the build because the current C++ toolchain expects headers for new CC, and remote cache returned .d file with old headers.
As the result users cannot build unless they disable the remote cache or somehow ensure the poisoned cache entry is not taken. Typical workaround is passing --copt=-Dfoo=bar. That will change the action command line and action will be reexecuted.
FYI this kinda causes an issue for iOS builds where these paths include the paths to Xcode.app which can differ between developer machines. Because iOS builds have --xcode_version as a key we're just disabling this though. I'm not suggesting we change it since I guess that's by design.
Activity
hlopko commentedon Aug 30, 2019
I'll mark this as a release blocker, even though this is not strictly a regression, it was always like this.
Include cc configure headers in the cache key
keith commentedon Sep 18, 2019
FYI this kinda causes an issue for iOS builds where these paths include the paths to Xcode.app which can differ between developer machines. Because iOS builds have
--xcode_versionas a key we're just disabling this though. I'm not suggesting we change it since I guess that's by design.