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

stderr shows up in nrepl-messages, with no id #1598

Closed
tommy-mor opened this issue Mar 3, 2016 · 19 comments
Closed

stderr shows up in nrepl-messages, with no id #1598

tommy-mor opened this issue Mar 3, 2016 · 19 comments
Labels

Comments

@tommy-mor
Copy link

I am using clojure quil to make drawings, but runtime errors from quil are being sent to nrepl-messages.
For example of runtime errors from quil in nrepl-messages:
http://pastebin.com/hu1eN5RM
(I think these are stdout because they have \n's in them, and when using different environments, they show up in stdout)
To me (although I am no expert) it seems like this is the correct behavior, as normal clojure errors show up in nrepl-messages aswell.
The problem is that clojure quil errors do not have an id attribute , so when they show up in the nrepl-messages buffer, I get
error in process filter: nREPL: No response handler with id nil found
This is super annoying, because everytime that message shows up, my editor lags for a few hundered milliseconds, which is incredibly annoying because when multiple errors show up it can lag for ~3 seconds.
This happens when running any type of quil project.
I do not know if the problem is because of CIDER's handling of stderr. It also might be leinigen with it's handling of stderr. I do not know. (sorry if I put this bug report on the wrong project)

Environment & Version information

CIDER 0.11.0snapshot
using cider-nrepl 0.11.0snapshot aswell
using nREPL 0.2.10
this is when using a standalone repl

I also get it using the cider-jack-in command, using

;; CIDER 0.11.0snapshot (package: 20160229.922), nREPL 0.2.12
;; Clojure 1.7.0, Java 1.7.0_79

I just want the editor lags to go away, which means redirecting or stopping these idless repl messages

@bbatsov
Copy link
Member

bbatsov commented Mar 8, 2016

Is this still an issue? Usually such problems are caused by some version mismatch.

@Malabarba
Copy link
Member

If it's really the case that nrepl can send messages without an ID, then we definitely shouldn't complain about it in cider. But I think it's strange that nrepl would do that.

@bbatsov
Copy link
Member

bbatsov commented Mar 8, 2016

I'm pretty sure something like this should never happen, but this might be some nREPL bug.

@tommy-mor
Copy link
Author

Still is an issue, but I will change around versions of packages. It also may be worth noting that it is stderr.
Any ideas on how to fix this within nrepl? Is there any config settings I could change?

@tommy-mor
Copy link
Author

I also have already tried difserent packages, I changed from nrepl 2.12 and 2.10

@bbatsov
Copy link
Member

bbatsov commented Mar 8, 2016

Btw, can you post here the messages you see in *nrepl-messages ...*?

@tommy-mor
Copy link
Author

http://pastebin.com/hu1eN5RM
I can get more later. I think they are runtime errors of processing/quil, the library I'm using

@bbatsov
Copy link
Member

bbatsov commented Mar 9, 2016

@Malabarba I wonder if this is some bug in our out middleware.

@Malabarba
Copy link
Member

Anything's possible, but nothing jumps out to me by looking at the code.

@bbatsov
Copy link
Member

bbatsov commented Mar 9, 2016

It seems to me the responses are not associated with the init request for some reason (assuming our middleware is causing this, that is). Obviously precise reproduction steps would help.

@tommy-mor
Copy link
Author

Personnally, I think it is a mistake/error in the way I set it up. I will try to reproduce the bug on a different computer

@bbatsov bbatsov added the bug label Mar 10, 2016
@jackrusher
Copy link

Firstly, I first want to thank you for all the good work you lot do on Cider. I'm seeing the same thing, and it has made quil unusable for me. Any error in the draw loop requires at minimum a cider-quit + cider-connect (with liberal doses of C-g to get there), at most a complete restart of emacs. None of this happened prior to upgrading to cider-11.0.

@Malabarba
Copy link
Member

I just managed to get this too when working with ClojureScript. printlns that happen in the browser are sent to the cljs connection but don't contain an id:

(<-- 
  out  "Content of the print"
  session  "49a3f8eb-d5e6-4844-aac0-2589c4dbc78f"
)

Maybe we should just accept that this will happen for out and err? Instead of always complaining, we could handle these id-less messages gracefully, and only complain if the contain some other key besides session, out, and err.

@bbatsov
Copy link
Member

bbatsov commented May 6, 2016

I'm fine with adding some workaround for now, but we should also identify what's causing this. I cannot imagine how some response didn't originate as the result of a request.

@bbatsov
Copy link
Member

bbatsov commented May 6, 2016

Also I'd font-lock such requests differently in nrepl-messages so they stand out a bit.

@triss
Copy link

triss commented May 24, 2016

Just thought I'd drop a not here to say this is a also problem for me at the moment. I'm using latest version of Quil and CIDER integrated with spacemacs.

Did anyone manage to pull together a quick fix?

@bbatsov
Copy link
Member

bbatsov commented May 25, 2016

Did anyone manage to pull together a quick fix?

Nope.

@Malabarba
Copy link
Member

Malabarba commented May 25, 2016

You can go into nrepl-client.el and comment out the code that signals this warning. :-P

@bhagany
Copy link
Contributor

bhagany commented Jan 2, 2017

This is fixed in clojure-emacs/cider-nrepl#387

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

No branches or pull requests

6 participants