Skip to content

How can I make go pick the right version when using 'dev'? #876

Answered by jhheider
fredrikaverpil asked this question in Help
Discussion options

You must be logged in to vote
dependencies:
  go.dev: ~1.17 # or, e.g., =1.17.2

looking at

pkgx/src/utils/devenv.ts

Lines 57 to 61 in 7a488fd

case "go.mod":
case "go.sum":
pkgs.push({project: "go.dev", constraint})
await read_YAML_FM(path)
break
, pkgx only adds go.dev: '*', but doesn't parse go.mod. personally, i'm torn as to whether that is strictly a good move. while go.mod does define a go version, it's often possible it work with other go versions, and i can definitely see developers wanting to be able to switch/test more easily. usually, when in doubt, we err on the side of user-configurability.

what do you think? is the ability to set complex version requirements using pkgx.…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@fredrikaverpil
Comment options

@jhheider
Comment options

@fredrikaverpil
Comment options

@jhheider
Comment options

@mycrEEpy
Comment options

Answer selected by fredrikaverpil
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
4 participants