Open dcalsky opened 1 year ago
I'm not sure there is an issue here (a bug in yaegi). It seems to be a question about how integrate the interpreter with the runtime. If you need to share data structures between the runtime and the interpreter, the best starting point is to look at on how the runtime symbols are exported to the interpreter, for example using yaegi extract
, and looking at the stdlib wrappers.
Regarding exporting interfaces, unfortunately more boilerplate is required due to the necessity of work around some Go reflect limitations.
I'm not sure there is an issue here (a bug in yaegi). It seems to be a question about how integrate the interpreter with the runtime. If you need to share data structures between the runtime and the interpreter, the best starting point is to look at on how the runtime symbols are exported to the interpreter, for example using
yaegi extract
, and looking at the stdlib wrappers.Regarding exporting interfaces, unfortunately more boilerplate is required due to the necessity of work around some Go reflect limitations.
OK, I'm going to try yaegi extract
The following program
sample.go
triggers an unexpected resultExpected result
Got
Yaegi Version
0.15.0
Additional Notes
go.mod
plugins/plugin1.go
pluginpkg/plugin.go: a common interface for main.go and plugin1.go
Output: