Closed dkegel-fastly closed 1 year ago
The spew import comes in via testify.
I think this was fixed with https://github.com/tinygo-org/tinygo/pull/3111, can you check whether this bug is still present?
~/go/src/github.com/davecgh/go-spew/spew $ go mod init
go: creating new go.mod: module github.com/davecgh/go-spew/spew
go: to add module requirements and sums:
go mod tidy
~/go/src/github.com/davecgh/go-spew/spew $ tinygo test
panic: unimplemented: (reflect.Type).FieldByName()
FAIL github.com/davecgh/go-spew/spew 0.556s
~/go/src/github.com/davecgh/go-spew/spew $ tinygo test -tags=safe
panic: unimplemented: (reflect.Value).UnsafePointer()
FAIL github.com/davecgh/go-spew/spew 0.474s
spew
now works when built with -tags=safe
.
This is part of the v0.28
release so now closing this issue. Thanks!
Someone wanted to try yenc, so I tried building it. Its tests plotz[1] on reflect.NewAt. The call to NewAt comes via an import of an old version of github.com/davecgh/go-spew/spew.
The current version of spew doesn't use NewAt, but its tests still fail like this:
Using -tags safe gets further:
[1] https://www.dictionary.com/e/word-of-the-day/plotz-2020-12-15/