Skip to content

Unimplemented reflect.Value MethodByName() #3862

Open
@kefniark

Description

@kefniark

Description

Earlier today, I was trying to build one of the ebitengine example with tinygo (nothing complicated, the sample from their getting started).

go get github.com/hajimehoshi/ebiten/v2
go run -tags=example github.com/hajimehoshi/ebiten/v2/examples/rotate

The default generated wasm binary size is quite big ~9MB, and Tinygo seem to do a better job for that.
So I gave a try and the tinygo wasm build works fine, the size seems also quite promising ~2MB already 4x smaller.
Sadly I'm running into some reflection issue with the generated wasm file:

panic: unimplemented: (reflect.Value).MethodByName()
yourgame.tiny.wasm:0x211b Uncaught (in promise) RuntimeError: unreachable
    at runtime._panic (yourgame.tiny.wasm:0x211b)
    at (*text/template.state).evalField (yourgame.tiny.wasm:0xf11b2)
    at (*text/template.state).evalFieldChain (yourgame.tiny.wasm:0xeec1a)
    at (*text/template.state).evalFieldNode (yourgame.tiny.wasm:0xeea29)
    at (*text/template.state).evalPipeline (yourgame.tiny.wasm:0xef459)
    at (*text/template.state).walkIfOrWith (yourgame.tiny.wasm:0xf80e3)
    at (*text/template.state).walk (yourgame.tiny.wasm:0xf7106)
    at (*text/template.state).walk (yourgame.tiny.wasm:0xf71a1)
    at github.com/hajimehoshi/ebiten/v2/internal/builtinshader.Shader (yourgame.tiny.wasm:0xf8b00)
    at byn$mgfn-shared$github.com/hajimehoshi/ebiten/v2/internal/restorable.init#1$1 (yourgame.tiny.wasm:0x143a0e)

Versions

  • Ebitengine 2.5.6
  • Go 1.20
  • Tinygo 1.28.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestreflectionNeeds further work on reflection

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions