-
-
Notifications
You must be signed in to change notification settings - Fork 297
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
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 |
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! |
anyone should feel free to finish this! just fork the fork :) |
I've created some end-to-end style tests to cover the cases you mentioned, @fonsp. What's the best way to incorporate these? Just open a new PR? |
I just gave you write access to my fork, @ReubenJ, so you can continue using this PR if you wish. Thanks so much for taking this on! When I said "next week" I must have meant next year... |
Just push your commits to the |
811a25a
to
1bf36fc
Compare
Nice! Could you test all three forms? show(bigarray) and show(stdout, bigarray) and show(stdout, "text/plain", bigarray) |
1bf36fc
to
c9bdae8
Compare
- ANSI color output when using `printstyled` - Correct output when using `show` and `display` with long output.
c9bdae8
to
4fae19b
Compare
Looks like just one of the Throttled tests is failing. Should be all set otherwise! |
Sure thing. I won't have time until a couple of weeks from now, but I'd be happy to then. |
Fantastic! 🚀 |
Fixes #2823
No tests yet