flow-ide icon indicating copy to clipboard operation
flow-ide copied to clipboard

Only invoke flow after hyperclick word is clicked

Open steelbrain opened this issue 8 years ago • 6 comments

We could use Atom APIs to get word boundary at a range and by default show it as clickable, and after the user clicks it we can invoke Flow to jump for us

Fixes #103

Thoughts @leos @lloiser?

steelbrain avatar Jul 26 '17 12:07 steelbrain

I'm loosely against that. I don't know if flow's word boundaries are the same as Atom's - it also doesn't give you the underlining feedback of whether something is clickable.

Let me look at #103 - I have a few thoughts.

leos avatar Jul 26 '17 13:07 leos

@steelbrain - My initial theory is that https://github.com/steelbrain/flow-ide/blob/master/lib/index.js#L58 won't find a flow.exe file, which triggers a more expensive invocation of flow that goes through node.exe. I need to dust off my windows machine to test that, doing it now.

leos avatar Jul 26 '17 13:07 leos

Confirmed. flow.exe is lightning fast, invoking it via node.exe can take a second. @steelbrain can you reopen #103 and close this? Or create a new issue to track this work if you don't want to continue the reporting issue?

leos avatar Jul 26 '17 14:07 leos

I have found a lot of places where flow fails to go to the definition. Marking these spots as clickable would then lead to issues in our repo again. I think we have to further investigate the actual slowdown when we call flow. It seems that @leos already found something. I will test it as soon as I can.

lloiser avatar Jul 31 '17 08:07 lloiser

Here's the issue that got filed with flow - https://github.com/facebook/flow/issues/4445 - they haven't responded (possibly because it's closed) so maybe open up a new one with the same question?

leos avatar Jul 31 '17 13:07 leos

Pushing the PR that changes search path order should allow folks to workaround the issue by invoking flow.exe explicitly.

leos avatar Jul 31 '17 13:07 leos