-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building resources causes bazel to cache a file for the null sha #228
Comments
The The |
Those others exist as well? so they should be known? https://github.com/bazelbuild/rules_apple/tree/0e593c759eed4b556e6c2d86cf457aa711317bb1/examples/resources |
Yes, they should, and they BUILD files has |
Do you have any idea how I can debug this further? I'm not really sure but I'm worried this could result in the cache not working as well as it could because some items will be misses when fetching for this key? |
I'd suggest opening an issue on bazel, since what is in this example appears to be valid, so it seems to be a problem within bazel itself. |
Opened bazelbuild/bazel#6260 |
Currently if you build a target that has resources (storyboards or asset catalogs in my testing) bazel will end up caching a file for the null sha
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
. With remote caches this results in failed builds if you accept this file in your cache.You can reproduce this with one of the sample projects in this repo:
Here you should see a match. If you remove all the resources portions of this BUILD file, this is no longer the case. After applying this diff:
And running:
You should no longer see any matches. I see a few other references to
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
in other bazel issues, but none specifically talking about whether or not it is a problem. It seems like a few remote cache implementations work around this by not caching files that are empty (which seem to only happen for us when the key is also this sha). I can't find the exact rule that causes this withaquery
, but I'd love to know if this is considered an issue, or if we should work around this in our remote cache.The text was updated successfully, but these errors were encountered: