go-isatty icon indicating copy to clipboard operation
go-isatty copied to clipboard

Incompatible with tinygo?

Open dkegel-fastly opened this issue 3 years ago • 1 comments

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/[email protected]/unix/syscall_unix.go:466:17: Exec not declared by package syscall
FAIL

dkegel-fastly avatar Jun 19 '22 18:06 dkegel-fastly

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

dankegel avatar Jun 19 '22 18:06 dankegel