Skip to content

Shorthand go.mod versions cause issues with shims/go script that impacts which version is selected #15

@andreimerlescu

Description

@andreimerlescu

When the go.mod file contains a go 1.24 instead of go 1.24.5 which is a proper Go version, the normal go binary handles this go.mod differently than igo, and the shim/go needs to be updated to reflect this normal go behavior in an igo manner as possible.

Therefore, in order to do this, the shims/go, which is an embedded shell script of the igo binary that gets installed on the host machine, this script needs to be updated to:

  1. Where we parse the found go.mod file for the version, we need to verify the format of the version itself. The bump package should be used to do this. A feature request 1 in the bump project. The bump -fix -gomod -in go.mod 1> /dev/null && bump -fix -gomod -in go.mod -write allows the && and exit code 1 of the bump pattern to protect the -fix and -write operations on the file.
  2. Once the go.mod file is corrected, the correct version should be selected and the go runtime internationally shouldn't try to take over the ~/go directory attempting to do an internal system update.

This issue is dependent on the bump getting fixed in order to fix the VERSION file of the go.mod file instead of using bash and sed.

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions