Skip to content
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

panic: compiler: could not store type code number inside interface type code #3090

Closed
tucnak opened this issue Aug 23, 2022 · 4 comments
Closed
Labels
reflection Needs further work on reflection

Comments

@tucnak
Copy link

tucnak commented Aug 23, 2022

No idea what this this does as there's no verbose mode.

I've been trying to build gioui/kitchen for wasm when this occured after 10 or so minutes of tinygo build flaming at full power:

Steps to reproduce:

git clone https://git.sr.ht/~eliasnaur/gio-example ge
cd ge/kitchen
tinygo build -o main.wasm -target wasm .

I had to do a little fix for gioui/app/datadir.go to basically silently get rid of os.UserConfigDir missing in tinygo.

But aside from that it's supposed to be fine, I think.

panic: compiler: could not store type code number inside interface type code

goroutine 520 [running]:
github.com/tinygo-org/tinygo/transform.LowerReflect({0x600000008040?})
	/Users/runner/work/tinygo/tinygo/transform/reflect.go:187 +0x978
github.com/tinygo-org/tinygo/transform.Optimize({0xc011acadf0?}, 0xc00028e450, 0x2, 0x0?, 0x5)
	/Users/runner/work/tinygo/tinygo/transform/optimizer.go:119 +0x39e
github.com/tinygo-org/tinygo/builder.optimizeProgram({0x60004ed76020?}, 0xc00028e450)
	/Users/runner/work/tinygo/tinygo/builder/build.go:1100 +0x20d
github.com/tinygo-org/tinygo/builder.Build.func5(0xc015a4c000)
	/Users/runner/work/tinygo/tinygo/builder/build.go:561 +0x5ed
github.com/tinygo-org/tinygo/builder.runJob(0xc015a4c060, 0x0?)
	/Users/runner/work/tinygo/tinygo/builder/jobs.go:222 +0x4f
created by github.com/tinygo-org/tinygo/builder.runJobs
	/Users/runner/work/tinygo/tinygo/builder/jobs.go:123 +0x5db
@deadprogram deadprogram added the reflection Needs further work on reflection label Aug 25, 2022
@aykevl
Copy link
Member

aykevl commented Sep 8, 2022

This issue consists of two separate issues.

I've been trying to build gioui/kitchen for wasm when this occured after 10 or so minutes of tinygo build flaming at full power:

This is the first issue. My guess is that it's an issue with interp, but it could also be #3019. Hard to know without digging into it.

panic: compiler: could not store type code number inside interface type code

This is the second issue. It will be fixed by #2640.

@tucnak
Copy link
Author

tucnak commented Sep 8, 2022

Is there anything I can help with triage-wise, some debug information to share, perhaps? I'm not sure whether if this is platform dependent, as I'm rocking an arm64 darwin— is where the issue occurred initially.

@dgryski
Copy link
Member

dgryski commented Mar 22, 2023

The new reflect work is in and should fix this issue.

@dgryski dgryski added the next-release Will be part of next release label Mar 22, 2023
@deadprogram deadprogram removed the next-release Will be part of next release label Jun 14, 2023
@deadprogram
Copy link
Member

This is part of the v0.28 release so now closing this issue. Thanks!

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

4 participants