-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
-Zrustdoc-scrape-examples
not working if there is no workspace
#13074
Comments
@willcrichton Wanted to double check on your motivation for doing the workspace member filtering. Happen to remember if this was benchmarked? |
If we filter by public dependency, because of the previous public dependency RFC, most of the infrastructure is in place. You'd just need to check if the unstable feature is active to make the behavior conditioned on the short term vs long term solution and then check the public dependencies in the long term solution. The one piece of plumbing that might be missing is the taking the public dependency information at the package/dependency level and using it at the Unit level. I'm assuming its in place though. Regardless of the short term solution, I'd recommend we include the long term solution of public dependencies because that is on a path for being stable for 2024 edition. |
I don't remember if I benchmarked it. To double-check, I did a quick experiment. I cloned Bevy and ran with latest Cargo:
Then I modified the relevant for-loop to be: for pkg in cx.bcx.packages.packages() { And re-ran again. With workspace member filtering, the total size of the files was 643k. Without, the total size was 694k. So from that one data point, there's no big space issue. |
Ok, sending the patch then. Thanks for taking a look @willcrichton ! |
Problem
In killercup/test-rustdoc-example-scraping-across-workspace-on-docrs#1 and in rust-lang/docs.rs#2305, we were able to find out that if you re-export non-workspace members, examples would not be scraped for them
Steps
Possible Solution(s)
When scraping examples from a package, cargo only asks for examples that use APIs from specific crates, presumably for performance reasons
This is filtered to workspace members. Really what is needed is filtering for public dependencies which has recently been revived (rust-lang/rfcs#3516).
If the performance hit is not noticeable enough, we likely can remove this completely.
If the performance his is noticeable enough, the path forward:
Notes
No response
Version
No response
The text was updated successfully, but these errors were encountered: