Allow merging all libcore/alloc doctests into a single binary#153072
Open
jyn514 wants to merge 6 commits intorust-lang:mainfrom
Open
Allow merging all libcore/alloc doctests into a single binary#153072jyn514 wants to merge 6 commits intorust-lang:mainfrom
jyn514 wants to merge 6 commits intorust-lang:mainfrom
Conversation
Collaborator
Collaborator
|
rustbot has assigned @jdonszelmann. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
16227c8 to
d567da2
Compare
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Member
|
Merging doctest would mean that we did no longer test that the set of features in doc tests are accurate, right? Those are visible to the user. |
Contributor
|
☔ The latest upstream changes (presumably #153074) made this pull request unmergeable. Please resolve the merge conflicts. |
Member
Author
|
Yes. That’s why this doesn’t actually switch on merging, as mentioned in the description. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is only the changes needed to allow merging the tests. This doesn't actually turn doctest merging on in bootstrap. I think that might be a useful follow-up, since it makes them much faster to run, but it's not without downsides because it means we'll no longer be testing that doctests have all necessary
feature()attributes.The motivation for this change is to run the tests with
-C instrument-coverageand then generate a coverage report from the output. Currently, this is very expensive because it requires parsing DWARF for each doctest binary. Merging the binaries decreases the time taken from several hours to ~30 seconds.There are several parts to this change, most of which are independent and I'm happy to split out into other PRs.
-C panic=abort. Ferrocene needs this downstream for complicated reasons; it's a one-line change so I figured it's not a big deal.allow(incomplete_features)as a crate-level attribute, just likeinternal_features. Without this, it's possible to get hard errors if rustdoc lifts features to the crate level but notallows.--merge-doctests=yes. In particular, I removed a few$crateusages and explicitly marked a few doctests asstandalone_crate.