-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
go: introduce cache key for compile actions #14661
Merged
Merged
Conversation
This file contains 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
[ci skip-rust] [ci skip-build-wheels]
Note: This PR only adds a cache key for compile actions. The cache key for link actions will be added via a separate PR. |
Eric-Arellano
approved these changes
Mar 1, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, thank you.
[ci skip-rust] [ci skip-build-wheels]
[ci skip-rust] [ci skip-build-wheels]
[ci skip-rust] [ci skip-build-wheels]
Eric-Arellano
pushed a commit
to Eric-Arellano/pants
that referenced
this pull request
Mar 2, 2022
As described in pantsbuild#14625, the Go version and other compiler values that influence the output (other than input file content hashes) were not incorporated into the cache key for building a Go package. (The input files were handled by being part of the input root's `Digest`.) This caused issues when, for example, changing the version of the compiler where incompatible artifacts built by an earlier Go compiler were being used with an upgraded Go compiler. The `go` tool handles this by incorporating "action IDs" into the "build ID" of a build product. This PR introduces a similar concept to Pants and tries to follow the `go` tool's algorithm as much as possible. (Links to relevant code are in comments in the code.) [ci skip-rust] [ci skip-build-wheels]
Eric-Arellano
added a commit
that referenced
this pull request
Mar 2, 2022
…14672) As described in #14625, the Go version and other compiler values that influence the output (other than input file content hashes) were not incorporated into the cache key for building a Go package. (The input files were handled by being part of the input root's `Digest`.) This caused issues when, for example, changing the version of the compiler where incompatible artifacts built by an earlier Go compiler were being used with an upgraded Go compiler. The `go` tool handles this by incorporating "action IDs" into the "build ID" of a build product. This PR introduces a similar concept to Pants and tries to follow the `go` tool's algorithm as much as possible. (Links to relevant code are in comments in the code.) [ci skip-rust] [ci skip-build-wheels] Co-authored-by: Tom Dyas <[email protected]>
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.
As described in #14625, the Go version and other compiler values that influence the output (other than input file content hashes) were not incorporated into the cache key for building a Go package. (The input files were handled by being part of the input root's
Digest
.) This caused issues when, for example, changing the version of the compiler where incompatible artifacts built by an earlier Go compiler were being used with an upgraded Go compiler.The
go
tool handles this by incorporating "action IDs" into the "build ID" of a build product. This PR introduces a similar concept to Pants and tries to follow thego
tool's algorithm as much as possible. (Links to relevant code are in comments in the code.)[ci skip-rust]
[ci skip-build-wheels]