Skip to content
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

ruby provider does not support nesting in Windows #7655

Closed
janlazo opened this issue Nov 29, 2017 · 8 comments
Closed

ruby provider does not support nesting in Windows #7655

janlazo opened this issue Nov 29, 2017 · 8 comments

Comments

@janlazo
Copy link
Contributor

janlazo commented Nov 29, 2017

  • nvim --version 2d732a1
  • Vim (version: ) behaves differently?
    Not tested
  • Operating system/version: Appveyor (x86-64)
  • Terminal name/version: N/A
  • $TERM: N/A

Steps to reproduce using nvim -u NORC

Patch to enable in Appveyor: 19f1569

Test shown in fe42f9a but without the added line to disable the test.

Actual behaviour

https://ci.appveyor.com/project/neovim/neovim/build/16911/job/w9iwbr905o5gdowq

[00:10:58] [  ERROR   ] C:/projects/neovim/test/functional\provider\ruby_spec.lua @ 41: :ruby command supports nesting
[00:10:58] .\test\functional\helpers.lua:93: Vim(return):ch 3 sent an invalid message, closed.
[00:10:58] 
[00:10:58] stack traceback:
[00:10:58] 	.\test\functional\helpers.lua:93: in function 'request'
[00:10:58] 	.\test\functional\helpers.lua:167: in function 'command'
[00:10:58] 	C:/projects/neovim/test/functional\provider\ruby_spec.lua:42: in function <C:/projects/neovim/test/functional\provider\ruby_spec.lua:41>

Expected behaviour

Pass test in Appveyor.

@janlazo janlazo changed the title ruby provider does not support nesting ruby provider does not support nesting in Windows Nov 29, 2017
@justinmk justinmk added this to the todo milestone Nov 29, 2017
@justinmk
Copy link
Member

cc @alexgenco

@alexgenco
Copy link
Contributor

I'm looking into this but it will take me some time as I figure out how to reproduce.

@alexgenco
Copy link
Contributor

Still haven't fixed it, but I've been debugging on appveyor and am getting weird phantom responses from nvim to RPC message I didn't send (consistently with request id "13"). Nvim then seems to close the connection, which is probably what's causing ch 3 sent an invalid message, closed.. Here's an example log line: (https://ci.appveyor.com/project/alexgenco/neovim-ruby/build/1.0.66#L328).

So it seems something is leaking a malformed message to the host process's stdout, potentially only on nested RPC calls. I'll keep digging this weekend.

@alexgenco
Copy link
Contributor

It seems like maybe a msgpack issue. In the neovim-ruby acceptance test suite, when the msgpack session gets up to request ID 10, neovim responds with the invalid message response (for request id 13, which was never sent). If I can get a smaller repro case, I'll open an issue with msgpack-ruby. Off the bat, this seems like it might be relevant: msgpack/msgpack-ruby#127

@alexgenco
Copy link
Contributor

Ok I think I found the issue, it had to do with setting all IO objects to binary mode (https://ruby-doc.org/core-2.3.1/IO.html#method-i-binmode), among other things. The full neovim-ruby test suite (including tests around nested invocations) is now passing on appveyor, so I'm hoping it resolves this issue is well. Is it easy to try it on neovim-ruby master, or should I release a new version?

@janlazo
Copy link
Contributor Author

janlazo commented Dec 6, 2017

I install neovim-ruby via gem so I prefer that I can try the latest changes by reverting the commit to enable the nesting test and run another build,

https://ci.appveyor.com/project/neovim/neovim/build/17062/job/tubryp9uxmxbn68m
didn't work so I need a new release version.

@alexgenco
Copy link
Contributor

Just pushed 0.6.2.

@janlazo
Copy link
Contributor Author

janlazo commented Dec 6, 2017

It passes now. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants