facebookarchive / nuclide

An open IDE for web and native mobile development, built on top of Atom
https://nuclide.io
Other
7.79k stars 683 forks source link

Not showing Flow inline errors #1388

Open cyrieu opened 6 years ago

cyrieu commented 6 years ago

Issue and Steps to Reproduce

If I open a file with Nuclide by double-clicking on it or using the file finder (CMD + P), Flow does NOT show errors in the editor. However, if I open the file via the diagnostics panel or via Go To Definition, Flow DOES show errors. Apparently these are two different files, and I can open them like so:

image

Here I open both in split-plane. They are the exact same file, but left side is what I get from file finder and right is what I get from clicking on an error in the Code Diagnostics panel image

Expected Behavior

I think they should be 1 file and I should see the errors at all times??

Actual Behavior

The flow-checked file and the actual file seem to behave differently in the Nuclide editor even though they share the same paths

Versions

Additional Details

caseybaggz commented 6 years ago

This happens to me, literally every time I upgrade nuclide... 😭

mordaha commented 6 years ago

Any workaround?

mordaha commented 6 years ago

Okay now i got it! )

This is because of symlinks or similar.

For example i have a project in /Users/user/projects/p1/ And i have a symlink to projects dir in /

$ cd /
$ ln -s  /Users/user/projects projects
$ cd /projects/p1
$ atom .

Now Atom works with /projects/p1/file.js, but the flow-server, started by any linter (i tried linter-flow, ide-flow, flow-ide - all with the same issue) is reporting about real file path, e.g. /Users/user/projects/p1/file.js - so atom (or linter or whatever of them) thinks it is a different file, however it is the same.

I can't get where exactly this 'path' issue is occurred (flow, atom, linter, linter-flow) so I don't have an idea where i should post this 'bug' - to atom repo, to flow repo, to liners repos?

May be this will help someone