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

fix: make eslint shut up about unhandled promises #5566

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

FUDCo
Copy link
Contributor

@FUDCo FUDCo commented Jun 10, 2022

Fixes #5535

@FUDCo FUDCo added SwingSet package: SwingSet hygiene Tidying up around the house labels Jun 10, 2022
@FUDCo FUDCo requested a review from warner June 10, 2022 02:17
@FUDCo FUDCo self-assigned this Jun 10, 2022
Copy link
Member

@warner warner left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for diving into this.

packages/SwingSet/src/kernel/kernel.js Show resolved Hide resolved
@@ -508,7 +508,7 @@ export function makeNetworkProtocol(protocolHandler) {
});

// Wire up the local protocol to the handler.
E(protocolHandler).onCreate(protocolImpl, protocolHandler);
void E(protocolHandler).onCreate(protocolImpl, protocolHandler);
Copy link
Member

Choose a reason for hiding this comment

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

@michaelfig is this right? Do we need to be more careful with a rejection from onCreate ?

Copy link
Member

Choose a reason for hiding this comment

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

No, making it an unhandled rejection is perfectly fine.

@@ -205,7 +205,7 @@ export function makePluginManager(pluginDevice, { D, ...vatPowers }) {
});

// Declare the first reset.
E(resetter).onReset(Promise.resolve(false));
void E(resetter).onReset(Promise.resolve(false));
Copy link
Member

Choose a reason for hiding this comment

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

@michaelfig same question here

Copy link
Member

Choose a reason for hiding this comment

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

Ditto.

@FUDCo FUDCo added the automerge:rebase Automatically rebase updates, then merge label Jun 10, 2022
@michaelfig michaelfig force-pushed the 5535-linty-fresh-promises branch from 81612f8 to 16a0589 Compare June 10, 2022 07:06
@mergify mergify bot merged commit 2f91702 into master Jun 10, 2022
@mergify mergify bot deleted the 5535-linty-fresh-promises branch June 10, 2022 07: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 hygiene Tidying up around the house SwingSet package: SwingSet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

swingset unhandled promise lint fixes
3 participants