Don't scrape examples from library targets by default#11499
Merged
bors merged 2 commits intorust-lang:masterfrom Dec 20, 2022
Merged
Don't scrape examples from library targets by default#11499bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
f68b85b to
818debb
Compare
weihanglo
reviewed
Dec 20, 2022
Member
weihanglo
left a comment
There was a problem hiding this comment.
Agree with what was pointed out from feedback. Scraped examples from lib internal might bring more confusing, non-user-facing code usages. The intent of computing scrape units is also clearer than it was by having a separate method.
Thank you for continuing tuning on this! Only some nits left.
Contributor
Author
|
Thanks for suggestions, just incorporated both. |
weihanglo
approved these changes
Dec 20, 2022
Member
|
Thanks! @bors r+ |
Contributor
Contributor
Contributor
|
☀️ Test successful - checks-actions |
bors
pushed a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 23, 2022
7 commits in c994a4a638370bc7e0ffcbb0e2865afdfa7d4415..2381cbdb4e9b07090f552d34a44a529b6e620e44 2022-12-18 21:50:58 +0000 to 2022-12-23 12:19:27 +0000 - fix: deduplicate dependencies by artifact target (rust-lang/cargo#11478) - Add warning if potentially-scrapable examples are skipped due to dev-dependencies (rust-lang/cargo#11503) - Don't scrape examples from library targets by default (rust-lang/cargo#11499) - Stabilize terminal-width (rust-lang/cargo#11494) - Make sure that hash of `SourceId` is stable (rust-lang/cargo#11501) - Use workspace lockfile when running `cargo package` and `cargo publish` (rust-lang/cargo#11477) - Show `--help` if there is no man page for subcommand (rust-lang/cargo#11473)
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 23, 2022
Update cargo 7 commits in c994a4a638370bc7e0ffcbb0e2865afdfa7d4415..2381cbdb4e9b07090f552d34a44a529b6e620e44 2022-12-18 21:50:58 +0000 to 2022-12-23 12:19:27 +0000 - fix: deduplicate dependencies by artifact target (rust-lang/cargo#11478) - Add warning if potentially-scrapable examples are skipped due to dev-dependencies (rust-lang/cargo#11503) - Don't scrape examples from library targets by default (rust-lang/cargo#11499) - Stabilize terminal-width (rust-lang/cargo#11494) - Make sure that hash of `SourceId` is stable (rust-lang/cargo#11501) - Use workspace lockfile when running `cargo package` and `cargo publish` (rust-lang/cargo#11477) - Show `--help` if there is no man page for subcommand (rust-lang/cargo#11473) r? `@ghost`
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?
Based on some early feedback about the scrape-examples feature, both documentation authors and consumers did not consider examples useful if they are scraped from a library's internals, at least in the common case. Therefore this PR changes the default behavior of
-Zrustdoc-scrape-examplesto only scrape from example targets, although library targets can still be configured for scraping.How should we test and review this PR?
I have updated the
docscrapetests to reflect this new policy, as well as the Unstable Options page in the Cargo book.r? @weihanglo