aboutsummaryrefslogtreecommitdiffhomepage
path: root/testdata/errors/loader-nopackage.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2024-07-09 18:08:51 +0200
committerAyke <[email protected]>2024-07-13 13:26:26 +0200
commitd7773d3e86e82a64c79a04fa70f740daf333a3be (patch)
tree99361d45c7872f8da2d2c2e6fea55090942a9570 /testdata/errors/loader-nopackage.go
parentb04b690842f837aedc6d8187bb4a4200b0cc6acc (diff)
downloadtinygo-d7773d3e86e82a64c79a04fa70f740daf333a3be.tar.gz
tinygo-d7773d3e86e82a64c79a04fa70f740daf333a3be.zip
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.
Diffstat (limited to 'testdata/errors/loader-nopackage.go')
-rw-r--r--testdata/errors/loader-nopackage.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/testdata/errors/loader-nopackage.go b/testdata/errors/loader-nopackage.go
new file mode 100644
index 000000000..c0087fc0b
--- /dev/null
+++ b/testdata/errors/loader-nopackage.go
@@ -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