Do we need patch version in x libs?

260 views
Skip to first unread message

Marcondes Viana de Oliveira Junior

unread,
Mar 6, 2026, 9:04:12 AMMar 6
to golang-nuts
Hi,

Does it really need to use the specific patch version?


go 1.25.0

This sometimes is annoying if not really necessary because if I'm importing it in my project go `mod tidy` will change from `go 1.25` to `go 1.25.0` even if I have (for example) go 1.25.6 in my machine.

Without the patch version it's always build with the latest version since I use `golang:1.25` Docker directive.

Not sure if I'm doing something wrong or it's not really necessary to pay attention to the patch version when build the application or it doesn't mater and will build 1.25.6 (version just as example since can change).

If it's ok would be nice to remove it from libs, and specify in services only when we have a case.

Sean Liao

unread,
Mar 6, 2026, 9:33:39 AMMar 6
to golang-nuts
If your compiler version is newer than the go version in the go.mod,
then the compiler version will be used.

"1.25" means the in development version (1.25 < 1.25rc1 < 1.25rc2 <
1.25.0 < 1.25.1).
It doesn't mean the newest version of go, it's the oldest.

Go's support policy covers starts when the .0 is released, that's why
golang.org/x uses it.

- sean
> --
> You received this message because you are subscribed to the Google Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/2d8c69d8-02e8-4b93-924a-7f794b204827n%40googlegroups.com.

Marcondes Viana

unread,
Mar 9, 2026, 5:24:28 PMMar 9
to Sean Liao, golang-nuts
Hi,

Sean, thanks for the explanation.

You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/YvtPv2iWSac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/CAGabyPpLdmadHB1-J6pk5AQhVENKnPUGjSUu3XdxGVHbBpmFhQ%40mail.gmail.com.


--
Best regards,
Marcondes Viana.

Wojciech Kaczmarek

unread,
Jun 18, 2026, 2:30:40 PM (5 days ago) Jun 18
to golang-nuts
I'd add to Sean's explanation:

The mechanism to include minor version number in the minimal Go version exists since 1.21.  Before, the expected format was indeed to use only major versions like 1.20 and then it wasn't meaning development, pre-rc version. Btw there is a lot of code around still not catching this.
Writing here as I realized there are opensource libraries by well-known folks who might have missed it, having old format in their go.mod files.

Marcondes Viana

unread,
Jun 19, 2026, 3:01:28 PM (4 days ago) Jun 19
to Wojciech Kaczmarek, golang-nuts
Thanks for the attention. Indeed looking at libs around I see this pattern. I work with multiservices and it's way more convenient to have 1.26 all around instead of some 1.26.3 and some 1.26.2. but makes total sense to me now. Thanks again.

Best regards,
Marcondes Viana.


You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/YvtPv2iWSac/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/2b7f4fe6-ede8-49dd-8837-84b63eb09a33n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages