Skip to content

cobra tests fail with "unimplemented: (reflect.Type).NumOut()" #3943

Open
@dkegel-fastly

Description

@dkegel-fastly

Redirecting from #2660 (comment)

Cobra's relatively popular, but doesn't seem to pass tests in tinygo 0.28.1 or 0.29.0, e.g.:

$ tinygo version
tinygo version 0.28.1 darwin/amd64 (using go version go1.20.7 and LLVM version 15.0.0)
$ git clone git@github.com:spf13/cobra.git
$ cd cobra
$ tinygo test ./...
go: downloading github.com/cpuguy83/go-md2man/v2 v2.0.2
go: downloading github.com/russross/blackfriday/v2 v2.1.0
panic: unimplemented: (reflect.Type).NumOut()
FAIL	github.com/spf13/cobra	0.330s
ok  	github.com/spf13/cobra/doc	0.304s
$ tinygo test --tags "pureno noasm appengine generic" ./...
panic: unimplemented: (reflect.Type).NumOut()

But we don't need an external package to trigger that error;
https://tinygo.org/docs/reference/lang-support/stdlib/ lists three standard library packages that fail similarly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    reflectionNeeds further work on reflection

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions