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

[packages] Recommend go from devbox index #1059

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

Conversation

mauricioabreu
Copy link
Contributor

That would let Devbox handle which specific Nix package to use instead of making the user figure it out

Summary

When using go 1.20 (go mod), it recommends the default version go_1_19. We could add 1_20 to the list but I feel like always running behind.

How was it tested?

That would let Devbox handle which specific Nix package
to use instead of making the user figure it out
"1.19": "go_1_19",
"1.18": "go",
"1.17": "go_1_17",
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason we had these versions was that in nixpkgs, these versions were available. Right now we also index older hashes of nixpkgs as far back as [email protected] you can see that by doing devbox search go.
If we don't have this versionMap, there will be an (unlikely) edge case where a user can have go version 1.12 which gets parsed but will see an error package not found.
So, imo, we should have a map of supported versions (1.20 to 1.13) and default to 1.20 in the case of the user's goVersion not being in the map.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, we can also handle this by showing a specific error message (e.g., "go version not supported please use devbox search go to see a list of supported versions)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants