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

swingset unhandled promise lint fixes #5535

Closed
warner opened this issue Jun 7, 2022 · 1 comment · Fixed by #5566
Closed

swingset unhandled promise lint fixes #5535

warner opened this issue Jun 7, 2022 · 1 comment · Fixed by #5566
Assignees
Labels
enhancement New feature or request SwingSet package: SwingSet
Milestone

Comments

@warner
Copy link
Member

warner commented Jun 7, 2022

I ran the new scripts/lint-with-types.js tool on swingset today, and here's a list of all the Promises that it thinks are not being fully handled:

node ➜ ~/agoric-sdk/packages/SwingSet $ ../../scripts/lint-with-types.sh
yarn run v1.22.17
$ yarn lint:types&&yarn lint:eslint
$ tsc --maxNodeModuleJsDepth 3 -p jsconfig.json
$ eslint .

/home/node/agoric-sdk/packages/SwingSet/misc-tools/measure-metering/measurement-target.js
  68:7  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/home/node/agoric-sdk/packages/SwingSet/src/kernel/kernel.js
  266:7  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/home/node/agoric-sdk/packages/SwingSet/src/kernel/vat-loader/manager-nodeworker.js
  67:7  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/home/node/agoric-sdk/packages/SwingSet/src/liveslots/watchedPromises.js
   83:9   warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  117:11  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  173:5   warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/home/node/agoric-sdk/packages/SwingSet/src/vats/network/network.js
  335:11  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  511:3   warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/home/node/agoric-sdk/packages/SwingSet/src/vats/plugin-manager.js
  157:11  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  184:11  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  208:7   warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/home/node/agoric-sdk/packages/SwingSet/src/vats/vattp/vat-vattp.js
  131:9  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/home/node/agoric-sdk/packages/SwingSet/test/basedir-promises-2/bootstrap.js
  14:9  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  29:9  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/home/node/agoric-sdk/packages/SwingSet/test/basedir-promises-3/vat-right.js
  12:7  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/home/node/agoric-sdk/packages/SwingSet/test/basedir-promises/bootstrap.js
  13:9  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  14:9  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  40:9  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/home/node/agoric-sdk/packages/SwingSet/test/device-plugin/test-device.js
  81:3  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  97:3  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/home/node/agoric-sdk/packages/SwingSet/test/gc-device-transfer/bootstrap-gc.js
  19:7  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/home/node/agoric-sdk/packages/SwingSet/test/test-liveslots.js
  222:9  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/home/node/agoric-sdk/packages/SwingSet/test/test-network.js
   91:9  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  182:9  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/home/node/agoric-sdk/packages/SwingSet/test/test-queue-priority.js
  10:5  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/home/node/agoric-sdk/packages/SwingSet/test/workers/vat-target.js
  60:5  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

/home/node/agoric-sdk/packages/SwingSet/tools/vat.js
  54:7  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  58:7  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises
  63:1  warning  Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator  @typescript-eslint/no-floating-promises

✖ 34 problems (0 errors, 34 warnings)

We should fix these.

@warner warner added enhancement New feature or request SwingSet package: SwingSet labels Jun 7, 2022
@warner warner self-assigned this Jun 7, 2022
@warner
Copy link
Member Author

warner commented Jun 8, 2022

As we fix these, let's make a note here about whether they highlighted actual bugs, or if this is just busywork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SwingSet package: SwingSet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants