-
-
Notifications
You must be signed in to change notification settings - Fork 212
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
prints to stdout not appearing in 'calva says' output panel when an exception is thrown afterwards or when paused/waiting #638
Comments
This was mentioned in slack but I just want to put it here for later reference: This may be related to the It could also just be the way we're handling things in nrepl/index.ts, but I think more likely it's the former. |
Just wondering why this is marked as enhancement rather than a bug? (was just bitten by this again; not finding the time to dig into this myself unfortunately; lots of unfamiliar moving parts.) From the previous comment I do appreciate that this might not be trivial to fix. |
Yeah, I think I should have marked this as bug before. So just to note, this does as you desire if the eval occurs in the repl window (eval top level form in repl window). So some clues could be in the code that handles repl window output - I haven't looked yet myself. Perhaps we should bump this up in priority. @PEZ What are your thoughts here? |
Not sure I agree it is a bug, but I'm fine with both. 😄 Sounds like you have some grips on this, @bpringe . I agree it should be prioritised . |
@jurjanpaul Would you mind trying this vsix and letting me know if it works for you? https://6275-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.103-fix-stdout-message-streaming-89910f45.vsix It works from me from what I understand is desired. |
Went ahead and released. If any issues, please reopen. |
Yes! Thank you very much! Educational too to read the commit that fixes things... (never having read any actual TypeScript before). Thanks again! |
Glad I could assist! Thanks for reporting and testing. |
I second that. Thanks for reporting and testing! |
When evaluating a form (when connected to nREPL) which prints to stdout and afterwards throws an exception, the original output never gets displayed in the 'calva says' output panel. (This is especially painful when troubleshooting.) Similarly, when evaluation of a form gets paused (because of I/O wait or hitting a breakpoint in the debugger), anything that was printed before is not (yet) displayed in the 'calva says' output panel (until evaluation successfully completes after all). Note: in neither case does invoking
(flush)
make any difference.The desired behaviour would be: prints to stdout should be displayed in near-realtime. (Some buffering is ok of course, as long as
(flush)
does what is expected).The issue with the thrown exception is easily reproduced by evaluating the form:
Note that "hello world" never gets displayed (it would of course if no exception was thrown).
Note: for this case printing to stderr already behaves as desired!
At this moment I have not been able to come up with a simple reproduction scenario for the paused/waiting case yet, but I might be able to add that later.
Update:
The simplest scenario would of course be:
where one would expect the “hello world” to appear as/before the form evaluation is waiting for input.
The text was updated successfully, but these errors were encountered: