Skip to content

Flow: fix VirtualizedList issues, remove few no longer valid suppressions#30128

Closed
Simek wants to merge 3 commits into
facebook:masterfrom
Simek:fix-virtualizedlist-flow
Closed

Flow: fix VirtualizedList issues, remove few no longer valid suppressions#30128
Simek wants to merge 3 commits into
facebook:masterfrom
Simek:fix-virtualizedlist-flow

Conversation

@Simek
Copy link
Copy Markdown
Collaborator

@Simek Simek commented Oct 7, 2020

Summary

This PR fixes few suppressed Flow issues in VirtualizedList component.

I have also removed few no longer valid Flow suppressions in ActivityIndicator and ReactNativeTestTools.

Changelog

[General] [Fixed] - Flow: fix few issues in VirtualizedList,
[General] [Removed] - Flow: remove few no longer valid suppressions in ReactNativeTestTools

Test Plan

Successful run of yarn flow check.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 7, 2020
@Simek
Copy link
Copy Markdown
Collaborator Author

Simek commented Oct 7, 2020

I had to revert the ActivityIndicator suppression because Flow check fails on the CI (but work locally).

@cpojer This might be something to check out and verify. Is it possible that CI uses different version of Flow?

@analysis-bot
Copy link
Copy Markdown

analysis-bot commented Oct 7, 2020

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 0d02c60

@analysis-bot
Copy link
Copy Markdown

analysis-bot commented Oct 7, 2020

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,385,801 0
android hermes armeabi-v7a 7,013,117 0
android hermes x86 7,828,013 0
android hermes x86_64 7,717,499 0
android jsc arm64-v8a 9,532,102 0
android jsc armeabi-v7a 9,151,226 0
android jsc x86 9,396,778 0
android jsc x86_64 9,978,488 0

Base commit: 0d02c60

@Simek Simek force-pushed the fix-virtualizedlist-flow branch from 57a9a73 to 4f015b3 Compare October 9, 2020 10:56
@Simek Simek changed the title fix VirtualizedList Flow issues, remove few no longer valid Flow suppressions Flow: fix VirtualizedList issues, remove few no longer valid suppressions Oct 9, 2020
@safaiyeh safaiyeh added the Flow label Oct 9, 2020
Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lunaleaps has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

/* $FlowFixMe(>=0.125.1 site=react_native_fb) This comment suppresses an
* error found when Flow v0.125.1 was deployed. To see the error, delete
* this comment and run Flow. */
(node.instance &&
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are still flow errors when I imported this -- to fix, please change this to:

 (node.instance != null &&
        // $FlowFixMe[prop-missing] // Remove this after deleting `Touchable`
     typeof node.instance.touchableHandlePress === 'function'),

/* $FlowFixMe(>=0.125.1 site=react_native_fb) This comment suppresses an
* error found when Flow v0.125.1 was deployed. To see the error, delete
* this comment and run Flow. */
node => node.props && regex.exec(node.props.children),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this to

node => node.props != null && regex.exec(node.props.children) !== null,

@Simek
Copy link
Copy Markdown
Collaborator Author

Simek commented Feb 17, 2021

@lunaleaps Thank you for the review, I have applied the suggested changes.

Copy link
Copy Markdown
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lunaleaps has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Feb 19, 2021
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@lunaleaps merged this pull request in 927573c.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Flow Merged This PR has been merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants