Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible minimum golang version declared in go.mod #287

Closed
sboschman opened this issue Jan 24, 2024 · 1 comment · Fixed by #288
Closed

Incompatible minimum golang version declared in go.mod #287

sboschman opened this issue Jan 24, 2024 · 1 comment · Fixed by #288

Comments

@sboschman
Copy link

Change #280 depends on Value.Grow from the reflect package, this method was added in go 1.20

The new Value.Grow method extends a slice to guarantee space for another n elements.

The minimum go version required by the go-openapi runtime module is defined as 1.19 in go.mod.

This results in an error using v0.27 as dependency in a project compiled with go 1.19:

/go/pkg/mod/github.com/go-openapi/runtime@v0.27.0/csv.go:127:7: v.Grow undefined (type reflect.Value has no field or method Grow)

Perhaps the minimum required go version for go-openapi runtime should be bumped to at least 1.20 in go.mod. I see the tests run with the latest go version (1.21 atm), not sure if you want to go as far as to tests with different go versions (starting from the minimum required version as defined in go.mod) to spot this kind of dependencies on newer go versions.

@fredbi
Copy link
Member

fredbi commented Jan 24, 2024

Yes i realized that mistake yesterday.
Tests are against the 2 latest versions and go1.19 was missed. Will update go.mod to bump requirements

fredbi added a commit to fredbi/runtime that referenced this issue Jan 25, 2024
Now the producer uses a go1.19 idiom for reflect.

* fixes go-openapi#287

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
fredbi added a commit that referenced this issue Jan 25, 2024
Now the producer uses a go1.19 idiom for reflect.

* fixes #287

Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants