You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the course of working on #2365, being a novice with OCaml I spent far too much time trying to debug this issue that I believe is an infinite loop.
To test my changes I was running make and then ./bin/flow coverage --color lib/node.js and the process would hang completely instead of outputting anything to the terminal. Running the same command on lib/dom.js did not produce this behavior.
I see the same behavior when running the same command with the v0.30 build so it doesn't seem to be a problem with the changes I was making at the time.
It appears to be an issue with the split_overlapping_ranges method.
The text was updated successfully, but these errors were encountered:
@avikchaudhuri I looked into this a little bit further and it looks like the problem is that split_overlapping_ranges doesn't account for loc1 range ending in the middle of loc2.
- else if loc1._end.offset = loc2._end.offset then+ else if loc1._end.offset <= loc2._end.offset then
Summary:
Some bug in our handling of locations in type tables violates an implicit
condition on emitted ranges: pairwise, they should either be nested or disjoint.
This causes the coverage implementation, which relies on that assumption to
split ranges, not terminate on certain inputs.
This diff doesn't fix the actual bug, but instead makes the coverage
implementation more rubust. It also adds a case to the type normalizer to make
declare modules not appear uncovered.
Fixes#2366Fixes#1962
Reviewed By: gabelevi
Differential Revision: D3796024
fbshipit-source-id: 7e87b10bb4c57ecfa20255ff2e2509406c5db1be
In the course of working on #2365, being a novice with OCaml I spent far too much time trying to debug this issue that I believe is an infinite loop.
To test my changes I was running
make
and then./bin/flow coverage --color lib/node.js
and the process would hang completely instead of outputting anything to the terminal. Running the same command onlib/dom.js
did not produce this behavior.I see the same behavior when running the same command with the
v0.30
build so it doesn't seem to be a problem with the changes I was making at the time.It appears to be an issue with the
split_overlapping_ranges
method.The text was updated successfully, but these errors were encountered: