loader: load packages using Go modules

This commit replaces the existing ad-hoc package loader with a package
loader that uses the x/tools/go/packages package to find all
to-be-loaded packages.
This commit is contained in:
Ayke van Laethem
2020-05-04 23:15:02 +02:00
parent 51daa2a044
commit 25e13d887f
6 changed files with 196 additions and 293 deletions
+1 -1
View File
@@ -714,7 +714,7 @@ func printCompilerError(logln func(...interface{}), err error) {
}
}
case loader.Errors:
logln("#", err.Pkg.ImportPath)
logln("#", err.Pkg.PkgPath)
for _, err := range err.Errs {
logln(err)
}