Make crate module extension os and arch dependent#2939
Merged
illicitonion merged 1 commit intobazelbuild:mainfrom Oct 20, 2024
Merged
Conversation
Contributor
Author
|
cc @UebelAndre since that's a quick one |
illicitonion
approved these changes
Oct 20, 2024
Collaborator
illicitonion
left a comment
There was a problem hiding this comment.
Seems reasonable - thanks!
This file contains hidden or 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
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.
This PR is follow up to #2453 and marks the
crateextension asos_dependentandarch_dependent.For
crate.from_cargo, the extension specifies reproducibility via thereproducibleattribute ofextension_metadatawhich makes Bazel skip the extension when writing the lockfile.But in the case of
crate.from_specs, the current implementation marks the extension as non reproducible since the crates will not be backed by a lockfile.And because the
cratemodule extension depends onrust_host_tools(which are os / arch dependent), the entry in the lockfile for the module extension includes the checksum of therustcandcargobinaries for whatever host it was resolved for.This makes the bazel lock file platform dependent in that case.
This PR will result in a new os/arch specific entry in the lockfile for users of
crate.from_specs.And will have no impact for users of
crate.from_cargo.Thanks to @fmeum for the guidance.