mirror of
https://github.com/go-delve/delve.git
synced 2026-01-21 00:11:01 +01:00
* 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()