Repository navigation
Conversation
github.com/stretchr/objx v0.5.3 requires Go 1.20 (see https://github.com/stretchr/objx/blob/v0.5.3/go.mod), this bumps the minimum Go version to match and drops older versions from CI. Signed-off-by: Stephen Kitt <skitt@redhat.com>
|
This is interesting. I opened this a few weeks ago You are right that objx v0.53.0 requires Go 1.20 v0.52.0 was also expecting Go 1.20 https://github.com/stretchr/objx/blob/v0.52.0/go.mod#L3 all testify versions since v1.9.0 use objx 0.52.0 or 0.53.0 https://github.com/stretchr/testify/blob/v1.9.0/go.mod So since February 2024 the code is the master branch of testify, Go 1.20 seems to be the minimal version because of objx. I'm unsure why the test are passing. Maybe because Go tries anyway and objx doesn't use any feature that Go 1.17 wasn't supporting. objx is only used in mock, so it could be isolated in a submodule maybe. |
|
I've asked an agent to analyze the logic behind this. here is the results:
So I would say that it works for version between Go 1.17 and Go 1.20, so bumping Go minimal version doesn't seem necessary, and explain why it remained unnoticed. What do you think @skitt @dolmen @brackendawson |
Summary
This updates the required version of Go to 1.20
Changes
github.com/stretchr/objx v0.5.3 requires Go 1.20 (see https://github.com/stretchr/objx/blob/v0.5.3/go.mod), this bumps the minimum Go version to match and drops older versions from CI.
Motivation
There’s no real point in testing with versions older than 1.20 since objx expects 1.20. Given that objx doesn’t rely on any language feature newer than 1.17, 1.17-1.19 still work, so this is debatable of course. (At least, until the project bumps to Go 1.21 or later, which enforces transitive language level requirements.)