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

Crash upon connect with node >= 0.11.12 #17

Closed
jbnicolai opened this issue Aug 31, 2014 · 7 comments
Closed

Crash upon connect with node >= 0.11.12 #17

jbnicolai opened this issue Aug 31, 2014 · 7 comments

Comments

@jbnicolai
Copy link
Collaborator

Running the latest quote-unquote stable version of node I get an error and crash upon launching vim-inspector.js.

Using the kick ass n to narrow down the breaking version, it seems that it was introduced in 0.11.12, 0.11.13 being the latest stable.

The output upon connecting is:

$ ./bin/vim-inspector.js
start vim with "vim -nb" command or type :nbs within vim
> /Users/jbnicolai/projects/personal/node-vim-debugger/node_modules/tmp/lib/tmp.js:260
  throw err;
        ^
TypeError: Property 'prompt' of object #<REPLServer> is not a function
    at REPLServer.displayPrompt (repl.js:397:8)
    at VimConnection.showScript (/Users/jbnicolai/projects/personal/node-vim-debugger/lib/vim-connection.js:180:7)
    at /Users/jbnicolai/projects/personal/node-vim-debugger/lib/vim-connection.js:128:10
    at Client._onResponse (/Users/jbnicolai/projects/personal/node-vim-debugger/node_modules/v8-debugger/lib/client.js:135:5)
    at Protocol.execute (/Users/jbnicolai/projects/personal/node-vim-debugger/node_modules/v8-debugger/lib/protocol.js:86:14)
    at Client.<anonymous> (/Users/jbnicolai/projects/personal/node-vim-debugger/node_modules/v8-debugger/lib/client.js:49:14)
    at Client.EventEmitter.emit (events.js:104:17)
    at readableAddChunk (_stream_readable.js:156:16)
    at Client.Readable.push (_stream_readable.js:123:10)
    at TCP.onread (net.js:520:20)

0.10.31 all the way through 0.11.11 seem to work though.

@sidorares
Copy link
Owner

I'm using undocumented repl api's - probably it's incompatible between 0.10.and 0.11
Node repl is not very interactive and lacks some features I'd like to have (for example, colors in prompt). I'm actually thinking about forking core /lib/repl.js as npm module and maybe later suggest jangest back to node core

@calvinchengx
Copy link

I was trying out node-vim-debugger today but ran into this problem too. Unfortunately, broken from 0.11.12 onwards. :(

@sidorares
Copy link
Owner

@jbnicolai @calvinchengx - should be fixed now. Could you test it with node? ( I only tested with iojs 1.5.1 ) Published as v0.2.2

@calvinchengx
Copy link

This works. So it was just about making repl use its setPrompt() method in the latest nodejs repl APIs. Thanks!!!

@sidorares
Copy link
Owner

unfortunately the only documented function is repl.start() - https://nodejs.org/api/repl.html
While module is marked as stable this means that any of other functions could break in the future

@calvinchengx
Copy link

Yup. Understood. But at least I know where to start looking when something breaks now. :-D

@sidorares
Copy link
Owner

@calvinchengx I encourage you read source code and add something from 'nice to have' list of features :) Don't have much time for it and it's in "nearly useful" state over last year

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

No branches or pull requests

3 participants