Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Flow 0.28 better support #574

Closed
nodkz opened this issue Jul 7, 2016 · 6 comments
Closed

Flow 0.28 better support #574

nodkz opened this issue Jul 7, 2016 · 6 comments

Comments

@nodkz
Copy link

nodkz commented Jul 7, 2016

Issue and Steps to Reproduce

screen shot 2016-07-07 at 16 20 39

### Expected Behavior

Line 28 should be highlighted with error.

Will be cool if list "Errors | warnings":

  • show tooltips with full error output
  • has ability to resize colums

Actual Behavior

I'm go to console for running flow cmd for determining actual error message from flow.

Versions

  • Atom: 1.8.0
  • Nuclide: 150
  • Client OS: MacOs
@zertosh
Copy link
Contributor

zertosh commented Jul 7, 2016

The line should def be highlighted cc: @nmote. As for the tooltips/resizing, agreed. We had that before but had to switch away from FixedDataTable to a simple html table in order to upgrade our Atom support, and haven't revisited the issue.

@nmote
Copy link
Contributor

nmote commented Jul 7, 2016

Definitely agreed on the resizing, but realistically I'm not going to get around to it anytime soon. Tooltips with full error output should be pretty doable, though.

I disagree that we should put an error on line 28 in your example. Flow is clearly reporting the primary location to be line 320. Often, Flow errors have many, many locations and it wouldn't be reasonable to display the error at all of them. Instead, we should work with the Flow team to make sure that errors are placed in the best location to begin with.

@nodkz
Copy link
Author

nodkz commented Jul 7, 2016

@nmote @zertosh

  • line 28 should be highlighted, without adding new error to "error | warning" list. In my case error was in 28 line (it should be description: ?string). Flow can not determine primary location of error. It just see that input/output has type mismatch.
  • somehow nuclide should show message about 28 line, right now it hide this useful information. May be in "error | warning" list need add tree-expand (like console.group in browser). Expand error and see all related many-many locations ;)
  • resizing is not required feature, so it may be delayed indefinitely.

Anyway thanks for awesome editor! Only nuclude forced me to switch from webstorm to atom.

@zertosh
Copy link
Contributor

zertosh commented Jul 7, 2016

re line 28, after talking it through with @nmote, his explanation makes sense. Nuclide is just following what flow reports, so maybe you should file an issue for that there.

Though I agree that the table could definite use some love :)

@nodkz
Copy link
Author

nodkz commented Jul 13, 2016

Flowtype.org improves error hightligting on doc pages.
You may check it here: https://flowtype.org/docs/objects.html#the-object-type

Move cursor to highlighted errors on following block:

(0: Object);
("": Object);
(true: Object);
(null: Object);
(undefined: Object);

You will see, that they marked "input" and "output" parts of type errors.

@nmote
Copy link
Contributor

nmote commented Mar 3, 2017

diagnostics feature requests have since been implemented, and error positioning problems are problems with Flow, not Nuclide

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants