-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Flow: inference_mode=constrain_writes #25422
Conversation
This mode is going to be the new default in Flow going forward. There was an unfortuante large number of suppressions in this update. More on the changes can be found in this [Flow blog post](https://medium.com/flow-type/new-flow-language-rule-constrained-writes-4c70e375d190). Added some of the required annotations using the provided codemod: ```sh node_modules/.bin/flow codemod annotate-declarations --write . ``` [ghstack-poisoned]
This mode is going to be the new default in Flow going forward. There was an unfortuante large number of suppressions in this update. More on the changes can be found in this [Flow blog post](https://medium.com/flow-type/new-flow-language-rule-constrained-writes-4c70e375d190). Added some of the required annotations using the provided codemod: ```sh node_modules/.bin/flow codemod annotate-declarations --write . ``` ghstack-source-id: 3372061ebb4f16f32aa93c0215a3f446adb8298b Pull Request resolved: facebook#25422
This mode is going to be the new default in Flow going forward. There was an unfortuante large number of suppressions in this update. More on the changes can be found in this [Flow blog post](https://medium.com/flow-type/new-flow-language-rule-constrained-writes-4c70e375d190). Added some of the required annotations using the provided codemod: ```sh node_modules/.bin/flow codemod annotate-declarations --write . ``` [ghstack-poisoned]
This mode is going to be the new default in Flow going forward. There was an unfortuante large number of suppressions in this update. More on the changes can be found in this [Flow blog post](https://medium.com/flow-type/new-flow-language-rule-constrained-writes-4c70e375d190). Added some of the required annotations using the provided codemod: ```sh node_modules/.bin/flow codemod annotate-declarations --write . ``` ghstack-source-id: a9f908c0062f03fef8b4e6056f9dc83ec6428db5 Pull Request resolved: facebook#25422
@@ -7,7 +7,7 @@ | |||
* @flow | |||
*/ | |||
|
|||
import * as React from 'react'; | |||
import type { Element } from './types';import * as React from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
formatting
This mode is going to be the new default in Flow going forward. There was an unfortuante large number of suppressions in this update. More on the changes can be found in this [Flow blog post](https://medium.com/flow-type/new-flow-language-rule-constrained-writes-4c70e375d190). Added some of the required annotations using the provided codemod: ```sh node_modules/.bin/flow codemod annotate-declarations --write . ``` [ghstack-poisoned]
@@ -316,6 +316,7 @@ function findCurrentUnmaskedContext(fiber: Fiber): Object { | |||
break; | |||
} | |||
} | |||
// $FlowFixMe[incompatible-type] we bail out when we get a null | |||
node = node.return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the behavior before? It looks like the FlowFixMe would now hide assignments from something that's not Fiber
or null
. But maybe that wasn't caught before either?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think generally a variable seems to have a more "fixed" type now. We might want to dig into the cases separetly, but I think the do { ... } while (node != null);
style isn't very easy to type right.
This mode is going to be the new default in Flow going forward. There was an unfortuante large number of suppressions in this update. More on the changes can be found in this [Flow blog post](https://medium.com/flow-type/new-flow-language-rule-constrained-writes-4c70e375d190). Added some of the required annotations using the provided codemod: ```sh node_modules/.bin/flow codemod annotate-declarations --write . ``` ghstack-source-id: 0b168e1b23f1305083e71d0b931b732e94705c73 Pull Request resolved: #25422
Stack from ghstack (oldest at bottom):
This mode is going to be the new default in Flow going forward.
There was an unfortuante large number of suppressions in this update.
More on the changes can be found in this Flow blog post.
Added some of the required annotations using the provided codemod:
node_modules/.bin/flow codemod annotate-declarations --write .