Skip to content
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

Update to Flow 0.47 #9815

Merged
merged 8 commits into from
Jun 1, 2017
Merged

Update to Flow 0.47 #9815

merged 8 commits into from
Jun 1, 2017

Conversation

iamdustan
Copy link
Contributor

I was going to give rebasing #8545 a try and seeing what breaks, but first catching up to latest release of Flow. The big change here is that function call arity is now strictly enforces.

https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/

Specific call outs:

  • Reverted flow’s understanding of getPooled and release variadic arguments with ...args: args
  • The Fiber implementation was passing arguments through that were not used in a few places.
  • ReactNative had a few issues with incomplete stubbed function typedefs. Fleshed those out enough for flow to be okay.
  • ReactDOMFiber had an issue with {is: is} as the second arg to createElement. ignored it with $FlowIssue
  • ReactDOMFiber every single createElement call was erroring because the entry string type was erroring when flowing into the more constrained types such as 'span' or 'th'|'td'. Got around it by changing the string type to the existential * type.

@@ -29,7 +29,7 @@ var validateCallback = require('validateCallback');
* @internal
*/
class CallbackQueue<T> {
_callbacks: ?Array<() => void>;
_callbacks: ?Array<(...args: any) => void>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's use mixed instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should I change all the anys to mixed?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Donesies.

@acdlite
Copy link
Collaborator

acdlite commented Jun 1, 2017

Also do you mind rebasing this on latest changes in master?

@iamdustan
Copy link
Contributor Author

Note that debugging why CI was failing I realized that one of the hydration context APIs did require an argument. It was typedef’d as any which appears to have caused flow to think it was unused (or a PR changing it landed in the past day or so)

97ec4ca

@acdlite acdlite merged commit 5f99a48 into facebook:master Jun 1, 2017
@acdlite
Copy link
Collaborator

acdlite commented Jun 1, 2017

Thank you!

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

Successfully merging this pull request may close these issues.

3 participants