go.*: upgrade golang.org/x/tools to v0.30.0, Go to 1.22

Fixes #4884 by upgrading the ssa package.

The fix is in v0.26.0, which also bumps the minimum Go to 1.22. The
latest x/tools module still depending on 1.22 is v0.30.0.
This commit is contained in:
Elias Naur
2025-05-03 16:39:30 +02:00
committed by Ron Evans
parent edaf877056
commit c4ef38fbf9
4 changed files with 26 additions and 21 deletions
+3 -1
View File
@@ -8,7 +8,9 @@ import (
//
// The program must already be parsed and type-checked with the .Parse() method.
func (p *Program) LoadSSA() *ssa.Program {
prog := ssa.NewProgram(p.fset, ssa.SanityCheckFunctions|ssa.BareInits|ssa.GlobalDebug|ssa.InstantiateGenerics)
// TODO: re-enable SanityCheckFunctions when x/tools is upgraded to
// a version with a fix for https://golang.org/issues/73594.
prog := ssa.NewProgram(p.fset /*ssa.SanityCheckFunctions|*/, ssa.BareInits|ssa.GlobalDebug|ssa.InstantiateGenerics)
for _, pkg := range p.sorted {
prog.CreatePackage(pkg.Pkg, pkg.Files, &pkg.info, true)