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

preprocessors need to be integrated with the rust build system #3927

Closed
ehuss opened this issue May 16, 2024 · 5 comments
Closed

preprocessors need to be integrated with the rust build system #3927

ehuss opened this issue May 16, 2024 · 5 comments

Comments

@ehuss
Copy link
Contributor

ehuss commented May 16, 2024

#3918 and #3907 seem to have introduced some new preprocessors. These will need to be integrated with the rust build system so that the book gets built correctly. At a minimum, it will need to be integrated in rustbook/src/main.rs, by calling with_preprocessor when building the book. The preprocessors will need to be declared as path dependencies in rustbook/Cargo.toml. This will also probably require some wiring to detect when these custom preprocessors are enabled in book.toml (which should be accessible via something like book.config.get_preprocessor).

This should probably be done before you start using these preprocessors to ensure the published documentation isn't broken.

@chriskrycho
Copy link
Contributor

Noted, and thank you, @ehuss! 👍🏼 A quick status note:

I am using book.config.get_preprocessor already in tests for the preprocessors, so I have a reasonably good idea how to make sure we do that in the build. I’ll follow up with @carols10cents to make sure I don’t miss anything.

@chriskrycho
Copy link
Contributor

For those following along at home: rust-lang/rust#125408 has the goods, and is (I believe!) ready to go. 👍🏼

bors added a commit to rust-lang-ci/rust that referenced this issue May 31, 2024
…, r=ehuss

Support mdBook preprocessors for TRPL in rustbook

`rust-lang/book` recently added two mdBook preprocessors. Enable `rustbook` to use those preprocessors for books where they are requested by the `book.toml` by adding the preprocessors as path dependencies, and ignoring them where they are not requested, i.e. by all the books other than TRPL at present.

Addresses rust-lang/book#3927
@chriskrycho
Copy link
Contributor

Status:

One highly likely possibility here is that we end up publishing these to crates.io and then pulling them in as normal (i.e. not path) dependencies in the src/tools/rustbook in the rust repo.

github-actions bot pushed a commit to rust-lang/miri that referenced this issue Jun 5, 2024
Support mdBook preprocessors for TRPL in rustbook

`rust-lang/book` recently added two mdBook preprocessors. Enable `rustbook` to use those preprocessors for books where they are requested by the `book.toml` by adding the preprocessors as path dependencies, and ignoring them where they are not requested, i.e. by all the books other than TRPL at present.

Addresses rust-lang/book#3927
bors added a commit to rust-lang/rust-analyzer that referenced this issue Jun 20, 2024
Support mdBook preprocessors for TRPL in rustbook

`rust-lang/book` recently added two mdBook preprocessors. Enable `rustbook` to use those preprocessors for books where they are requested by the `book.toml` by adding the preprocessors as path dependencies, and ignoring them where they are not requested, i.e. by all the books other than TRPL at present.

Addresses rust-lang/book#3927
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue Jun 28, 2024
Support mdBook preprocessors for TRPL in rustbook

`rust-lang/book` recently added two mdBook preprocessors. Enable `rustbook` to use those preprocessors for books where they are requested by the `book.toml` by adding the preprocessors as path dependencies, and ignoring them where they are not requested, i.e. by all the books other than TRPL at present.

Addresses rust-lang/book#3927
@chriskrycho
Copy link
Contributor

@ehuss Circling back, I think courtesy of the various fixes and esp. rust-lang/rust#127786, this is resolved now?

@ehuss
Copy link
Contributor Author

ehuss commented Oct 4, 2024

Yep, thanks!

@ehuss ehuss closed this as completed Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants