Page MenuHomePhabricator

[Flow202][electron-update-server][skip-ci] [3/3] Fix Flow issues in electron-update-server
ClosedPublic

Authored by ashoat on Nov 5 2023, 6:59 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 7, 1:07 AM
Unknown Object (File)
Tue, May 7, 1:07 AM
Unknown Object (File)
Tue, May 7, 1:06 AM
Unknown Object (File)
Tue, May 7, 12:54 AM
Unknown Object (File)
Mon, May 6, 10:13 PM
Unknown Object (File)
Sun, May 5, 4:40 AM
Unknown Object (File)
Thu, May 2, 3:07 PM
Unknown Object (File)
Wed, May 1, 7:24 PM
Subscribers

Details

Summary

There were three issues here:

  1. Hazel libdef was using Request/Response built-in types, which are incompatible with express$Request/express$Response. Changed it to use the latter.
  2. Flow was having trouble choosing between the variants of express$Middleware, so I explicitly typed the params of the middleware function.
  3. Flow wanted explicit type params for the express() invocation. Instead of providing them, I specified default type params in the libdef.
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 o f 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 D9717

Test Plan

Make sure all Flow errors in electron-node-server are resolved

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.Nov 5 2023, 7:10 AM
Harbormaster failed remote builds in B23760: Diff 32722!
ashoat requested review of this revision.Nov 5 2023, 7:53 AM
This revision is now accepted and ready to land.Nov 6 2023, 1:32 AM
ashoat retitled this revision from [Flow202][electron-update-server] [3/3] Fix Flow issues in electron-update-server to [Flow202][electron-update-server][skip-ci] [3/3] Fix Flow issues in electron-update-server.Nov 19 2023, 11:43 AM
This revision was landed with ongoing or failed builds.Nov 27 2023, 3:25 PM
This revision was automatically updated to reflect the committed changes.