git: c74cf8342b55 - main - Uses/go.mk: Add a note about trying to avoid pinned versions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 05 Dec 2025 17:57:48 UTC
The branch main has been updated by adamw:
URL: https://cgit.FreeBSD.org/ports/commit/?id=c74cf8342b5592b5350647c491049d33769cb056
commit c74cf8342b5592b5350647c491049d33769cb056
Author: Adam Weinberger <adamw@FreeBSD.org>
AuthorDate: 2025-12-05 17:55:54 +0000
Commit: Adam Weinberger <adamw@FreeBSD.org>
CommitDate: 2025-12-05 17:57:43 +0000
Uses/go.mk: Add a note about trying to avoid pinned versions
Also, don't recommend the -devel port. It is comically out-ot-date
and should (in the future) be converted to lang/go/bsd.go.mk or
something similar.
---
Mk/Uses/go.mk | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/Mk/Uses/go.mk b/Mk/Uses/go.mk
index 5bb8b245644c..872546e6fd01 100644
--- a/Mk/Uses/go.mk
+++ b/Mk/Uses/go.mk
@@ -6,7 +6,7 @@
# Valid ARGS: (none), N.NN, N.NN-devel, modules, no_targets, run
#
# (none) Setup GOPATH and build in GOPATH mode using default Go version.
-# N.NN[-devel] Specify Go version
+# N.NN Specify Go version
# modules If the upstream uses Go modules, this can be set to build
# in modules-aware mode.
# no_targets Indicates that Go is needed at build time as a part of
@@ -16,6 +16,19 @@
# run Indicates that Go is needed at run time and adds it to
# RUN_DEPENDS.
#
+# Note about Go versions:
+# The use of a version specifier (i.e. go:N.NN) should be reserved only for
+# when a port absolutely cannot build with any other version. This is very
+# rare. If a port builds in both supported Go versions with just USES=go
+# (or USES=go:modules etc.), then stick with just USES=go and drop the version
+# specifier.
+#
+# Each go version is supported for about one year, so ports pinned to an
+# old version will have to be removed when its Go version is removed.
+#
+# DO NOT treat the version specified in go.mod as a hard requirement. In most
+# cases it's just a hint to the compiler.
+#
# You can set the following variables to control the process.
#
# GO_MODULE