brcosta / clj-extras-plugin

Clojure Extras IntelliJ Plugin
https://plugins.jetbrains.com/plugin/18108-clojure-extras/
Apache License 2.0
55 stars 12 forks source link

clj-extras-plugin suppress output to console #21

Open mikeananev opened 2 years ago

mikeananev commented 2 years ago

Problem: if clj-extras-plugin installed then output to REPL window is suppressed from other threads.

Steps to reproduce:

  1. I wrote an UDP Server and noticed that println from other thread is suppressed. Received messages or timeout messages are not printed.
bad-screenshot
  1. I disabled the plugin and restart the REPL. Everything works as expected: I see timeout messages or received messages. See screen shot.
good-screenshot
mikeananev commented 2 years ago

On step 2 also I restarted iDEA

brcosta commented 2 years ago

Thanks for the repro code, I can reproduce it, the current implementation uses a naive approach of creating an efemeral/short lived nrepl connection to the session created by cursive's repl, run the code in it, intercept its output and show it in the tooltip. After the tooltip is closed this connection is closed and then all messages after that (like the printlns) are lost. Couldn't come up with a quick fix for that one yet but I'll try a more robust fix later :)