-
Notifications
You must be signed in to change notification settings - Fork 212
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
orchestrate() returns vow #9701
Conversation
Deploying agoric-sdk with Cloudflare Pages
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a partial skim through the type and behavioral change of the tools. LGTM, but I would prefer if we were less liberal with error suppression.
@@ -452,6 +453,7 @@ export const prepareAsyncFlowTools = (outerZone, outerOptions = {}) => { | |||
defineProperties(wrapperFunc, { | |||
length: { value: guestFunc.length }, | |||
}); | |||
// @ts-expect-error cast |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
curious, why not cast instead? actually couldn't we set the type at the definition above?
const wrapperFunc = {
/** @type {HostOf<F>} */
[hostFuncName](...args) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better!
packages/orchestration/src/facade.js
Outdated
// @ts-expect-error cast | ||
hostFn(wrappedOrc, wrappedCtx, ...args); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really a fan of error suppressions on whole lines that could have multiple errors.
@@ -121,7 +122,7 @@ test('send using arbitrary chain info', async t => { | |||
{ Send }, | |||
{ destAddr: 'hot1destAddr', chainName }, | |||
); | |||
await E(userSeat).getOfferResult(); | |||
await vt.when(E(userSeat).getOfferResult()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forget where we landed on aliasing heapVowE
to E
in tests. These are tests that we expect developers to write and vt.when(E(x).foo())
might be confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My gut says papering over this difference will be riskier. Let's see how it plays out
881e4a8
to
2f04c0b
Compare
@Mergifyio requeue |
✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically |
the rights are granted by the invitationMakers
follow up on #9449
Description
orchestrate
returns a Promise instead of a Vow.holder
from ResolvedContinuingInvitation b/c theinvitationMakers
provide the ocapsorchestrate
typedef to infer the return type from its argumentsSecurity Considerations
none
Scaling Considerations
none
Documentation Considerations
none
Testing Considerations
CI
Upgrade Considerations
not yet deployed