-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Slow Merging Inference #1570
Comments
I also got this error, turns out i have some module that depends recursively:
Fixed it by stopping the module to require each other |
@arypurnomoz how did you trace which module had cyclic dependency? I was using flow well till the latest release, and it never come out of |
i just removed all |
@arypurnomoz thanks. My issue was tons of dependencies in |
@bsr203 I made a tool specifically to help with this :) |
In my case I got a weird code a bit like this: const newThing = [
...something,
...Object.keys(obj).map((key) => return func(/* return an object */))
] Had to change to const stuff = Object.keys(obj).map((key) => return func(/* return an object */))
const newThing = [
...something,
...stuff
] to avoid the 5min stuck on "merging inference". Was not fun to debug but I did some dichotomie using flow [ignore] option to disable files and find the culprit. Then I disabled code in the file that was slowing down... Also I was doing "killall flow && flow" to be sure to have a new instance cause otherwise, I was not always able to get the slow "merging inference" step. |
I've had simple changes make flows inference process skyrocket a few times now. The lack of tools to diagnose this makes flow almost intolerable for me to use. Always worried I'll make it go crazy and be stuck in a lengthy process of trial and error. |
Has there been any progress on making Flow not throw it's hands up in anger when it runs into a circular dependency? I have two files that import each other to use constants, but Flow takes an eternity on the "merging inference" step. |
I had the same problem. It was on a very new project (a few files all under 20-30 lines long). Initialized flow and it was doing this for over 20 minutes until I cancelled it. |
@arypurnomoz It works! Thanks! |
Is this still relevant? |
It seems that my code is doing somethings weird for Flow, it used to work fine, but all the sudden it takes a long time (more than 10 minutes) to do the merging inference pass.
I could not find a way to verbose Flow, or to trace its execution to see what is going on. Does such option exists? How can I diagnose or see what it is doing that is taking so long?
The text was updated successfully, but these errors were encountered: