Open dkegel-fastly opened 2 years ago
Indeed. Tinygo's runtime.Frame
type is not fully compatible with Go's runtime.Frame
type. It is missing several fields.
The best solution here is to move func (c Call) PC() uintptr
into a separate file that specifies a !tinygo
build tag.
Would you like to submit a PR for that?
I must have been smoking something. Fixing that one problem uncovers another one now:
stack_test.go:580:6: fn.FileLine undefined (type *runtime.Func has no field or method FileLine)
so maybe it's best to leave sleeping dogs lie for a bit, until the need for a fix is stronger.
Sure. Tinygo's runtime
package is quite a bit smaller than Go's, so any code that depends on runtime
is likely to have issues like this.
Following a rabbit hole of dependencies that starts at https://github.com/tinygo-org/tinygo/issues/2153, I noticed that
succeeds, but
fails with
That's
So for what it's worth, the deprecated function Call.PC() is causing tinygo build failure. Commenting it out lets tinygo test pass.