25 Commits

Author SHA1 Message Date
Scott Schafer
022dc5b381
chore: Address most typos 2025-09-02 18:15:50 -06:00
Ross Sullivan
92d9a94d02
chore: Migrated testsuite to testsuite::prelude 2025-06-25 22:37:24 +09:00
Ed Page
d2ec764995 fix(resolve): Dont show locking workspace members
This is for `cargo generate-lockfile` and when syncing the lockfile with
the manifest.
We still show it for `cargo update` because of `cargo update
--workspace`.

We hacked around this previously by filtering out the `num_pkgs==1` case
for single packages but this didn't help with workspaces.
2024-08-22 16:57:06 -05:00
l00556901
8b038ebdf0 test: migrate docscrape to snapbox 2024-06-30 22:43:23 +08:00
Ed Page
dc5ac62cab fix(test): Deprecate non-snapbox assertions
While this is noisy and hides other deprecations, I figured deprecations would
make it easier for people to discover what tasks remain and allow us to
divide and conquer this work rather than doing a heroic PR.
In theory, this will be short lived and we'll go back to seeing
deprecations in our tests.
2024-06-10 10:20:52 -05:00
Ed Page
1876326b6b feat(resolve): Tell the user the style of resovle done
This is to help with #9930

Example changes:
```diff
-[LOCKING] 4 packages
+[LOCKING] 4 packages to latest version
-[LOCKING] 2 packages
+[LOCKING] 2 packages to latest Rust 1.60.0 compatible versions
-[LOCKING] 2 packages
+[LOCKING] 2 packages to earliest versions
```

Benefits
- The package count is of "added" packages and this makes that more
  logically clear
- This gives users transparency into what is happening, especially with
  - what rust-version is use
  - the transition to this feature in the new edition
  - whether the planned config was applied or not (as I don't want it to
    require an MSRV bump)
- Will make it easier in tests to show what changed
- Provides more motiviation to show this message in `cargo update` and
  `cargo install` (that will be explored in a follow up PR)

This does come at the cost of more verbose output but hopefully not too
verbose.  This is why I left off other factors, like avoid-dev-deps.
2024-04-13 20:39:59 -05:00
Ed Page
4ab2797f36 feat(lock): Print lockfile changes on all commands 2024-03-12 13:39:56 -05:00
Ed Page
1b6ff9a62a test: Make edition explicit on packages
This is a follow up to 14646e6af6b22a135eefe771029425ac29f259f1

I don't run these tests locally, so I missed them.
2024-02-29 15:48:41 -06:00
Ed Page
e7e8d8748a fix(compiler): Clarify we're showing a profile name 2024-02-08 14:01:39 -06:00
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