Page MenuHomePhabricator

[native] [10/40] RN 0.70: Flow update
ClosedPublic

Authored by ashoat on Dec 17 2022, 7:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, May 3, 5:49 PM
Unknown Object (File)
Fri, May 3, 5:48 PM
Unknown Object (File)
Fri, May 3, 5:47 PM
Unknown Object (File)
Fri, May 3, 5:47 PM
Unknown Object (File)
Fri, May 3, 5:47 PM
Unknown Object (File)
Fri, May 3, 5:47 PM
Unknown Object (File)
Fri, May 3, 5:47 PM
Unknown Object (File)
Fri, May 3, 5:47 PM
Subscribers

Details

Summary

The .flowconfig and package.json changes come from React Native Upgrade Helper. The rest fix Flow errors uncovered by the update.

Historically I've split up Flow changes for a React Native upgrade, but this time there weren't too many!

Depends on D5903

Test Plan

Ran flow and also tested along with whole stack: test plan

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.Dec 17 2022, 7:53 PM
Harbormaster failed remote builds in B14233: Diff 19467!
native/.flowconfig
8 ↗(On Diff #19467)

Had to add this

native/calendar/calendar.react.js
200 ↗(On Diff #19467)

Flow errors exposed that we were doing this wrong

native/flow-typed/npm/react-native-reanimated_v2.x.x.js
38 ↗(On Diff #19467)

Flow didn't like that I was "shadowing" other names on line 487, so I had to change this

native/navigation/disconnected-bar.react.js
29 ↗(On Diff #19467)

Flow caught a bug here!

native/navigation/tab-bar.react.js
23 ↗(On Diff #19467)

And here!

patches/react-native-firebase+5.6.0.patch
270–273 ↗(On Diff #19467)

We had this hack here before to trick Flow into not giving errors, but it's actually not typed correctly. I fixed the type up to actually be correct this time

Please ignore CI until the end of the stack

Fix new Flow error in web/electron.js

tomek added inline comments.
native/media/file-utils.js
158–162 ↗(On Diff #19616)

I'm fine with this new version, but just curious: was it required by a new version of Flow?

This revision is now accepted and ready to land.Dec 19 2022, 8:56 AM
native/media/file-utils.js
158–162 ↗(On Diff #19616)

Yes it was. Flow was afraid that the console.log might have some side effect and so newLocalURI could become falsey somehow

This revision was landed with ongoing or failed builds.Dec 20 2022, 12:00 PM
This revision was automatically updated to reflect the committed changes.