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

Fix: workaround for using tools with no ge directive in their go.mod #156

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

Conversation

drornir
Copy link

@drornir drornir commented Nov 22, 2024

According to https://go.dev/ref/mod#go-mod-file-go, prior to Go 1.21, the go directive was option.
This seems to not be supported in bingo. This commit only changes the fallback value used when a go.mod file does not contain the version. This semantically means that any go version should be able to compile this.

I encountered the issue while trying to use bingo to install github.com/betacraft/easytags Their go.mod is completely empty, which causes a panic on

if semver.MustParse(targetModParsed.GoVersion()).GreaterThan(runnable.GoVersion()) {

get.go:723


Steps to recreate:

bingo get github.com/betacraft/easytags@latest

Thanks for the great tool!

According to https://go.dev/ref/mod#go-mod-file-go, prior to Go 1.21,
the go directive was option.
This seems to not be supported in bingo. This commit only changes the fallback value used when a go.mod file does not contain the version. This semantically means that any go version should be able to compile this.

I encountered the issue while trying to use bingo to install github.com/betacraft/easytags
Their go.mod is completely empty, which causes a panic on

if semver.MustParse(targetModParsed.GoVersion()).GreaterThan(runnable.GoVersion()) {

`get.go:723`
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.

1 participant