-
Notifications
You must be signed in to change notification settings - Fork 2.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
Transitive dependency (cloudflare/circl) making cross compiling difficult #2932
Comments
Triage info:
Still investigating... |
I'm wondering if you might get more traction by posting an issue here: https://github.com/ProtonMail/go-crypto/issues ? |
If there is an appetite to change the API, we could replace Commit.SigningKey with a single-method interface or a Sign func that looks like: Sign func(w io.Writer, r io.Reader) error Then go-github wouldn't need to depend on any openpgp implementation. Devs who want to sign commits would need to do something like: c.Sign = func(w io.Writer, r io.Reader) error {
return openpgp.ArmoredDetachSign(w, myKey, r, nil)
} That's a little bit worse than the current experience, but not terrible. |
I'm totally fine with that, as @cablehead - @hungle92 - @exageraldo - @komod0 - do you have opinions since you were all involved in the issues linked above? |
Thank you, @exageraldo - moving forward with #2935 hearing no objections. |
Can someone elaborate what the the fix here is for the OP's issues ? I am running into the same issue and unsure how to proceed |
I'm running into a slightly obscure build problem. Using bazel (and gazelle and rules_go) to build go-github worked fine with v50 both for arm64 and amd64. I recently tried to bump to v55 and found myself unable to build for amd64 via bazel.
I found that the transitive dependency
github.com/cloudflare/circl
was bumped from v1.1.0 to v1.3.3 after v52 of go-github. It seems used bygithub.com/ProtonMail/go-crypto
.The problem is that it includes some platform specific files (
*_amd64.go
) for some packages, and some headers and some assembly.Unfortunately led to some issues trying to build via bazel with dependencies not detected:
Quickly playing with
GOARCH=amd64
it seems to work fine withgo build
so I suspect it's not actually a problem but more of a side effect of bazel trying to compile a bit too much of some of the libraries used transitively.Since CGO usually raises the bar for compiling I thought I would mention that it might not be ideal that
github.com/ProtonMail/go-crypto
usesgithub.com/cloudflare/circl
:Is there an alternative to
github.com/ProtonMail/go-crypto
that would avoid this?The text was updated successfully, but these errors were encountered: