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

Remove toolchain #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

SuperSandro2000
Copy link

With go 1.21 the controversial toolchain directive got introduced which forces downstream consumers of libraries to needlessly change their go compiler version with no way to ignore it on an application level without go mod tidy and various tools and linters silently failing. I am of the opinion that libraries shouldn't really set a toolchain to allow consumers to be not bothered by it.

@dhui
Copy link
Owner

dhui commented Sep 23, 2024

@SuperSandro2000 Thanks for the PR!

I believe that toolchain was added when I ran go get or go mod tidy so this directive will likely reappear after its been removed. How are you automatically preventing the toolchain directive from being re-added? Keeping this directive out of go.mod isn't something I want to manually manage.

I am of the opinion that libraries shouldn't really set a toolchain to allow consumers to be not bothered by it.

FWIW, I mostly agree. If the library doesn't have any such requirements, it shouldn't impose them. e.g. uses language/toolchain features in newer versions

@SuperSandro2000
Copy link
Author

There is currently no way to prevent this being re-added. We kinda fight against it all the time ourselves.

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