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

Write preprocessed content to file before testing with rustdoc #891

Merged
merged 1 commit into from
Jun 12, 2019

Conversation

carols10cents
Copy link
Member

Rather than writing the unpreprocessed content to the file for rustdoc to test with.

Fixes #855.

I was trying to figure out whether the current behavior was intentional or not, and if I might be breaking anything with this change, but I think the fix I have here is what was intended-- my first hint was this comment that described what I had hoped was happening but that wasn't what was actually happening.

As of this commit, it seems like the behavior I was hoping for was happening and was intended ("now mdbook test does full link expansion to temp file prior to running" in the commit message), but this line got lost in refactoring and the preprocessors were being run but this line read the unprocessed file from disk again and gave that content to rustdoc :(

If this fails CI I will fix it tomorrow ❤️

@carols10cents
Copy link
Member Author

Wooo ok it passed! I was second guessing myself about the tests after submitting this, so in case anyone has the same thoughts I did: it would appear that the mdbook_can_correctly_test_a_passing_book would pass even if nested-test.rs wasn't included, but it fails without the included code change because rustdoc can't parse {{#include... as Rust code.

The mdbook_detects_book_with_failing_tests would be better if it tested that there were 2 failures rather than just that the tests failed, but I'm not sure how to do that.

@CjS77 CjS77 mentioned this pull request Mar 25, 2019
11 tasks
@ehuss
Copy link
Contributor

ehuss commented Jun 12, 2019

Thanks! Sorry I lost track of this.

Ruin0x11 pushed a commit to Ruin0x11/mdBook that referenced this pull request Aug 30, 2020
Write preprocessed content to file before testing with rustdoc
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

Successfully merging this pull request may close these issues.

Expected include to be processed before mdbook test
2 participants