fix(rustdoc): Remove rustdoc --test, --bench and --all-targets arguments#16973
Open
QrkenBananen wants to merge 3 commits into
Open
fix(rustdoc): Remove rustdoc --test, --bench and --all-targets arguments#16973QrkenBananen wants to merge 3 commits into
QrkenBananen wants to merge 3 commits into
Conversation
…ents See (rust-lang#13427). Using --test(s) in a project with integration tests causes import errors. --bench(es) does not cause errors, but also doesn't work correctly and is not supported by rustdoc. --all-targets have the same issues as --test(s) as it implicitly includes the --tests argument. Removing these also means that the "rustdoc" command now have the same targets as the "doc" command. In projects without integration tests these arguments doesn't cause errors, but they also don't work correctly. There is a chance that someone uses these arguments for whom this is a breaking change.
`rustdoc_bench` and `rustdoc_test` were both testing that the --test and --bench arguments were working, but now that those arguments have been removed, change the tests to make sure the --test and --bench arguments are not recognized. The `cargo_rustdoc::help::case` test is checking for the output of `rustdoc --help`, but this help output has changed. Remove --test and --bench checks in rustdoc_list_availables
Collaborator
|
r? @epage rustbot has assigned @epage. Use Why was this reviewer chosen?The reviewer was selected based on:
|
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.
What does this PR try to resolve?
Removes the --test, --tests, --bench, --benches and --all-targets arguments from the
rustdoccommand. Fixes #13427.These arguments are generally broken, and --test(s) in particular can cause import errors.
From my own testing, these arguments appears to work (no errors) if there is no integration tests in the project, even though they are broken. So there is a chance that there are people who use these and will be affected by removing them.
This also brings
rustdocin line with thedoccommand so that they support the same targets.How to test and review this PR?
Run
cargo rustdoc --testcargo rustdoc --benchetc..And verify they all return "unexpected argument" errors.