mattn / go-isatty

http://godoc.org/github.com/mattn/go-isatty
MIT License
832 stars 108 forks source link

Incompatible with tinygo? #73

Open dkegel-fastly opened 2 years ago

dkegel-fastly commented 2 years ago

Evidently zerolog 0.27 added colorization on windows by pulling in mattn/go-colorable, which in turn pulls in go-isatty. Great! Except that now zerolog can't be used with tinygo (on macos, at least, and possibly other operating systems).

At least part of the problem can be traced to go-isatty:

$ tinygo test
# golang.org/x/sys/unix
../../go/pkg/mod/golang.org/x/sys@v0.0.0-20220615213510-4f61da869c0c/unix/syscall_unix.go:466:17: Exec not declared by package syscall
FAIL
dankegel commented 2 years ago

On Linux, the symptom is slightly different. Tested with recent dev branch of tinygo:

$ tinygo test
tinygo:ld.lld: error: undefined symbol: golang.org/x/sys/unix.Syscall