loader: handle go list errors inside TinyGo

Instead of exiting with an error, handle these errors internally.
This will enable a few improvements in the future.
This commit is contained in:
Ayke van Laethem
2024-07-09 18:08:51 +02:00
committed by Ayke
parent b04b690842
commit d7773d3e86
9 changed files with 95 additions and 9 deletions
+14
View File
@@ -0,0 +1,14 @@
package main
import (
_ "github.com/tinygo-org/tinygo/testdata/errors/non-existing-package"
_ "github.com/tinygo-org/tinygo/testdata/errors/non-existing-package-2"
)
func main() {
}
// ERROR: loader-nopackage.go:4:2: no required module provides package github.com/tinygo-org/tinygo/testdata/errors/non-existing-package; to add it:
// ERROR: go get github.com/tinygo-org/tinygo/testdata/errors/non-existing-package
// ERROR: loader-nopackage.go:5:2: no required module provides package github.com/tinygo-org/tinygo/testdata/errors/non-existing-package-2; to add it:
// ERROR: go get github.com/tinygo-org/tinygo/testdata/errors/non-existing-package-2