Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dkegel-fastly opened this issue Oct 6, 2023 · 1 comment
Open
Labels
reflection Needs further work on reflection

Comments

@dkegel-fastly
Copy link
Contributor

dkegel-fastly commented Oct 6, 2023

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 [email protected]: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.

@deadprogram deadprogram added the reflection Needs further work on reflection label Oct 11, 2023
@dgryski
Copy link
Member

dgryski commented Oct 11, 2023

Adding support for reflection information for functions is unlikely to appear anytime soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reflection Needs further work on reflection
Projects
None yet
Development

No branches or pull requests

3 participants