-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Suggest integrity
instead of sha256
attribute in http_*
rules
#20156
Closed
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
This attribute is also present on `archive_override`. Work towards bazelbuild#17803
fmeum
requested review from
keertk,
meteorcloudy and
Wyverald
and removed request for
keertk
November 12, 2023 14:27
github-actions
bot
added
the
awaiting-review
PR is awaiting review from an assigned reviewer
label
Nov 12, 2023
@bazel-io flag |
bazel-io
added
the
potential release blocker
Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone
label
Nov 12, 2023
@bazel-io fork 7.0.0 |
bazel-io
removed
the
potential release blocker
Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone
label
Nov 12, 2023
meteorcloudy
approved these changes
Nov 13, 2023
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.
Thanks!
meteorcloudy
added
awaiting-PR-merge
PR has been approved by a reviewer and is ready to be merge internally
and removed
awaiting-review
PR is awaiting review from an assigned reviewer
labels
Nov 13, 2023
keertk
added
the
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
label
Nov 13, 2023
github-actions
bot
removed
the
awaiting-PR-merge
PR has been approved by a reviewer and is ready to be merge internally
label
Nov 13, 2023
illicitonion
pushed a commit
to bazelbuild/rules_rust
that referenced
this pull request
Jan 3, 2024
`integrity` is preferred because it works for both `http_archive` (legacy) and `archive_override` (bzlmod). `sha256` only works for `http_archive`. Context: bazelbuild/bazel#20156 I confirmed that `xxd` and `base64` commands are available in the GitHub ubuntu-20.04 runner: ![Screenshot from 2024-01-02 17-24-23](https://github.com/bazelbuild/rules_rust/assets/1940490/a30e58c4-fd78-4c37-969d-1938b2dc2215) and that this produces an integrity string that checks out with what Bazel wants. See dtolnay/cxx@17f46ec for a successful use of `integrity` with `http_archive`: ```starlark # WORKSPACE.bazel http_archive( name = "rules_rust", integrity = "sha256-p2HVTknbBvhjRo5rukoTJSsb1Jno9wbaZeJ5s7y8XFI=", urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.36.2/rules_rust-v0.36.2.tar.gz"], ) ``` and dtolnay/cxx#1294 for a successful use of `integrity` with `archive_override`. ```starlark # MODULE.bazel archive_override( module_name = "rules_rust", integrity = "sha256-p2HVTknbBvhjRo5rukoTJSsb1Jno9wbaZeJ5s7y8XFI=", urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.36.2/rules_rust-v0.36.2.tar.gz"], ) ``` `sha256` does not work in `archive_override`. ```console ERROR: Traceback (most recent call last): File "/git/cxx/MODULE.bazel", line 5, column 17, in <toplevel> archive_override( Error in archive_override: archive_override() got unexpected keyword argument 'sha256' ERROR: Error computing the main repository mapping: error executing MODULE.bazel file for <root> ```
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 attribute is also present on
archive_override
.Work towards #17803