Using fzf as search command, command palette hangs #747
Comments
Weird, a few questions -
I'll see if I can repro it in a bit. |
@bryphe I'll try to investigate myself using your questions and will return to you ASAP. |
@bryphe This is the console log: Answering your questions:
|
I've been checking this issue out on my end and it also happens for me. |
@Metamist Thanks for investigating it deeper, do you have any insight if there's a workaround for it (using a library for spawning the process) or if we have to wait the node fix? |
Thanks @Metamist and @badosu for the detailed notes! It's brutal that we make the calls in two places, and have separate strategies - I'm working on this PR right now: #764 which is refactoring to consolidate these two calls, and enable async population of the menu (as results come in from the fuzzy-finder, we'd update the menu, vs waiting for it to complete as we do today). I was planning on consolidate to Once my PR is in, we'll only have the single call, so we can settle on one of these strategies:
One other option with So there'd be three options:
Let me know if you have any feedback on the PR or the strategy we should go with for spawning the process. Thanks again for your help and investigation on this! Once that PR is in, I'm going to switch to using |
If you figure out what is causing the issue that I linked from the node archive, that would pretty much solve the issue completely. But rewriting this to be completely asynchronous would provide a much better user experience. |
With #764 & #793 , I refactored so that we only use
There might be some issues it has with the default shell ( |
@bryphe Just tested on 0.2.14. It still hangs, but I guess this is related to some kind of icon fetching from Oni instead of the previous error. See: |
@bryphe, try running this in require("child_process").spawnSync("fzf -f 'a'", [], { stdio: ['inherit', 'pipe', 'pipe'], shell:true }).output[1].toString() It only returns empty (or hangs when using |
Thanks for the tip @Metamist ! It's interesting, that gives me results now when running via the I still don't quite understand why it isn't returning anything, while other command line utilities (like @badosu - I wonder if that error message is being produced because But it seems like the root cause is that no results are making it from the |
@bryphe Just tested here both places you suggested and those parts are never reached by Oni when using Fzf. I checked with the default finder and could see that data is not null and it's string contents, and that selectedOption would be accessible when selected. This was not the case with Fzf, it just hangs and never reach the stdout binding for data. My biggest gripe with the default algorithm is it being case-sensitive, if I would be able at least to change the default arguments to it I would not require having to dive into this. |
@bryphe Feel free to close it, my concerns were adressed, even though this still may be a standing issue for some. |
I don't like the built in ripgrep because it doesn't provide the same fuzzy search as CtrlP (order of letters doesn't matter in the default one, but does in CtrlP) |
The issue I am having with the current implementation is that if I want to enter a commonly named file nested into separate folders it is not scoped correctly. e.g. I was hoping that the changes that are implemented in master would fix this, but after typing very slowly noticed this still happens. I can provide a repro if necessary. |
Thanks @badosu & @Metamist for the feedback!
A repo would be great actually. I wonder if there is a folder above with an 'a' present? I created a @Metamist - our filter/sort strategy is using a library called fuse, and we fuzzy-match the path and filename separately, which give us those strange results. I'm considering having the quickopen strategy be configurable - with a |
FYI, with #1124, there is a way to specify a regex-based strategy, by setting:
This is just the straight-up wildcard filter as described above. Let me know if you have any feedback. Unfortunately it didn't make it in the 0.2.19 release, but it is in master. |
Using the following configuration on oni v0.2.10:
The command palette hangs:
The text was updated successfully, but these errors were encountered: