Skip to content

go1.25 support #5872

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

Merged
merged 15 commits into from
Aug 13, 2025
Merged

go1.25 support #5872

merged 15 commits into from
Aug 13, 2025

Conversation

ldez
Copy link
Member

@ldez ldez commented Jun 11, 2025

This PR is to evaluate and prepare golangci-lint to go1.25

This PR will evolve during the beta and RC phases of go1.25.
The PR is a draft and will be rebased and modified several times during the RC phase.

https://go.dev/wiki/Go-Release-Cycle

Questions and problems related to go1.25 should be reported in the issue #5873.

Todo:

  • Update workflows
  • Update base Docker images
  • Update minimum Go version inside go.mod
  • Update gci standard packages list
  • Use new language features from go1.n-1
  • Update testdata tests

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

If you value it, please consider donating or asking your company to do so, we appreciate it! ❤️

  • Donate ❤️: 2€ /_$2 / 2£ / 350円 / 15元 / 100₴ / 200₽ / 1500원 / 12 B$ per month is important
  • Ask your company to donate (if needed, we can exchange by email: info at golangci dot com)

OSS are free to use but not free of work.

@ldez ldez added the enhancement New feature or improvement label Jun 11, 2025
@ldez ldez mentioned this pull request Jun 11, 2025
@ldez ldez force-pushed the feat/go1.25 branch 2 times, most recently from 0a66fbb to 63806dd Compare June 21, 2025 10:16
@ldez ldez force-pushed the feat/go1.25 branch 2 times, most recently from 5971d1c to 7889934 Compare July 12, 2025 15:22
@ldez ldez force-pushed the feat/go1.25 branch 2 times, most recently from 44a3470 to 7a2969f Compare August 12, 2025 09:14
@johnsonjh
Copy link

@ldez Go 1.25.0 has been released

@ldez
Copy link
Member Author

ldez commented Aug 12, 2025

I'm waiting for the official announcement.

The tag has been created there are 20 minutes.

@johnsonjh
Copy link

Website is updated - https://go.dev/doc/go1.25

… haven’t gotten email though

@ldez
Copy link
Member Author

ldez commented Aug 12, 2025

The GitHub Action environment is not ready yet.

@ldez ldez marked this pull request as ready for review August 12, 2025 21:30
@ldez
Copy link
Member Author

ldez commented Aug 12, 2025

The Docker images are not available yet:

And based on what I can see here, the images will not be available quickly.
I think this is related to an update of the base Alpine image used by official Docker images, and also an update to Debian Trixie.

@ldez
Copy link
Member Author

ldez commented Aug 12, 2025

🤔 either I use the Docker image of go1.25rc3 or I have to wait for the update of the official Docker image.

FYI, the Go Docker image is used to build golangci-lint Docker image, but doesn't impact the build of our binaries.

@ldez
Copy link
Member Author

ldez commented Aug 12, 2025

Based on my experience with the official Docker images, I think the current build stack within the Docker CI (due to the Alpine and Trixie update) will require a significant amount of time.

I will wait a bit and re-evaluate the situation in a few hours.

Note: currently it's midnight in my TZ.

@ldez
Copy link
Member Author

ldez commented Aug 13, 2025

The PR to create the official Go Docker image is open, but the Docker CI still has many elements in the queue.

So I will postpone the release of golangci-lint for now.

Note: currently it's 2 am in my TZ.

@ldez
Copy link
Member Author

ldez commented Aug 13, 2025

The Docker CI is still busy because of the update to Trixie.

And the PR about Go has not been merged yet.
I think they will merge the PR in a few hours (they are in the US time zone), but as the CI queue is full, it is difficult to say how much time it will take to have the Go Docker image.

@johnsonjh
Copy link

johnsonjh commented Aug 13, 2025

@ldez Looks like docker-library/official-images#19675 is closed now and docker-library/golang#568 is resolved. Still not yet pushed onto DockerHub though.

@ldez
Copy link
Member Author

ldez commented Aug 13, 2025

Please, I already follow the topic, I don't need extra notifications.

The merge of the Go PR is just the first step; now, the images must be built.

@ldez
Copy link
Member Author

ldez commented Aug 13, 2025

I'm used to this kind of situation with official images, so for me it's clear, but maybe it's not for everyone

The situation is exceptional (but it's a recurring topic) due to the release of a base element of multiple images (in this case, Debian Trixie).

The Docker team must build or rebuild most of the official Docker images (note: official Docker images process != DockerHub images process).

This produces a huge number of jobs in their CI.
The CI queue is full, and so the images will take several hours before being ready.

The DockerHub displays some versions, but they are not available: the updates of the image homepage are not correlated to the availability of the images.

To check the availability (all the architectures must appear and no errors):

$ docker manifest inspect golang:1.25-alpine
no such manifest: docker.io/library/golang:1.25-alpine
$ docker manifest inspect golang:1.25       
no such manifest: docker.io/library/golang:1.25

You can also check the tags (all the architectures must appear): https://hub.docker.com/_/golang/tags

@Gobd
Copy link

Gobd commented Aug 13, 2025

Just curious, but what is the issue with updating the Go version in the go.mod file (maybe it has to be the toolchain line?) which will control what version is used to build as far as I know. You can use any recent Docker image but specify Go 1.25 in the go.mod and that is what will be used to build. I suspect there must be some issue with that but maybe not.

@ldez
Copy link
Member Author

ldez commented Aug 13, 2025

#5872 (comment)

@erka
Copy link

erka commented Aug 13, 2025

It looks like the images are available

@ldez ldez added this to the v2-unreleased milestone Aug 13, 2025
@ldez ldez merged commit fca8610 into main Aug 13, 2025
18 checks passed
@ldez ldez deleted the feat/go1.25 branch August 13, 2025 20:36
@ldez
Copy link
Member Author

ldez commented Aug 13, 2025

I just took a few minutes to eat, and the images were available during this time.

@ldez
Copy link
Member Author

ldez commented Aug 13, 2025

The Docker images are still not available...

ERROR: failed to build: failed to solve: failed to resolve source metadata for docker.io/library/golang:1.25: no match for platform in manifest: not found

https://github.com/golangci/golangci-lint/actions/runs/16948897429/job/48036752940#step:10:183

I will re-launch the job later, when all the images from all architectures will be really available.

Note: currently it's closed to midnight in my TZ but I will stay up until the availability of the images and the release is done.

@golangci golangci locked and limited conversation to collaborators Aug 13, 2025
@ldez ldez modified the milestones: v2-unreleased, v2.4 Aug 14, 2025
@ldez
Copy link
Member Author

ldez commented Aug 14, 2025

It's 2 am: Golangci-lint v2.4.0 is available with go1.25 support.

I want to remind you that my only income is from donations:

The PR discussion is locked to centralize feedback on the issue.

Questions and problems related to go1.25 should be reported in the issue #5873.

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

Successfully merging this pull request may close these issues.

6 participants