Clarification on the Compatibility Promise regarding Version Build Constraints

131 views
Skip to first unread message

Kevin Gillette

unread,
Oct 22, 2023, 11:08:09 AM10/22/23
to golang-nuts
Hello!

https://github.com/golang/go/issues/63662 was submitted as a bug report, but did not offer much explanation in its response, and it's still not clear how this is not a compatibility breakage.

> Build tags are explicitly designed to allow skew away from the main version declared in go.mod.

I haven't been able to find any documentation of this explicit design intent, but perhaps I've looked in the wrong places:
Neither of the above describe the interaction/selection mechanism between go.mod go directive values and version build tags.

Furthermore, https://go.dev/doc/go1compat does not mention build tags as a potential exception to the compatibility promise.

If there was a explicit design decision to have version build tags skew from the go directive version (in a way that could cause code to start failing to compile after merely upgrading the toolchain), and if it's already not documented somewhere I failed to find, then it would be a caveat to the compatibility promise that is probably worth explicitly spelling out.

Thank you!
Kevin Gillette
Reply all
Reply to author
Forward
0 new messages