-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
go/build: sourcehut requires characters considered unsafe for cgo names #32260
Comments
ping @ianlancetaylor |
Bump? This should be easy to fix, is definitely a bug in golang, and shows unfair favoritism towards other platforms. |
Want to send in a patch? |
I don't really want to sign the CLA to be honest :/ I've pointed out the line of code which needs updating and it should be a one-line change, nay, a one-character change. |
Change https://golang.org/cl/199918 mentions this issue: |
Please note that these changes often aren't a trivial one-line fix. At minimum, it should include a small regression test. And the author should ensure that no other features or tests break because of the change. |
Yeah, I know. The point I was getting at is that this is about as simple of a change as Golang can get. Thanks a lot for putting up the patch, I appreciate it! |
Thank you! |
FWIW: This does not affect only sourcehut repositories, it also comes up when packaging Go libraries and programs which use |
This also affects 8.3 short path on Windows. Glad to see it was fixed.
|
build.go has a set of safe characters which can be present in CFLAGS:
go/src/go/build/build.go
Lines 1553 to 1559 in c290cb6
Sourcehut packages always have
~
in the URL, and in the future will likely have^
as well. Importing a package from sr.ht which uses${SRCDIR}
in its CFLAGS accordingly causes this error:~ has a special meaning in the shell, but it is URL safe and, per the comments in build.go, this string is never expanded with a shell.
EDIT: added permalink
The text was updated successfully, but these errors were encountered: