Skip to content

Commit 48f9343

Browse files
authored
Merge pull request #16096 from github/mbg/go/revert-auto-version-fixing
Go: Revert `go version` call in `LoadGoModules`
2 parents 6475034 + 55fa245 commit 48f9343

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

go/extractor/project/project.go

-10
Original file line numberDiff line numberDiff line change
@@ -212,16 +212,6 @@ func LoadGoModules(emitDiagnostics bool, goModFilePaths []string) []*GoModule {
212212
if modFile.Toolchain == nil && modFile.Go != nil &&
213213
!toolchainVersionRe.Match([]byte(modFile.Go.Version)) && semver.Compare("v"+modFile.Go.Version, "v1.21.0") >= 0 {
214214
diagnostics.EmitInvalidToolchainVersion(goModFilePath, modFile.Go.Version)
215-
216-
modPath := filepath.Dir(goModFilePath)
217-
218-
log.Printf(
219-
"`%s` is not a valid toolchain version, trying to install it explicitly using the canonical representation in `%s`.",
220-
modFile.Go.Version,
221-
modPath,
222-
)
223-
224-
toolchain.InstallVersion(modPath, modFile.Go.Version)
225215
}
226216
}
227217

0 commit comments

Comments
 (0)