Varun Gandhi f703a67db9
goversion: Fix ProducerAfterOrEqual comparison for devel builds (#4234)
* goversion: Fix ProducerAfterOrEqual comparison for devel builds

The VersionAfterOrEqual function uses the versionedDevel constant
whereas ProducerAfterOrEqual used 0. This can cause inconsistency
when comparing the "same" version string in different situations.

One of the tests: TestRangeOverFuncNext/TestGotoA1 passes for
gotip due to two wrongs making a right. In particular, the use
of 1.26devel as the version ended up being treated as >= 1.26
because the code was using VersionAfterOrEqual.
However, the logic here was incorrectly using runtime.Version(),
which is logically wrong. It should instead use the Go version
used to compile the binary (the same in CI), and then use
ProducerAfterOrEqual (which would have given a different result).

So we also fix the check in TestGotoA1 to use p.BinInfo().Producer()
and ProducerAfterOrEqual().

* Undo change to use p.BinInfo().Producer()
2026-01-15 11:38:13 -05:00
..
2025-12-21 15:33:54 +01:00
2025-12-21 15:33:54 +01:00
2025-12-21 15:33:54 +01:00
2025-12-19 18:36:18 +01:00