Juno's enhanced display items are out of order

juno

#1

I have a mix of println and things that trigger “enhanced display” features in Juno, like displaying a warning. The enhanced display items show up in the console out of order. E.g., for:

println("Hi.");
display(:a_symbol);
println("Hej.");

I see the output:

Hi.
Hej.
:a_symbol

This seems like a bug? The Juno doc says to report such things here.


#2

Yeah, there’s no way to guarantee proper ordering here afaict – println just dumps text into STDOUT (which is also buffered), while display sends JSON over a socket. It usually works okayish though (when you have enough work being done between the statements, it’s very likely that the ordering is correct).


#3

Thanks @pfitzseb. I see. Since I’m just using println and display for debugging, maybe I should change all my println statements to Juno.info so that it will use the same mechanism and show up in order with display.

This now gives the expected output:

Juno.info("Hi.");
display(:a_symbol);
Juno.info("Hej.");