-
-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Flow props #3428
WIP: Flow props #3428
Conversation
42de02d
to
06d3998
Compare
Hmm interesting! Can you say more about why this is likely needed for the upgrade? (Typical example, for the sake of making this thread relatively self-contained to understand:
The branch makes similar changes in a broad sweep across our codebase.) |
OK, I just spent a bit of time looking at the Flow aspect of #3422 (the RN upgrade), and I think I perhaps have some idea what led to this. At the tip of the branch, there are 188 errors, and 130 of them look like either this:
or similar with s/CP/SP/g. I noticed a while ago that the type for This looks like a new aspect of the same problem, with I guess new urgency. How about I take this one? It'll be made easier by the previous investigations I've done into this rather gnarly (and yet not even right) type. |
BTW a command I found handy for getting this kind of summary:
This runs Flow in JSON-output mode, and uses |
The Flow errors indeed are caused by Flow 0.89 and not React Native. https://github.com/facebook/flow/blob/master/Changelog.md
|
Actually, it was Flow 0.85 and this is more information: |
Ah excellent -- thanks for tracking down and posting those links! |
67e9be7
to
6533f36
Compare
Scanning through that changelog now. This in 0.84 is one that had been bugging me, and I'm happy to see is fixed:
That's the fix that surfaced the error fixed in yesterday's 0e8e9d0 "recipient: Cut unreachable nonsense
|
Oh, and this (in Flow 0.88) is very interesting:
They were always basically just as bad as |
I did a quick survey of which Flow version causes which error. Experimental method:
Results: (from master, 96f285f -- so this doesn't include the handful fixed yesterday) Flow 0.80One error:
This is the only error added up through Flow 0.84. Flow 0.85
This covers through 0.88. Flow 0.89One more:
... And that's it, all the way to Flow 0.92! |
The error surfaced in 0.89 is probably the React HOC change you linked to above. The one in 0.80, I don't see anything in the changelog that looks like an explanation of why it showed up then... but also the actual error is straightforward to understand and fix, so shrug. |
45ca1a4
to
eb55a3d
Compare
Hmm, I don't agree. |
Ah, OK then! Let's discuss that. I definitely think there's room to improve in that direction. Would you send a new PR for that? This thread has quite a bit of history already, which is almost all focused on the Flow situation, so I think it'll be easier to discuss in a new one anyway. Quick first thoughts, based on this version:
That doesn't mean it can't be worth it, but it means some discussion is needed of why it is. Also it'd be good to try to find variations that are less boilerplate. |
Good idea.
Also likely needed for RN 0.59 upgrade.