Skip to content
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-examples does not fingerprint correctly #10876

Closed
ehuss opened this issue Jul 18, 2022 · 1 comment
Closed

scrape-examples does not fingerprint correctly #10876

ehuss opened this issue Jul 18, 2022 · 1 comment
Labels
A-caching Area: caching of dependencies, repositories, and build artifacts C-bug Category: bug Z-scrape-examples Nightly: rustdoc scrape examples

Comments

@ehuss
Copy link
Contributor

ehuss commented Jul 18, 2022

Problem

Running cargo doc twice with -Zrustdoc-scrape-examples, the second run should not do anything. However, it is running rustdoc again to scrape the examples.

Steps

Changing the scrape_examples_basic test to run cargo doc one more time should not execute anything. However, it is redoing the scrape.

diff --git a/tests/testsuite/doc.rs b/tests/testsuite/doc.rs
index 00971c2cd..760cb47ce 100644
--- a/tests/testsuite/doc.rs
+++ b/tests/testsuite/doc.rs
@@ -2395,6 +2395,11 @@ fn scrape_examples_basic() {

     // Ensure that the reverse-dependency has its sources generated
     assert!(p.build_dir().join("doc/src/ex/ex.rs.html").exists());
+
+    p.cargo("doc -Zunstable-options -Z rustdoc-scrape-examples=all")
+        .masquerade_as_nightly_cargo(&["rustdoc-scrape-examples"])
+        .with_stderr("[FINISHED] ..")
+        .run();
 }

 #[cargo_test]

Possible Solution(s)

I have not looked, but I suspect the fingerprinting of Docscrape units isn't working.

Notes

No response

Version

cargo 1.64.0-nightly (8827baaa7 2022-07-14)
release: 1.64.0-nightly
commit-hash: 8827baaa781b37872134c1ba692a6f0aeb37890e
commit-date: 2022-07-14
host: x86_64-apple-darwin
libgit2: 1.4.2 (sys:0.14.2 vendored)
libcurl: 7.79.1 (sys:0.4.55+curl-7.83.1 system ssl:(SecureTransport) LibreSSL/3.3.6)
os: Mac OS 12.4.0 [64-bit]
@ehuss ehuss added C-bug Category: bug Z-scrape-examples Nightly: rustdoc scrape examples labels Jul 18, 2022
willcrichton added a commit to willcrichton/cargo that referenced this issue Nov 23, 2022
@weihanglo weihanglo added the A-caching Area: caching of dependencies, repositories, and build artifacts label Nov 25, 2022
@weihanglo
Copy link
Member

fixed by #10343

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-caching Area: caching of dependencies, repositories, and build artifacts C-bug Category: bug Z-scrape-examples Nightly: rustdoc scrape examples
Projects
None yet
Development

No branches or pull requests

2 participants