Skip to content

go_sdk: Pick a consistent repo name to improve cachability #4314

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

Merged
merged 1 commit into from
Apr 10, 2025

Conversation

zecke
Copy link
Contributor

@zecke zecke commented Apr 10, 2025

The SDK's repo name will be part of the builder path and as such part of every compile/linking action. Pick a generic name for the root module to allow caching these actions across modules.

This change assumes that every module other than the root module will have a name.

Fixes #4312

What type of PR is this?

Bug fix

What does this PR do? Why is it needed?

Pick the same repo name for the SDK download across different root modules. This matters as every compilation/linking will be done through the builder and the repo name is part of the path to the builder. After this change the path will be consistent across different root modules.

Which issues(s) does this PR fix?

Fixes #4312

Other notes for review

This code assumes that every non-root module has a name (e.g. imported via a bazel_dep).

The SDK's repo name will be part of the builder path and as such part of
every compile/linking action. Pick a generic name for the root module to
allow caching these actions across modules.

This change assumes that every module other than the root module will
have a name.

Fixes bazel-contrib#4312
@fmeum fmeum merged commit b1f572a into bazel-contrib:master Apr 10, 2025
1 check passed
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.

bzlmod: Using go_sdk.download(version = X) limits caching opportunity
2 participants