Skip to content
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

Make crate module extension os and arch dependent #2939

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cerisier
Copy link
Contributor

This PR is follow up to #2453 and marks the crate extension as os_dependent and arch_dependent.

For crate.from_cargo, the extension specifies reproducibility via the reproducible attribute of extension_metadata which 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 crate module extension depends on rust_host_tools (which are os / arch dependent), the entry in the lockfile for the module extension includes the checksum of the rustc and cargo binaries 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.

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.

1 participant