With julia 1.6.0 everything works as expected, however the output doesn’t show in 1.6.1:
What’s going on here, is this a bug in julia and/or PlutoUI?
Code to reproduce below
Seems worth reporting to Issues · fonsp/PlutoUI.jl · GitHub
Thanks, yes I was reluctant to filing an issue at PlutoUI if it was indeed a Julia issue.
I looks like
import Pkg; Pkg.DEFAULT_IO = stdout should be a workaround, but it seems to make no difference for me in 1.6.1, unfortunately.
Since the redirection here happens in
with_terminal you need to use this inside that, or simply pass
stdout explicitly, e.g.
Pkg.status(; io = stdout)
That doesn’t work, unfortunately, maybe something else is going on here as well?
Looks like a Pluto bug then, since this also fails (prints to the wrong stdout):
println(stdout, "hello, world")
Thanks, that’s the same behavior in 1.6.0, though.
I gave it a shot in the latest nightly, where it works fine again, so it looks like it might be fixed with PR mentioned above:
Yea, since it is a bug in Pluto I am guessing it applies to all Julia versions.
Right. It has to do with PlutoUI’s
with_terminal using the
@capture_out to capture the stdout, I think, but I couldn’t figure out exactly what the problem was.
In case anyone wants to have a closer look, that is.
Hi, still no solution to this issue? Does that mean that with_terminal can’t be used in new versions of Pluto?
Newer Pluto version actually capture output to the terminal directly and display it in the notebook without any user intervention:
Then I don’t understand what I do wrong. In my case:
Pkg.status() (in notebook)
[7f904dfe] PlutoUI v0.7.37 (in terminal, nothing shows up in notebooks)
From worker 2: [b77e0a4c] InteractiveUtils
From worker 2: [d6f4376e] Markdown
From worker 2: [44cfe95a] Pkg
From worker 2: [de0858da] Printf
Which Pluto version are you using?