Skip to content

Commit

Permalink
Merge pull request #16096 from github/mbg/go/revert-auto-version-fixing
Browse files Browse the repository at this point in the history
Go: Revert `go version` call in `LoadGoModules`
  • Loading branch information
mbg authored Apr 2, 2024
2 parents 6475034 + 55fa245 commit 48f9343
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions go/extractor/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,16 +212,6 @@ func LoadGoModules(emitDiagnostics bool, goModFilePaths []string) []*GoModule {
if modFile.Toolchain == nil && modFile.Go != nil &&
!toolchainVersionRe.Match([]byte(modFile.Go.Version)) && semver.Compare("v"+modFile.Go.Version, "v1.21.0") >= 0 {
diagnostics.EmitInvalidToolchainVersion(goModFilePath, modFile.Go.Version)

modPath := filepath.Dir(goModFilePath)

log.Printf(
"`%s` is not a valid toolchain version, trying to install it explicitly using the canonical representation in `%s`.",
modFile.Go.Version,
modPath,
)

toolchain.InstallVersion(modPath, modFile.Go.Version)
}
}

Expand Down

0 comments on commit 48f9343

Please sign in to comment.