Open erights opened 3 months ago
not yet "fixed" https://github.com/endojs/endo/blob/mfig-o/packages/o/index.js#L44
it's not clear to me why this should be constrained by @endo/pass-style, though.
OTOH, I don't think I depend on using catch or finally here.
it's not clear to me why this should be constrained by @endo/pass-style, though.
What other excuse is there for not honoring method names of the target?
it's not clear to me why this should be constrained by @endo/pass-style, though.
What other excuse is there for not honoring method names of the target?
The excuse is that the target, in this case, is hidden behind a Promise facade. Arguably, users may want to deal with a node as if it is actually a promise already (node.catch(e => console.error(e))
seems idiomatic). Since I don't think either side of the argument is fully convincing, I'll leave it as an option, defaulting to just ['then']
.
@dckc, consider pulling the latest https://github.com/endojs/endo/blob/mfig-o/packages/o/index.js
https://github.com/Agoric/dapp-agoric-basics/blob/5d800a05eae8b77118ee9a8a27e2943fd91dee5c/contract/tools/ui-kit-goals/name-service-client.js#L42
This
pmethods
list is used to determine whether an invocation should be treated as calling a method on the target, or treated as a meta-level method for talking to the proxy about the target. However, onlythen
is special.catch
andfinally
may validly be in target's method names. @endo/pass-style only enforces that remotables cannot have their ownthen
method. It has no such rule forcatch
andfinally
.@michaelfig , I'm co-assigning this to you, because it looks like the origin is in your draft
o
package, where this likely also needs to be fixed. (Or is already fixed?)