-
Notifications
You must be signed in to change notification settings - Fork 34
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
Ignore nrepl process stderr #50
Conversation
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.
LGTM
@@ -46,13 +46,19 @@ const start = (): Promise<CljConnectionInformation> => { | |||
}); | |||
|
|||
nreplProcess.stderr.on('data', data => { | |||
console.info('nrepl stderr =>', data.toString()); |
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.
Looks good. Not blocking for now, but just a thought: we could wire this up to a vscode.OutputChannel, so users can see any output without having to run the extension under debugging mode (I think console.info only shows up when debugging the extension?)
But probably not worth doing in this review, probably needs a bit more thought.
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.
@mhansen Good idea. I'm gonna merge the PR as is but will create the related issue soon.
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.
Alright that's a good thing we should be thinking. We'll discuss it on #52.
stop(); | ||
return reject(`This error happened with our nREPL process: ${data}`); | ||
return reject(); |
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.
Just checking: Do we want to reject() even if the exit code is 0? I suppose we do, if it exits before we manage to resolve() the Promise by getting the connection info, we should probably treat that as an error. What do you think?
stop(); | ||
return reject(`This error happened with our nREPL process: ${data}`); | ||
return reject(); |
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.
We could reject the promise with an error string, then it'd show up in the vscode.window.showErrorMessage. This would make it easier both for users to understand what's going on, and for us to understand what's going wrong with bug reports in the future. Perhaps we could say here something like 'nREPL unexpectedly exited, error code ${code}'.
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.
@mhansen Again, good idea. I'll add the related issue.
stop(); | ||
return reject(`Our nREPL was closed. Code: ${code} / Signal: ${signal}`); | ||
return reject(); |
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.
As above, consider adding an error message, to help us (& the user) debug what's going on?
nrepl process uses stderr to notify stuff other than error. When it's fired, it doesn't mean that nrepl didn't work.
This closes #47 and closes #48.