We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
go
1 parent 0d527b2 commit c74d634Copy full SHA for c74d634
go/extractor/project/project.go
@@ -212,6 +212,16 @@ func LoadGoModules(emitDiagnostics bool, goModFilePaths []string) []*GoModule {
212
if modFile.Toolchain == nil && modFile.Go != nil &&
213
!toolchainVersionRe.Match([]byte(modFile.Go.Version)) && semver.Compare("v"+modFile.Go.Version, "v1.21.0") >= 0 {
214
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)
225
}
226
227
0 commit comments