-
Notifications
You must be signed in to change notification settings - Fork 926
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
9 changed files
with
95 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package importcycle | ||
|
||
import _ "github.com/tinygo-org/tinygo/testdata/errors/importcycle" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ppackage // syntax error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package main | ||
|
||
import _ "github.com/tinygo-org/tinygo/testdata/errors/importcycle" | ||
|
||
func main() { | ||
} | ||
|
||
// ERROR: package command-line-arguments | ||
// ERROR: imports github.com/tinygo-org/tinygo/testdata/errors/importcycle | ||
// ERROR: imports github.com/tinygo-org/tinygo/testdata/errors/importcycle: import cycle not allowed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package main | ||
|
||
import _ "github.com/tinygo-org/tinygo/testdata/errors/invaliddep" | ||
|
||
func main() { | ||
} | ||
|
||
// ERROR: invaliddep/invaliddep.go:1:1: expected 'package', found ppackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ppackage // syntax error | ||
|
||
// ERROR: loader-invalidpackage.go:1:1: expected 'package', found ppackage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |