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
Making sha256 or sha1 sum for http_archive optional #576
Comments
Another way could be not using a GOPROXY and using the default VCS resolving algorithm go uses. This is much more complicated than using the user supplied or default GOPROXY but would probably circumvent unnecessary download. |
FWIW, I'm not a Go programmer, but by default I don't think there's a way around this. You have to download the files and calculate the proper hash manually as part of the generation step. Many other tools work this way in some form or another, not just in Buck2-land but elsewhere. But, to work around this today, instead of using I think that to support this Buck would need a feature that the Nix package manager calls "fixed output derivations" or "FODs". These are build rules where you don't give the hash of the downloaded file itself, but instead give a hash of the expected output files that some arbitrary commands produce. For example, if you download I don't know what FODs would look like in Buck2 at all. |
@thoughtpolice you could imagine doing this in a I agree with Austin though, your best option right now is to have a locally run action that invokes |
I have been trying to create a tool like reindeer but for go modules. But I've hit a barrier where creating the http_archive rules for the required modules requires the sha sum of the file it is downloading. However there is no easy way to get the hash of the files without downloading them. go.sum files or go sum db has some hashes but they are not the hash of the zip file rather a directory hash function using the actual contents of the file. One way to do this would be to download everything with the tool calculate the hashes and then generate the rules for it. Is there a way to circumvent this ?
The text was updated successfully, but these errors were encountered: