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

update capnp #2023

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ apple_support_dependencies()

http_archive(
name = "capnp-cpp",
sha256 = "21ae72a199a995b72e9bd359d4815539158d93a15cf36e284ef201fde7338c3c",
strip_prefix = "capnproto-capnproto-8ba7a6e/c++",
integrity = "sha256-I/jF25bRniNfmXR4KdeXTnwetKPKEm6fkYfibpZFYoU=",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do I generate this new format?

The old format, I would just do: curl -L $URL | sha256sum

But off the top of my head I'm not sure how I'd generate this base64.

Can we maybe just stick with the old format? Or is there some meaningful advantage to this change?

Copy link
Collaborator Author

@mikea mikea Apr 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do I generate this new format?

you just run bazel without any integrity attribute and it tells you what to add (previously it was suggesting sha256 thats why we have it everywhere):

INFO: Invocation ID: a7c49738-0fe1-47d0-b3aa-2ea74014898c
DEBUG: Rule 'capnp-cpp' indicated that a canonical reproducible form can be obtained by modifying arguments integrity = "sha256-I/jF25bRniNfmXR4KdeXTnwetKPKEm6fkYfibpZFYoU="
DEBUG: Repository capnp-cpp instantiated at:
  /home/maizatskyi/src/github.com/cloudflare/workerd/WORKSPACE:40:13: in <toplevel>

The old format, I would just do: curl -L $URL | sha256sum

I have never actually downloaded any archive and was always relying on bazel to tell me :)

Can we maybe just stick with the old format?

I personally don't care. Up to you.

Or is there some meaningful advantage to this change?

This is a "standard" thing: https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh huh, I guess I never tried running bazel without fully updating the hash first.

strip_prefix = "capnproto-capnproto-24371b7/c++",
type = "tgz",
urls = ["https://github.com/capnproto/capnproto/tarball/8ba7a6ef987eb56e8d41e7f11e080dabcbf2a04f"],
urls = ["https://github.com/capnproto/capnproto/tarball/24371b79b467686641aa64afa340bdad03b05830"],
)

http_archive(
Expand Down
Loading