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

Properly set session-id for :out messages in nREPL #602

Closed
martinklepsch opened this issue Nov 20, 2019 · 1 comment
Closed

Properly set session-id for :out messages in nREPL #602

martinklepsch opened this issue Nov 20, 2019 · 1 comment

Comments

@martinklepsch
Copy link

As per #373 (comment)

:out messages are still generic.

As far as I understand this causes vim-fireplace to not show any println output from a CLJS REPL because vim-fireplace does not have the concept of a log buffer and instead all results are attached to a specific evaluation.

Doing this properly for async evaluations (e.g. promises) might require some more thought but @SevereOverfl0w mentioned that Figwheel seems to manage. Maybe some inspiration could be drawn from that.

Maybe this would be solved by #561 but I'm not sure.

(Not sure if this issue is all that useful but I wrote it yesterday and don't just want to delete it. If you think it's superfluous feel free to close.)

@thheller
Copy link
Owner

I tried to outline the problems in the #373 comments. The issue here is not that :session-id isn't set on the nREPL message. The issue is that it CANNOT be set. Sure, it can be faked but that is pointless.

node-repl currently captures stdout/stderr of the node process directly. Meaning that anything that can print something anywhere in the code will be captured by that. It will not just capture *out*. Bindings in an async context don't work anyways.

Maybe there should be a more restricted version that actually just captures *out* and not stdout/stderr but I find all REPLs that do that extremely frustrating since you are going to miss output eventually.

So, I'm going to do anything about this special for vim-fireplace. The messages are being sent out, the editor is just ignoring it. All editors should be able to handle messages that aren't part of any particular evaluation. They know what they sent out and can easily fill in the "missing" bits if needed.

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

2 participants