We've been using Flow in a fairly large codebase (flow says it parses 50344 files, including node modules), for a year or so. Unfortunately it's closed source so I can't share it.
In the last few weeks, Flow has started behaving strangely when I follow these steps:
flow stop && flow – it performs a check lasting several seconds, and eventually reports No errors!flow – now it reports a bunch of errors that weren't reported before (in various files, not necessarily connected to the one you edited).flow stop && flow again, and the errors go away.The errors appear to be real type errors in our code. So why didn't Flow notice them before? Some of these errors turn out to have existed in our codebase for months. They just never got reported until now, and still often don't get reported until seemingly random events. Then what's extra weird is, if we fix those errors and perform the above steps again, flow eventually finds more errors in other files, which it didn't report before. It's as if Flow is reaching some kind of internal limit on how many files it can traverse, and gives up after a while and just says No errors!
EDIT: just to clarify, running flow check also results in No errors!. The only way to see the errors is to run flow to get a server going, then edit a file to trigger a recheck, then run flow again to see the status. Also, if you do further no-change edits to other files, it sometimes finds even more errors in still other files.
I think im seeing similar issues. I had a code bug that should of been caught by flow, missing argument to a function that wasnt marked optional, and i get no errors.
Could you share your .flowconfig or making sure #5180?
I guess perhaps such behavior of the Flow seems similar to the issue above reported.
[ignore]
<PROJECT_ROOT>/dist/
[include]
<PROJECT_ROOT>/src/
[libs]
<PROJECT_ROOT>/flow-typed/
[options]
module.ignore_non_literal_requires=true
Mine's pretty trivial.
Thanks for sharing 🙏
But sorry in your case, the .flowconfig seems not a cause of the problem.
(At least to the caused I guessed)
Problems between @callumlocke 's one and @aikar 's possibly might be from another cause. 🤔
@aikar Did you receive an error which indicates missing argument when you edit something in the code?
Mine is:
[libs]
[options]
module.system.node.resolve_dirname=node_modules
module.system.node.resolve_dirname=app
experimental.const_params=true
emoji=true
[ignore]
.*/dist/.*
.*/.history/.*
.*/build/.*
.*/node_modules/react-motion/.*
.*/docker-output/.*
[version]
0.65.0
@kogai thanks for pointing me to #5180! I tried @bradennapier's trick (comment) by changing app to ./app and it worked. This has been driving me nuts, thank you.
Closing this one in favour of the other one.
Most helpful comment
@kogai thanks for pointing me to #5180! I tried @bradennapier's trick (comment) by changing
appto./appand it worked. This has been driving me nuts, thank you.Closing this one in favour of the other one.