-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add native job support for neovim. #234
Conversation
Turns out it's pretty similar to vim - all we need to do is call jobstart, send stdin to the channel that produces, and then close the channel.
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
Sure, I can look into why. For starters you might hack the AsyncAwait helper in the test to change the loop from
to
and see what that spits out. It would be strange if at_exit was getting called before the syscall process actually finished writing its files... maybe a slight bug with neovim jobcontrol? |
finished_log contains a single 0 at that point - it looks like it's finishing within 100ms (though not before getting to that loop). The jobcontrol docs actually explicitly mention this kind of bug when using callbacks, but suggests channel-buffered as a workaround (which I'm using). If I look at |
K, have you tried adding a delay control in the vroom file to just the one line to see if that takes care of failures? As long as we have the tests passing consistently and a note explaining what's going on, I'm fine with proceeding now that you've done some initial investigation. Do consider either renaming system-vimjob.vroom or splitting into vim/neovim variants. The "vimjob" was referring specifically to |
1. Rename to system-job, to avoid vim-specific reference to +vimjob 2. Add delays to async calls in the tests. For some reason, vroom doesn't pick up stdout from nvim in this case without a small delay. 3. Remove the skip from travis.yml for nvim for system-vimjob
The travis config still uses vim7, and +job requires vim8
Went ahead and added some delays. I'm really liking vroom's style and syntax, nice job on that 👍 I've renamed the test to I chose to rename instead of split because of a note in the issue (#125):
which (barring the delays) makes sense to me, because both applications should have the same API, and this way there won't need to be special handling to skip each split file for one or the other (at least, whenever the tests are updated to use vim8). Plus, changes to that API only need to be tested in one place. lmk if there's anything else to tweak |
That's credit to @Soares who pushed for literate testing and built the initial implementation. =) |
The echomsg delays were just acting as extensions to the CallAsync delay.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Merging the changes.
@okkays if you could go ahead and report a bug for the mysterious delays, I do suspect we could hit on some fix we could get into the implementation so that we don't have a proliferation of weird workarounds in all the tests affected by it.
Hello!
I think I've managed to get support for neovim's jobcontrol (#125) working (I've tested it manually with vim-coverage, which wasn't working for me and caused me to try and solve this in the first place).
However, in order to get system-vimjob.vroom to succeed, I need to pass vroom
--shell-delay .25
(by default vim's delay is 0.25 and neovim's is 0.0). Here's an example failure:Again, this works fine:
Any ideas on whether this is an actual problem in my use of
jobcontrol
, or if the async delay is just necessary for nvim in this case? I've looked into it for a bit, but this is my first adventure in maktaba/vroom.