Commit graph

16 commits

Author SHA1 Message Date
Guillaume Gomez
689d9a7e4f Don't filter on workspace members when scraping doc examples 2023-11-30 17:38:49 +01:00
Guillaume Gomez
95a27cdbd1 Add regression test for scraped examples in crates without [workspace] 2023-11-30 17:36:46 +01:00
Ed Page
293f2250d6 feat(doc): Print the generated docs links
I've wanted something like this myself.  I dislike using `--open`
because I tend to move up to re-run my `cargo doc` run but then have to
edit it to remove `--open`.
Also makes it annoying when opening docs when `cargo doc` is wrapped by
a tool like `make`.

This was previously attempted in #5592:
- Unlike the request in #5562, this aligns with #5592 in always printing
  rather than using a flag as this seems generally useful
- Unlike #5592, this prints as an alternative to "Opening" to keep
  things light
- Unlike #5592, this prints afterwards as the link is only valid then

Fixes #5562
2023-10-19 10:51:56 -05:00
Weihang Lo
0da332c66e
fix(docscrape): must fail with bad build script
When running `cargo doc -Zrustdoc-scrape-example`, it performs
additional type checks that a plain old `cargo doc` doesn't.
That leads to some extra failure when adopting scrape-example for docs.rs.

In de34d60 we introduced `unit_can_fail_for_docscraping` in order to
make `-Zrustdoc-scrape-example` not fail whenever `cargo doc` builds.
Build script executions were accidentally included in the list of
fallible units. A plain `cargo doc` does fail when a build script
fails. `-Zrustdoc-scrape-example` should follow that.
2023-02-09 20:32:24 +00:00
Weihang Lo
a481387e7b
test(docscrape): must fail with bad build script 2023-02-09 20:14:18 +00:00
Will Crichton
1c4065c52e Simplify code and output of skipped_examples warning 2022-12-22 12:37:11 -08:00
Will Crichton
6b9a28eb21 Add warning if potentially-scrapable examples are skipped due to dev-dependencies 2022-12-20 14:32:31 -08:00
Will Crichton
eb829cfb35 Improve failed scrape diagnostic 2022-12-20 12:13:41 -08:00
Will Crichton
818debbf90 Don't scrape examples from library targets by default 2022-12-18 22:15:08 -08:00
Will Crichton
d588298c3f Fix examples of proc-macro crates being scraped for examples 2022-12-18 10:41:21 -08:00
Will Crichton
de34d60076 Allow Check targets needed for optional doc-scraping to fail without killing the build 2022-12-03 10:13:33 -08:00
Will Crichton
968caae025 Remove outdated check on scrape units, add test for doc = false 2022-11-27 11:57:56 -06:00
Will Crichton
183425f0bc Add test to confirm #10876 is fixed. 2022-11-23 09:35:59 -06:00
Will Crichton
c26ed6357f Add doc comments to explain scrape-examples feature 2022-11-22 15:19:18 -06:00
Will Crichton
b325a8d5d5 Fix complex_reverse_dependencies test 2022-11-16 09:18:37 -08:00
Will Crichton
39e6737de7 Change rustdoc-scrape-examples to be a target-level configuration 2022-11-16 09:18:33 -08:00