Skip to content

add support for go1.24 tools #60

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 2 commits into from
Feb 16, 2025
Merged

add support for go1.24 tools #60

merged 2 commits into from
Feb 16, 2025

Conversation

walteh
Copy link
Contributor

@walteh walteh commented Feb 5, 2025

For fun I was playing around with go v1.24rc2 and found this program didn't work with the new tool dependencies (release notes for reference). The problem seems to be that go list doesn't natively handle -u -m for modules specified as tools yet. So this is just a simple work around that lists the tools and then finds the version to update one by one.

I didn't extensively test this or anything, but it works for my needs right now - opening this PR in case this same thing comes in useful for anyone else.

Thanks for this project, btw!

@oligot
Copy link
Owner

oligot commented Feb 6, 2025

Hi,

Thanks for your contribution 👍

I heard great thinks about the new tool dependencies coming in Go 1.24 but haven't used them for now, as the stable version isn't out yet.
Despite that, it's great to see that you already made the necessary changes so that it works with go-mod-upgrade.

I see some small improvements in your PR (mainly code refactoring to remove duplicated code).
The fact that everything is still one "giant" main.go file is kind of scary from a maintenance perspective 😅 but it worked until now, but I think we should now start to refactor the code a bit to remove some duplication.
I could start from your PR and reduce the code duplication, and once done you could check on your side that everything still works as expected.

Is it ok for you ?

@walteh
Copy link
Contributor Author

walteh commented Feb 6, 2025

hi! for sure, that sounds great 😎

my focus was to make as few changes to the existing code as possible to try and prove the initial concept, so feel free to just use my code as a working reference

@oligot
Copy link
Owner

oligot commented Feb 16, 2025

Now that Go 1.24 has been released, I'm going to merge this as is (as it's working as expected) and introduce the code refactoring afterwards.
Thanks again for your contribution !

@oligot oligot merged commit c47e266 into oligot:main Feb 16, 2025
4 of 7 checks passed
@oligot
Copy link
Owner

oligot commented Feb 16, 2025

And it's available in the just released v0.11.0 🎉

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 this pull request may close these issues.

2 participants