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

orchestrate() returns vow #9701

Merged
merged 6 commits into from
Jul 16, 2024
Merged

orchestrate() returns vow #9701

merged 6 commits into from
Jul 16, 2024

Conversation

turadg
Copy link
Member

@turadg turadg commented Jul 12, 2024

follow up on #9449

Description

  • removes the temporary accommodation in which orchestrate returns a Promise instead of a Vow.
  • removes holder from ResolvedContinuingInvitation b/c the invitationMakers provide the ocaps
  • fixes orchestrate typedef to infer the return type from its arguments

Security Considerations

none

Scaling Considerations

none

Documentation Considerations

none

Testing Considerations

CI

Upgrade Considerations

not yet deployed

Copy link

cloudflare-workers-and-pages bot commented Jul 12, 2024

Deploying agoric-sdk with  Cloudflare Pages  Cloudflare Pages

Latest commit: 59229fa
Status: ✅  Deploy successful!
Preview URL: https://369560c8.agoric-sdk.pages.dev
Branch Preview URL: https://ta-return-vow.agoric-sdk.pages.dev

View logs

Copy link
Member

@mhofman mhofman left a 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
Copy link
Member

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) {

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better!

packages/async-flow/src/types.d.ts Show resolved Hide resolved
Comment on lines 82 to 83
// @ts-expect-error cast
hostFn(wrappedOrc, wrappedCtx, ...args);
Copy link
Member

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());
Copy link
Member

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.

Copy link
Member Author

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

@turadg turadg added the automerge:rebase Automatically rebase updates, then merge label Jul 15, 2024
@turadg turadg force-pushed the ta/return-vow branch 2 times, most recently from 881e4a8 to 2f04c0b Compare July 15, 2024 23:19
@turadg
Copy link
Member Author

turadg commented Jul 16, 2024

@Mergifyio requeue

Copy link
Contributor

mergify bot commented Jul 16, 2024

requeue

✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically

@mergify mergify bot merged commit ab4941a into master Jul 16, 2024
79 checks passed
@mergify mergify bot deleted the ta/return-vow branch July 16, 2024 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants