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)
Tue, May 7, 1:08 AM
Unknown Object (File)
Tue, May 7, 1:07 AM
Unknown Object (File)
Tue, May 7, 1:07 AM
Unknown Object (File)
Tue, May 7, 12:54 AM
Unknown Object (File)
Wed, May 1, 5:50 PM
Unknown Object (File)
Tue, Apr 30, 6:35 PM
Unknown Object (File)
Sun, Apr 28, 4:40 PM
Unknown Object (File)
Fri, Apr 26, 8:03 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