Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency between Remotable rules and InterfaceGuard pattern language #8231

Closed
erights opened this issue Aug 22, 2023 · 1 comment
Closed
Assignees

Comments

@erights
Copy link
Member

erights commented Aug 22, 2023

Now migrated to endojs/endo#1728 . Further discussion should happen there.


export const IterableEachTopicI = M.interface('IterableEachTopic', {
subscribeAfter: SubscriberI.methodGuards.subscribeAfter,
[Symbol.asyncIterator]: M.call().returns(
M.remotable('ForkableAsyncIterableIterator'),
),
});

Remotables are allowed to have symbol-named methods. (The particular case that is already important for us is Symbol.asyncIterator as we see here.)

InterfaceGuards are supposed to be Passable descriptions of the API of an exo, including the guards and methods used do the first level of input validation of the exo's methods. The InterfaceGuard uses a CopyRecord of method guards, where each property name of that CopyRecord is supposed to be the name of the method being described/guarded.

However, a CopyRecord can only have string-named properties. Therefore, there is currently no way for an InterfaceGuard to provide a MethodGuard for describing/guarding a symbol-named method.

@erights
Copy link
Member Author

erights commented Sep 12, 2023

Since endojs/endo#1728 is closed, I'm closing this one. However, note that agoric-sdk is not yet updated to depend on an endo incorporating this fix.

cc @gibson042

@erights erights closed this as completed Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant