Do not call EmitNewerGoVersionNeeded for v1.21+

This commit is contained in:
Michael B. Gale
2023-09-12 20:13:40 +01:00
parent c63f6807c4
commit 01a1d814f4

View File

@@ -788,7 +788,9 @@ func installDependenciesAndBuild() {
goVersionInfo := tryReadGoDirective(buildInfo)
if goVersionInfo.Found && semver.Compare("v"+goVersionInfo.Version, getEnvGoSemVer()) > 0 {
// This diagnostic is not required if the system Go version is 1.21 or greater, since the
// Go tooling should install required Go versions as needed.
if semver.Compare(getEnvGoSemVer(), "v1.21.0") < 0 && goVersionInfo.Found && semver.Compare("v"+goVersionInfo.Version, getEnvGoSemVer()) > 0 {
diagnostics.EmitNewerGoVersionNeeded()
}