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)
Sun, Oct 27, 5:51 PM
Unknown Object (File)
Oct 13 2024, 12:38 PM
Unknown Object (File)
Sep 28 2024, 10:52 PM
Unknown Object (File)
Sep 28 2024, 10:52 PM
Unknown Object (File)
Sep 28 2024, 10:48 PM
Unknown Object (File)
Sep 28 2024, 10:34 PM
Unknown Object (File)
Sep 9 2024, 6:31 AM
Unknown Object (File)
Sep 8 2024, 9:08 AM
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.