Page MenuHomePhabricator

[keyserver] Silence unused-promise Flow lint in backupDB
ClosedPublic

Authored by ashoat on Dec 4 2023, 1:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 8, 8:24 PM
Unknown Object (File)
Fri, Mar 14, 7:51 AM
Unknown Object (File)
Mar 10 2025, 2:40 PM
Unknown Object (File)
Feb 19 2025, 5:18 PM
Unknown Object (File)
Feb 19 2025, 5:18 PM
Unknown Object (File)
Feb 19 2025, 5:18 PM
Unknown Object (File)
Feb 19 2025, 5:18 PM
Unknown Object (File)
Feb 19 2025, 5:18 PM
Subscribers

Details

Summary

The async IIFE in backupDB contains two try-catch blocks that guarantee it will never reject.

As such, we're safe to ignore the unused-promise Flow lint. Our primary reason for enabling that Lint is to catch unhandled promise rejections within keyserver, but there is no potential of that here.

Regarding the void keyword: the Flow team recommends using the void keyword to silence the unused-promise Lint. See the "Fire-and-forget" part of this blog post.

Depends on D10177

Test Plan

Flow

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage