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

go1.23 support #4837

Closed
1 task done
ldez opened this issue Jun 21, 2024 · 14 comments
Closed
1 task done

go1.23 support #4837

ldez opened this issue Jun 21, 2024 · 14 comments
Assignees
Labels
enhancement New feature or improvement

Comments

@ldez
Copy link
Member

ldez commented Jun 21, 2024

EDIT: since v1.60.0 golangci-lint supports go1.23 🎉


golangci-lint is a free and open-source project built by volunteers.

If you value it, consider supporting us, we appreciate it! ❤️

Open Collective backers and sponsors GitHub Sponsors

support-golangci-lint-HD.mp4

Video created by a human (ldez) with Inkscape, Synfig, Kdenlive.


Is golangci-lint support go1.23?

No, and yes.

Basically, golangci-lint supports Go versions lower or equal to the Go version used to build it.

Go version (build) Supported Go versions (code) Not supported Go versions (code)
go1.21 <= go1.21 (go1.21, go1.20, etc.) > go1.21 (go1.22, go1.23, etc.)
go1.20 <= go1.20 (go1.20, go1.19, etc.) > go1.20 (go1.21, go1.22, etc.)

The current binaries from the releases page and the Docker images have been built with go1.22 and will be built with go1.22 as long as go1.23 is not GA.
So those binaries/images don't support go1.23 (new elements and internal Go changes).

https://golangci-lint.run/welcome/faq/#which-go-versions-are-supported

In addition, of the Go version used to build it, some linters could need to be updated to support newer versions of Go, and internal pieces of golangci-lint could also need to be updated.

You can follow the PR #4836 to see the progress on this topic.

Additional Notes

Some package systems (like homebrew, nix, etc.) are "slow" in propagating the new Go version.
After a new release of Go and golangci-lint, those systems can use an old Go version to compile golangci-lint resulting in a non-working binary (high memory usage, missing symbol, etc.).

In this situation, you can either use the official binaries, or compile it manually with the right Go version, or help those package systems to support this new Go version.

We are not responsible for package systems that don't use official binaries.

To see the Go version used to compile: golangci-lint version

$ golangci-lint version
golangci-lint has version 1.60.1 built with go1.23.0 from 3298c104 on 2024-08-14T01:15:05Z

  • staticcheck, gosimple, stylecheck: waiting for a release. details

Open Collective backers and sponsors GitHub Sponsors

@Zxilly

This comment was marked as outdated.

@Zxilly

This comment was marked as outdated.

@ldez

This comment was marked as outdated.

danail-branekov added a commit to cloudfoundry/korifi that referenced this issue Jul 18, 2024
Also, temporarily pin staticcheck to `2024.1rc1` until this becomes an
official release. See dominikh/go-tools#1578 (comment)

Now golangci-lint panics. It seems that it does not support 1.23 yet,
see golangci/golangci-lint#4837
Sounds like it is going to be the case until golang is oficially
released

Co-authored-by: Georgi Sabev <[email protected]>
akhilerm added a commit to akhilerm/containerd that referenced this issue Aug 11, 2024
@ldez
Copy link
Member Author

ldez commented Aug 13, 2024

Due to a problem (the Docker image docker.io/library/golang:1.23-alpine is not yet available) the release v1.60.0 has failed.

I will relaunch the release when the Docker image is available.


golangci-lint is a free and open-source project built by volunteers.

If you value it, consider supporting us, we appreciate it! ❤️

Open Collective backers and sponsors GitHub Sponsors

@DmitriyMV
Copy link

@ldez looks like 1.23-alpine is uploaded.

@ldez
Copy link
Member Author

ldez commented Aug 13, 2024

Only amd64 is partially available, and we need arm64 too.

$ docker pull golang:1.23-alpine
1.23-alpine: Pulling from library/golang
no matching manifest for linux/amd64 in the manifest list entries

$ docker pull golang:1.23       
1.23: Pulling from library/golang
no matching manifest for linux/amd64 in the manifest list entries

https://hub.docker.com/layers/library/golang/1.23-alpine/images/sha256-eb37f58646a901dc7727cf448cae36daaefaba79de33b5058dab79aa4c04aefb?context=explore

https://hub.docker.com/layers/library/golang/1.23/images/sha256-eb37f58646a901dc7727cf448cae36daaefaba79de33b5058dab79aa4c04aefb?context=explore

@ldez
Copy link
Member Author

ldez commented Aug 13, 2024

I am still waiting for the manifests to be available.

docker-library/official-images#17359 (comment)

https://oci.dag.dev/?image=golang:1.23.0

@ldez
Copy link
Member Author

ldez commented Aug 14, 2024

I'm cursed... now there is no space left on the CI... 😢

#12 importing to docker
#12 loading layer 985d869521fd 32.77kB / 290.88kB
#12 loading layer 9538b1dfedad 557.06kB / 73.97MB
#12 loading layer 9538b1dfedad 50.14MB / 73.97MB 2.0s
#12 loading layer 985d869521fd 32.77kB / 290.88kB 6.3s done
#12 loading layer 9538b1dfedad 53.48MB / 73.97MB 5.2s done
#12 ERROR: write /usr/local/go/src/crypto/internal/nistec/p256_asm_table.bin: no space left on device

#11 exporting to docker image format
#11 sending tarball 8.0s done
#11 ERROR: rpc error: code = Unknown desc = write /usr/local/go/src/crypto/internal/nistec/p256_asm_table.bin: no space left on device
------
 > exporting to docker image format:
------
------
 > importing to docker:
------
ERROR: failed to solve: rpc error: code = Unknown desc = write /usr/local/go/src/crypto/internal/nistec/p256_asm_table.bin: no space left on device

@ldez
Copy link
Member Author

ldez commented Aug 14, 2024

I used an action to remove useless elements inside the CI:

BEFORE CLEAN-UP:

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        73G   53G   21G  73% /

AFTER CLEAN-UP:

Filesystem      Size  Used Avail Use% Mounted on
/dev/root        73G   28G   45G  39% /

So we gain 24Go, which should fix the problem with the space during the release.
But I'm forced to create a v1.60.1.
The v1.60.0 is dead 😢.

It's 3:30 am for me, I've been on this release since 7:00 pm...
I will stay here until this release is done (and after sending all the announcements on social networks).

If you want to share my journey, I think I will launch a quick stream on Twitch https://www.twitch.tv/ldez_oss.

@ldez
Copy link
Member Author

ldez commented Aug 14, 2024

It's done 🎉

I hope you will enjoy this release.

It's 4:00 am so I will go to sleep 💤

@ozancaglayan
Copy link

Hi,

this is still an issue for me. Using go 1.23, and a golangci-lint 1.60.3 built with 1.23, memory usage peaks at available RAM and the process gets killed. I don't understand what's the current requirement to fix this.

Thanks

@nesselchen
Copy link

Hi there,
I just joined a new project "still" using go1.22.1 in their go.mod file. Locally however, I was already using 1.23.0.
golangci-lint itself was built on 1.22.1 as well. When running the linter on the project, I got "undefined" errors spanning the entire project, despite the project compiling just fine. downgrading go to 1.22.6 helped resolve the issue (I can't upgrade the project or recompile the linter)

If this incompatibility is intended, I would've greatly appreciated a message, instead of the incorrect error output.
Thanks!

@ozancaglayan
Copy link

In my case, v1.60.0 and v1.60.1 works fine, but not 1.60.3. Valid for both go 1.22 and go 1.23.

@ldez
Copy link
Member Author

ldez commented Aug 29, 2024

@ozancaglayan @nesselchen Can you open new issues? thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or improvement
Projects
None yet
Development

No branches or pull requests

5 participants