Skip to content

Write librusty_v8.a sha-256 checksum to file. #547

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

Closed
wants to merge 1 commit into from

Conversation

bnoordhuis
Copy link
Contributor

No description provided.

@piscisaureus
Copy link
Member

What's the purpose of this change?
I suspect it has something to do with re-downloading librusty_v8.a after upgrading the rusty_v8 crate.
But there is no way for build.rs to know the "correct" shasum so I don't see how it would work...

@bartlomieju
Copy link
Member

@piscisaureus #545

@piscisaureus
Copy link
Member

@bartlomieju

There is no way for build.rs to know the "correct" shasum so I don't see how it would work. The only way to find out would be to download the .shasum file on every build, but this will make people that use a mirror unhappy.

My suggestion would be to append the crate version to the filename instead.

@bartlomieju
Copy link
Member

The only way to find out would be to download the .shasum file on every build, but this will make people that use a mirror unhappy.

That was the plan to download checksum alongside static lib and verify that checksum of static lib's checksum matches. Probably could skip it for mirrors?

@piscisaureus
Copy link
Member

@bartlomieju

Right - so this is not intended to solve the issue that the static library build should be re-downloaded after a rusty_v8 upgrade?

I am aware that some people experience link errors, but that's pretty much always because the download failed entirely and left an empty librusty_v8.a in the build directory. There's no need for shasumming to detect that.

@bnoordhuis
Copy link
Contributor Author

so this is not intended to solve the issue that the static library build should be re-downloaded after a rusty_v8 upgrade?

No, it's to catch partial or corrupted downloads.

@bnoordhuis
Copy link
Contributor Author

Ping @piscisaureus - your thoughts?

dependencies = [
"typenum",
"version_check",
]
Copy link
Member

Choose a reason for hiding this comment

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

It's rather unfortunate that this patch adds a bunch of dependencies just to calculate the checksum.

https://crates.io/crates/sha1 for example is self-contained. Maybe we could use that - or an already installed command-line utility?

Base automatically changed from master to main February 14, 2021 15:16
@ry
Copy link
Member

ry commented Aug 5, 2021

Closing because stale.

@ry ry closed this Aug 5, 2021
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.

4 participants