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.
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
Scrape code examples from examples/ directory for Rustdoc #9525
Scrape code examples from examples/ directory for Rustdoc #9525
Changes from 29 commits
8acf0e8
3f9a4f2
a0122df
63c4346
49a3a54
4ac6835
b14a778
711539f
6772991
5ed35a4
d19cfd2
48056e5
ff13eb5
0c8e1f8
0b2e293
b9b39a6
dbcabc7
0792cde
82d937e
70f3821
d29ac15
8331d7d
223adac
19c8f05
4705566
17c6df7
8b06a0f
e52a9d9
b948fc8
e4a65b9
0deeea8
1120957
0a2382b
33718c7
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this interact if you do something like
cargo doc -p foo -p bar
where the "root set" is larger than one? Presumably the documenation forfoo
wouldn't want to get--scrape-examples-target-crate bar
, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the other way around. If you have a file
examples/ex.rs
likeThen the
--scrape-examples-target-crate
indicates which calls to save as examples. So if you do-p foo -p bar
then onlyfoo::f()
andbar::f()
will be saved, and notbaz::f()
orVec::new()
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if
foo
andbar
are unrelated crates though? In that what if they're both leaves of the dependency tree (or distinct roots depending on your tree perspective)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what your concern is. This flag is being passed to reverse-dependencies being scraped, not to packages being documented. So this isn't saying "documentation for crate
foo
should include examples for cratebar
". It's saying "examples forfoo
andbar
should be scraped fromexample
, and those examples will be available while documentingfoo
andbar
."There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still slightly concerned about this but I don't know enough about these new rustdoc flags to really bottom our my concern so "if it works it works"