Skip to content
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

Open
mgeisler opened this issue Mar 27, 2023 · 3 comments
Open

Show stderr from code blocks #531

mgeisler opened this issue Mar 27, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@mgeisler
Copy link
Collaborator

mgeisler commented Mar 27, 2023

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 of println!("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.

@mgeisler mgeisler added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed labels Sep 15, 2023
@emmali01
Copy link
Collaborator

emmali01 commented Sep 23, 2023

I'll try to work on it in the next two weeks.
-- Emma

@mgeisler
Copy link
Collaborator Author

Thanks Emma! You might very likely have to make changes to the upstream mdbook — we should upstream as much as possible, both so it can benefit everybody and so we can avoid carrying patches (which makes it hard to update our version of mdbook).

@Alx-Lai
Copy link
Contributor

Alx-Lai commented Oct 6, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants