facebookarchive / ide-flowtype

Flow support for Atom IDE
Other
178 stars 17 forks source link

Flow is going out to lunch #50

Open mattcollier opened 6 years ago

mattcollier commented 6 years ago

Hour 5 of adding type annotations to an existing node project.

I'm finding that I just stop seeing Flow diagnostic messages and have to reload the window with Ctrl+Shift+F5 to get it Flow going again. When this happens I see no errors in the developer console. How does one go about debugging an issue like this?

Atom: 1.23.1 OS: Debian 9

rhysforyou commented 6 years ago

I've noticed the same issue on macOS 10.13.2 with Atom 1.23.2

mattcollier commented 6 years ago

I found a clue as to what is happening. I found that there are logs being generated in my system temp folder /tmp on Linux in a folder called flow.

Evidently there are logs being generated in that folder that are name spaced by the folder that is being monitored. If you look in the .log file corresponding to your atom project you can find information that appears to be generated by the flow binary. Notably, it outputs the flow version which in my case is 0.62.0

I deleted all my logs, started atom on my flowtyped project, then tried to create a problem by introducing syntax errors in my flow type annotations. I was quickly able to get flow to stop generating linter errors and I see at the end of my .log file:

[2018-01-05 13:25:15] Merge prep
[2018-01-05 13:25:15] to_merge: Focused: 1, Dependents: 1, Dependencies: 0
[2018-01-05 13:25:15] Calculating dependencies
[2018-01-05 13:25:15] Merging
[2018-01-05 13:25:15] sending (2 errors) and (warnings from 0 files) to 0 subscribed clients (of 0 total)
[2018-01-05 13:25:15] sending (4 errors) and (warnings from 0 files) to 0 subscribed clients (of 0 total)
[2018-01-05 13:25:15] Done
[2018-01-05 13:25:15] Checked set: Focused: 5, Dependents: 0, Dependencies: 0
[2018-01-05 13:25:15] sending (44 errors) and (warnings from 3 files) to 0 subscribed clients (of 0 total)
Unhandled exception: Not_found
Raised at file "list.ml", line 183, characters 16-25

So far, I have been unable to locate a file list.ml. From my .atom/packages folder I did find -name list.ml which did not turn up anything. I have also cloned flow-language-server and flow and cannot find the file there either. So maybe this is a temporary file being created somewhere?

@rpowelll do you see a similar unhandled exception in your .log file?

hansonw commented 6 years ago

Oh, nice! Flow is written in OCaml and list.ml is part of the OCaml stdlibs; you've likely discovered an issue in Flow. I'd check the issues in facebook/flow to see if anyone else has found that particular exception.

On Fri, Jan 5, 2018 at 10:58 AM mattcollier notifications@github.com wrote:

I found a clue as to what is happening. I found that there are logs being generated in my system temp folder /tmp on Linux in a folder called flow.

Evidently there are logs being generated in that folder that are name spaced by the folder that is being monitored. If you look in the .log file corresponding to your atom project you can find information that appears to be generated by the flow binary https://github.com/facebook/flow. Notably, it outputs the flow version which in my case is 0.62.0

I deleted all my logs, started atom on my flowtyped project, then tried to create a problem by introducing syntax errors in my flow type annotations. I was quickly able to get flow to stop generating linter errors and I see at the end of my .log file:

[2018-01-05 13:25:15] Merge prep [2018-01-05 13:25:15] to_merge: Focused: 1, Dependents: 1, Dependencies: 0 [2018-01-05 13:25:15] Calculating dependencies [2018-01-05 13:25:15] Merging [2018-01-05 13:25:15] sending (2 errors) and (warnings from 0 files) to 0 subscribed clients (of 0 total) [2018-01-05 13:25:15] sending (4 errors) and (warnings from 0 files) to 0 subscribed clients (of 0 total) [2018-01-05 13:25:15] Done [2018-01-05 13:25:15] Checked set: Focused: 5, Dependents: 0, Dependencies: 0 [2018-01-05 13:25:15] sending (44 errors) and (warnings from 3 files) to 0 subscribed clients (of 0 total) Unhandled exception: Not_found Raised at file "list.ml", line 183, characters 16-25

So far, I have been unable to locate a file list.ml. From my .atom/packages folder I did find -name list.ml which did not turn up anything. I have also cloned flow-language-server https://github.com/flowtype/flow-language-server and flow https://github.com/facebook/flow and cannot find the file there either. So maybe this is a temporary file being created somewhere?

@rpowelll https://github.com/rpowelll do you see a similar unhandled exception in your .log file?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/flowtype/ide-flowtype/issues/50#issuecomment-355636333, or mute the thread https://github.com/notifications/unsubscribe-auth/AAjPYhl1AyHDdrzrApvgQPxVplPo0AtJks5tHnDWgaJpZM4RT-8g .

mattcollier commented 6 years ago

@hansonw thanks for the info! Searching open/closed issues on flow did not turn up this exact error, but it does show other errors involving list.ml. I'm going to try to reproduce this error on the command line and maybe try rolling back the flow version.

jedwards1211 commented 6 years ago

The fact that the UI never notified you of this error is egregious. #70