Skip to content

Include repository cache files in the disk cache key.#64

Merged
p0deje merged 2 commits intobazel-contrib:mainfrom
bmclarnon:disk-cache
Jan 24, 2025
Merged

Include repository cache files in the disk cache key.#64
p0deje merged 2 commits intobazel-contrib:mainfrom
bmclarnon:disk-cache

Conversation

@bmclarnon
Copy link
Contributor

Like BUILD file changes, changes to workspace dependencies can significantly affect the contents of the disk cache. Prior to this change, upreving dependencies wasn't itself sufficient to update the disk cache, resulting in repeatedly rebuilding dependencies until some subsequent commit happened to modify BUILD files.

One of my projects has a dependency that take several hours to build; I recently realized that the reason that all builds were taking several hours is that we hadn't modified any BUILD files since upreving that dependency. Hopefully this prevents other people from having similar issues!

Like BUILD file changes, changes to workspace dependencies can
significantly affect the contents of the disk cache. Prior to this
change, upreving dependencies wasn't itself sufficient to update the
disk cache, resulting in repeatedly rebuilding dependencies until some
subsequent commit happened to modify BUILD files.
@bmclarnon
Copy link
Contributor Author

I was planning to squash the commits when merging. If this repo doesn't support squashing and you'd prefer that the PR only contains a single commit, please let me know. Thanks!

@p0deje p0deje merged commit bc949b7 into bazel-contrib:main Jan 24, 2025
@p0deje
Copy link
Member

p0deje commented Jan 24, 2025

Thank you!

@bmclarnon
Copy link
Contributor Author

Thank you for such a quick review -- and for maintaining this project!

@bmclarnon bmclarnon deleted the disk-cache branch January 25, 2025 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants