-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Show stderr
from code blocks
#531
Comments
I'll try to work on it in the next two weeks. |
Thanks Emma! You might very likely have to make changes to the upstream |
Hi @mgeisler, I applied rust-lang/mdBook#1315 in #2397. I think there's a room to discuss whether we should push it to upstream repo. My concern is that the original PR is put aside for a long time so we don't know if i'll be finally adopted or not; however, if we merge it first in downstream, the only possible effort comes iff it's finally adopted in upstream. |
Add a stderr block. Pros: - we can make use of dbg macro in our code Cons: - there's a limitation that the compile message also shows Applies patches from rust-lang/mdBook#1315 since the original change was not merged by rust-lang. Issue: #531 Signed-off-by: Alx-Lai <alexabc722@gmail.com>
With #2397 merged, we can finally start using |
I created #2478 to track converting print statements to |
The change in #2397 did somehow not work when deployed — I don't know why, but I saw 500 Server Errors on every request. I reverted the change for now, but I hope we can fix it soon. |
Today, mdbook doesn't show
stderr
when running Rust code. The problem is that it uses a Playground endpoint which doesn't deliver this information. However, the Playground itself does have this information via an internal endpoint. See rust-lang/mdBook#1315 for details.Fixing this would allow us to start using
dbg!(foo)
instead ofprintln!("foo: {foo:?}")
in our code samples and thus simplify a lot of code blocks.With google/mdbook-i18n-helpers#75 merged, many more code blocks would be automatically removed from the translation files, thus reducing churn for our translators.
The text was updated successfully, but these errors were encountered: