The (immediate) future of Go on FreeBSD
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Apr 2025 01:04:30 UTC
Hi everyone,
PR 285952 proposes overhauling the Go framework to align with how the
toolchain system works (since 1.21).
Basically, what I'm proposing is:
* Delete all versioned go ports (lang/go121, lang/go122, etc.)
* lang/go is the current release, and that's the ONLY release we provide
(we don't have devel releases right now, but we CAN still could use
go-devel under this proposal)
* Go natively respects the toolchain specification in go.mod, so there's no
difference between building a "go 1.22" app in 1.22, 1.23, or 1.24
* USES=go:1.xyz will forcibly pin the toolchain to 1.xyz (only for old
ports that rely on soft-deprecated features or behavior and can't otherwise
be patched
As a reminder, Go's toolchain semantics are that if an app has:
go.mod:
go 1.23
Then go < 1.23 will download 1.23 sources and compile the entire toolchain,
then use it to build the app.
Similarly, go >= 1.23 will compile using the installed toolchain, but will
disable any features newer than 1.23.
The end-user impact should essentially be nil. We could continue to provide
versioned ports if people need them, but I can't see any benefit to using
them to build go apps. Go 1.24, 1.25, and 1.1000 should all compile a
1.23-specified app identically.
I'm really interested to hear your thoughts, concerns, ideas, etc.!
--
Adam Weinberger
adamw@adamw.org