Skip to content

Conversation

@tianon
Copy link
Owner

@tianon tianon commented Jan 22, 2025

This requires Go 1.24+ (golang/go#50603), but allows us to embed the (semver-mangled 🙃💩) version of gosu in the standard Go metadata such that scanning tools can pick up the version of gosu directly.

In theory, this will enable us to publish official VEX statements for gosu in a way that scanning tools can actually consume and match correctly.

$ go version -m ./gosu-amd64
./gosu-amd64: go1.24rc2
	path	github.com/tianon/gosu
	mod	github.com/tianon/gosu	v1.17.0
	dep	github.com/moby/sys/user	v0.1.0	h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg=
	dep	golang.org/x/sys	v0.1.0	h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
	build	-buildmode=exe
	build	-compiler=gc
	build	-trimpath=true
	build	DefaultGODEBUG=asynctimerchan=1,gotestjsonbuildtext=1,gotypesalias=0,httplaxcontentlength=1,httpmuxgo121=1,httpservecontentkeepheaders=1,multipathtcp=0,panicnil=1,randseednop=0,rsa1024min=0,tls10server=1,tls3des=1,tlsmlkem=0,tlsrsakex=1,tlsunsafeekm=1,winreadlinkvolume=0,winsymlink=0,x509keypairleaf=0,x509negativeserial=1,x509rsacrt=0,x509usepolicies=0
	build	CGO_ENABLED=0
	build	GOARCH=amd64
	build	GOOS=linux
	build	GOAMD64=v1
	build	vcs=git
	build	vcs.revision=1.17
	build	vcs.time=1970-01-01T00:00:00Z
	build	vcs.modified=false

@lart2150
Copy link

with 1.24.2 out I think it would make sense to move off the RC version.

@tianon tianon force-pushed the go-version branch 2 times, most recently from 8fe0b91 to f5f44f6 Compare April 12, 2025 04:00
@tianon tianon mentioned this pull request Apr 28, 2025
This requires Go 1.24+, but allows us to embed the (semver-mangled 🙃💩) version of `gosu` in the standard Go metadata such that scanning tools can pick up the version of `gosu` directly.

In theory, this will enable us to publish official VEX statements for `gosu` in a way that scanning tools can actually consume and match correctly.

```console
$ go version -m ./gosu-amd64
./gosu-amd64: go1.24rc2
	path	github.com/tianon/gosu
	mod	github.com/tianon/gosu	v1.17.0
	dep	github.com/moby/sys/user	v0.1.0	h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg=
	dep	golang.org/x/sys	v0.1.0	h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
	build	-buildmode=exe
	build	-compiler=gc
	build	-trimpath=true
	build	DefaultGODEBUG=asynctimerchan=1,gotestjsonbuildtext=1,gotypesalias=0,httplaxcontentlength=1,httpmuxgo121=1,httpservecontentkeepheaders=1,multipathtcp=0,panicnil=1,randseednop=0,rsa1024min=0,tls10server=1,tls3des=1,tlsmlkem=0,tlsrsakex=1,tlsunsafeekm=1,winreadlinkvolume=0,winsymlink=0,x509keypairleaf=0,x509negativeserial=1,x509rsacrt=0,x509usepolicies=0
	build	CGO_ENABLED=0
	build	GOARCH=amd64
	build	GOOS=linux
	build	GOAMD64=v1
	build	vcs=git
	build	vcs.revision=1.17
	build	vcs.time=1970-01-01T00:00:00Z
	build	vcs.modified=false
```
@tianon
Copy link
Owner Author

tianon commented Sep 4, 2025

I finally split this out into an actual real independent project: https://github.com/tianon/fake-git

(and updated this PR to consume it)

@tianon tianon marked this pull request as ready for review September 4, 2025 23:33
@tianon
Copy link
Owner Author

tianon commented Sep 4, 2025

Let's finally do the thing. 👀

@tianon
Copy link
Owner Author

tianon commented Sep 4, 2025

The current final output for gosu-amd64, for posterity:

$ go version -m /go/bin/gosu-amd64
/go/bin/gosu-amd64: go1.24.0
	path	github.com/tianon/gosu
	mod	github.com/tianon/gosu	v1.17.0	
	dep	github.com/moby/sys/user	v0.1.0	h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg=
	dep	golang.org/x/sys	v0.1.0	h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
	build	-buildmode=exe
	build	-compiler=gc
	build	-trimpath=true
	build	DefaultGODEBUG=asynctimerchan=1,gotestjsonbuildtext=1,gotypesalias=0,httplaxcontentlength=1,httpmuxgo121=1,httpservecontentkeepheaders=1,multipathtcp=0,panicnil=1,randseednop=0,rsa1024min=0,tls10server=1,tls3des=1,tlsmlkem=0,tlsrsakex=1,tlsunsafeekm=1,winreadlinkvolume=0,winsymlink=0,x509keypairleaf=0,x509negativeserial=1,x509rsacrt=0,x509usepolicies=0
	build	CGO_ENABLED=0
	build	GOARCH=amd64
	build	GOOS=linux
	build	GOAMD64=v1
	build	vcs=git
	build	vcs.revision=1.17
	build	vcs.time=1970-01-01T00:00:00Z
	build	vcs.modified=false

@tianon tianon merged commit 7b6bed0 into tianon:master Sep 4, 2025
1 check passed
@tianon tianon deleted the go-version branch September 4, 2025 23:38
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.

2 participants