Page MenuHomePhabricator

[Flow202][native][skip-ci] [4/x] Stop copy-pasting between ReactNav libdefs
ClosedPublic

Authored by ashoat on Nov 27 2023, 12:27 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 27, 5:51 PM
Unknown Object (File)
Oct 6 2024, 8:17 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 12 2024, 7:32 AM
Unknown Object (File)
Aug 28 2024, 7:50 AM
Subscribers
None

Details

Summary

In the past flow-typed did not allow importing from other libdefs, so we needed to copy-paste between React Navigation libdefs. This has been challenging because Flow is not always able to realize that the types match up. The new version of Flow was seeing a lot more errors due to issues matching up the copy-pasted types.

In this diff, we eliminate all copy-paste between these libdefs, opting instead to import from the @react-navigation/core libdef. This means that all types must now be sourced from @react-navigation/core, which necessitated some additional export declarations there, and a whole lot of changes to imports.

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 D9987

Test Plan

Confirm the Flow errors go away

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable