Warn the user if the nailgun client is not executable

Create issue
Issue #10 open
dvogel created an issue

This patch makes vimclojure try to execute the nailgun client and, if it fails, to warn the user via echomsg.

Comments (12)

  1. Meikel Brandmeyer repo owner
    • changed component to core
    • changed milestone to v2.2

    I will also look into extending the packaged nailgun client with some --check-connection or so. This should give some fine-grained diagnostics. Before we simply blow up.

  2. Meikel Brandmeyer repo owner
    • changed status to open

    I'm sorry that this issue is unfixed for so long. I recently committed some changes (e99d3aefea15 ) which improve the situation a little bit. It now displays a more clear error messages (than the cramped vim messages via echoerr). It would look like this:

    Couldn't execute Nail!
    zsh:1: permission denied: /Users/mb/Packages/bin/ng

    Or this:

    Couldn't execute Nail!
    zsh:1: no such file or directory: /Users/mb/Packages/bin/ng

    Would this be sufficient? I'm a little wary where to place the test.

  3. Former user Account Deleted

    This change definitely improves the situation. It's nice that the errors are displayed in the same type of buffer as the expected output would be. One major improvement would be to move the cursor to the top of the buffer after filling it. Currently the cursor is at the bottom, but rarely can I interpret the end of the output without first seeing the beginning of the output. This is especially pertinent if the nailgun output contains a stacktrace.

  4. dvogel reporter

    On WinXP I get this error when opening a clj file:

    ; Use \p to close this buffer!
    Could not determine the Namespace of the file.
    This might have different reasons. Please check, that the ng server
    is running with the correct classpath and that the file does not contain
    syntax errors. The interactive features will not be enabled, ie. the
    keybindings will not be mapped.
    Couldn't execute Nail!
    'C:\\vogel\\vimfiles\\bundle\\vimclojure\\bin\\ng.exe" "vimclojure.Nail" "NamespaceOfFile' is not recognized as an internal or external command,
    operable program or batch file.

    If I copy/paste that command to a cmd.exe prompt it won't run due to the mismatched single/double quotes. However, if I change the single quotes to double quotes, I am able to run that command from the cmd.exe prompt.

  5. Meikel Brandmeyer repo owner

    As for the cursor position: this is supposed to be a feature: #51. I will check to maybe put a possible stacktrace in a different buffer. Or offer some kind of menu to decide what to do („Show Stacktrace“, „Close Window“, or so).

  6. dvogel reporter

    Just brainstorming here. Could you setup a new filetype for the eval output buffer? If you could do that, I could create autocmds in my .vimrc to configure white-space based folding that would collapse the stack traces down to the Exception object messages. Alternatively I could setup autocmds in my .vimrc to pass the contents of those buffers through a custom program like sed to reformat it as I wish.

  7. Meikel Brandmeyer repo owner

    I'd like to postpone this for the next release if you don't mind. I have to check for a way to carry over exceptions to the vim side. This is probably not trivial. And I'd like to get out the new release, because it really improves things on the installation side. And I get requests because things don't work with 1.2 with the old release.

  8. Former user Account Deleted

    That sounds sensible to me. The 2.2 release will definitely be a major improvement.

  9. Log in to comment