canonical / lxd

Powerful system container and virtual machine manager
https://canonical.com/lxd
GNU Affero General Public License v3.0
4.38k stars 931 forks source link

Update DB generator to not use deprecated entities since go 1.22 #13970

Open tomponline opened 2 months ago

tomponline commented 2 months ago

DB generator use of the ast package has been deprecated in Go 1.22 https://tip.golang.org/doc/go1.22

The following declarations related to syntactic identifier resolution are now deprecated: Ident.Obj, Object, Scope, File.Scope, File.Unresolved, Importer, Package, NewPackage. In general, identifiers cannot be accurately resolved without type information. Consider, for example, the identifier K in T{K: ""}: it could be the name of a local variable if T is a map type, or the name of a field if T is a struct type. New programs should use the go/types package to resolve identifiers; see Object, Info.Uses, and Info.Defs for details.

https://tip.golang.org/doc/go1.22

tomponline commented 1 month ago

@masnax any news on this one? Thanks