facebookarchive / ide-flowtype

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

Display trace locations in diagnostic messages #28

Open bradennapier opened 6 years ago

bradennapier commented 6 years ago

Ok so this is an example of one of the biggest pitfalls of the ide version versus the flow cli. In this example, it is reporting to me that someone is calling the function without the "title" and "label" values.

image

However, it is not telling me ANY information about where or who is doing this. It could be any function in my program (I believe within an open tab? but still). I then need to search around trying to find it.

image

It says "see also: function call" - which is the first step in the trace but is actually not helpful at all. I have traces setup to a level of 3 so I was hoping it would at least give a little summary or something that would tell me the actually caller.

hansonw commented 6 years ago

Thanks for bringing this up. The problem here is that the LSP has no support for 'traces' at the moment (RFC: https://github.com/Microsoft/language-server-protocol/issues/260) so we'll have to be a bit creative here.

I guess the least we can do is show the filename here, even if it's not clickable.

bradennapier commented 6 years ago

Thanks @hansonw yes - the file would be hugely helpful or if possible perhaps file and line/column number?

Clickable is always nice but def not needed if I can at least easily identify the place to look :)

Thanks for all your guys work on this!