Page MenuHomePhabricator

[Flow202][keyserver][skip-ci] [24/x] Address missing-local-annot type errors
ClosedPublic

Authored by ashoat on Nov 13 2023, 3:26 PM.
Tags
None
Referenced Files
F3388269: D9873.diff
Fri, Nov 29, 1:27 PM
Unknown Object (File)
Tue, Nov 26, 8:45 AM
Unknown Object (File)
Tue, Nov 26, 6:27 AM
Unknown Object (File)
Mon, Nov 25, 4:57 AM
Unknown Object (File)
Sat, Nov 23, 6:09 PM
Unknown Object (File)
Fri, Nov 22, 3:28 AM
Unknown Object (File)
Tue, Nov 12, 7:14 PM
Unknown Object (File)
Mon, Nov 11, 11:13 AM
Subscribers
None

Details

Summary

The new version of Flow wants more annotations for function and member definitions. This diff adds all of the required annotations to the keyserver codebase necessary to clear all missing-local-annot errors. This is the keyserver equivalent of D9771 (web) and D9697 (lib).

NOTE: CI will fail on this diff. I considered the possibility of fixing Flow errors BEFORE upgrading Flow, but it wasn't possible... in some cases, the fixes to support the new version of Flow caused errors in the old version. I could have hidden these type errors with $FlowFixMe lines and then later revert those, but that seemed like too much busy work.

Depends on D9872

Test Plan

Confirm the Flow errors go away

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Nov 13 2023, 3:46 PM
Harbormaster failed remote builds in B24090: Diff 33189!
tomek added inline comments.
keyserver/src/socket/socket.js
827

Depending on how often we use it, we can consider introducing a generic type for debounce to our utils

This revision is now accepted and ready to land.Nov 14 2023, 8:54 AM
keyserver/src/socket/socket.js
827

While we import it from four files, this is the only file we'll need to type it this way (including { +cancel: () => void }). There's one other place we use cancel, but it's from a React functional component, and Flow is able to deduce the type correctly from our lodash libdef

ashoat retitled this revision from [Flow202][keyserver] [24/x] Address missing-local-annot type errors to [Flow202][keyserver][skip-ci] [24/x] Address missing-local-annot type errors.Nov 19 2023, 5:11 PM