-
-
Notifications
You must be signed in to change notification settings - Fork 284
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
Set IOContext for redirected stdout/stderr #2824
base: main
Are you sure you want to change the base?
Conversation
Try this Pull Request!Open Julia and type: julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/danielwe/Pluto.jl", rev="stdoutiocontext")
julia> using Pluto |
Check that each IOContext property is transferred to `stdout` and `stderr` as seen from inside a notebook
37599e2
to
b0851f5
Compare
Tests added, loosely following the pattern in |
Thanks! Can you take a look at #2727 and try to find a solution that works for both use cases? |
How about like this? |
Nice! This seems to match the REPL:
|
Could you write the tests in a more end-to-end style? Right now the test is very exact for the question: "did the IO context get set properly"? What I would prefer to test is whether the two issues are fixed:
The benefit of an end-to-end test is:
It would also be nice if the tests are added to the existing notebook in test/Logging.jl, this makes the tests run faster because no new process needs to be started. You can ignore the GitHub Action test failures on Julia nightly, that's being worked on in another PR |
PS Thanks again! Nice implementation :) |
@danielwe Hey! Do you have time to take a look at the tests? |
Thanks for the feedback! I'm rather strapped for time at the moment. I can probably look at it next week, but if someone wants to adopt this to get it across the finish line sooner, feel free! |
Fixes #2823
No tests yet