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

invalid go version '1.22.0': must match format 1.23 #251

Open
chaksn opened this issue Feb 25, 2024 · 9 comments
Open

invalid go version '1.22.0': must match format 1.23 #251

chaksn opened this issue Feb 25, 2024 · 9 comments

Comments

@chaksn
Copy link

chaksn commented Feb 25, 2024

Issue Summary:
Encountering an error when attempting to install github.com/siderolabs/conform at version v0.1.0-alpha.28, while no such issue exists with version v0.1.0-alpha.27. Using Go version 1.13.

Expected Behavior:
Expecting to successfully install and use version v0.1.0-alpha.28 of github.com/siderolabs/conform.

Actual Behavior:
go install: github.com/siderolabs/conform/cmd/conform@latest (in github.com/siderolabs/[email protected]): go.mod:3: invalid go version '1.22.0': must match format 1.23

Additional Information:
Go version: 1.13
No such issue encountered with version v0.1.0-alpha.27.

Screenshot 2024-02-25 at 8 25 07 AM

@frezbo
Copy link
Member

frezbo commented Feb 25, 2024

Go 1.13 is too old to support new conform (basically newer go.mod patch version support)

@heismehrab
Copy link

I have the same error with Golang version 1.22.0 linux/amd64 . Any updates?

@frezbo
Copy link
Member

frezbo commented Mar 3, 2024

I have the same error with Golang version 1.22.0 linux/amd64 . Any updates?

not sure what's the issue, works for me:

❯ go install github.com/siderolabs/conform/cmd/conform@latest
go: downloading github.com/siderolabs/conform v0.1.0-alpha.30
~ took 5s119ms 
❯ go version
go version go1.22.0 linux/amd64
~~ 

@heismehrab
Copy link

It's strange, I cannot figure out the problem. I appreciate it if you share your ideas about it:

$ sudo go install github.com/siderolabs/conform/cmd/conform@latest

go: github.com/siderolabs/conform/cmd/conform@latest (in github.com/siderolabs/[email protected]): go.mod:3: invalid go version '1.22.0': must match format 1.23

in go.mod i set version 1.22

module bluh

go 1.22

@heismehrab
Copy link

Fixed, there was a problem with Go cache and it went well after cleaning the cache, Thanks.

@Dileesha-abilash
Copy link

Dileesha-abilash commented Apr 24, 2024

just changing the version in go.mod file works 1.xx.x to 1.xx

@stephenwhy
Copy link

just changing the version in go.mod file works 1.xx.x to 1.xx

Oh, my God, it works, but I don't see why it should work

@njupt99lee
Copy link

just changing the version in go.mod file works 1.xx.x to 1.xx

it works but why?

@mj3c
Copy link

mj3c commented Dec 6, 2024

First, check the Go version you have installed with go version.

If you are using Go 1.20 or older, your project's go.mod has to specify the version without the patch number, so for example go 1.19.

If you are using Go 1.21 or newer, your project's go.mod can specify the version with or without the patch number, both seem to work.

Hope this helps.

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

No branches or pull requests

7 participants