You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if my complain makes sense or any of you are aware of this, but when I tried to use convert.MakeStarFn to construct a *starlark.Builtin object, I will use a user function that will return a Starlark.Value, and convert.MakeStarFn code will put another wrapper about that, which is not good.
To give a concrete example, here is snippet of my code:
fnSomeCtor = covert.MakeStarFn("constructor", func(foo int) (starlark.Value, error) {
// return my own object that implements starlark.Value
})
currently convert.toValue() doesn't let a starlark.Value to pass through unharmed, instead, I think the code wraps it into a GoInterface(?), which is not good, as the consumer (my part) will get confused.
Can you special-case for starlark.Value? thanks.
The text was updated successfully, but these errors were encountered:
chasehensel
added a commit
to chasehensel/starlight
that referenced
this issue
Jul 6, 2020
First of all, great code and I'm enjoying it!
Not sure if my complain makes sense or any of you are aware of this, but when I tried to use convert.MakeStarFn to construct a *starlark.Builtin object, I will use a user function that will return a Starlark.Value, and convert.MakeStarFn code will put another wrapper about that, which is not good.
To give a concrete example, here is snippet of my code:
fnSomeCtor = covert.MakeStarFn("constructor", func(foo int) (starlark.Value, error) {
// return my own object that implements starlark.Value
})
currently convert.toValue() doesn't let a starlark.Value to pass through unharmed, instead, I think the code wraps it into a GoInterface(?), which is not good, as the consumer (my part) will get confused.
Can you special-case for starlark.Value? thanks.
The text was updated successfully, but these errors were encountered: