30 Commits

Author SHA1 Message Date
Eric Huss
1ce8023626 Rustfmt 2024 2025-07-05 19:50:36 -07:00
Ross Sullivan
92d9a94d02
chore: Migrated testsuite to testsuite::prelude 2025-06-25 22:37:24 +09:00
Ed Page
55350fc670 test: Switch from 'exec_with_output' to 'run'
This is a follow up to #14846 which changed `run` to return the
`RawOutput`.

Reasons I didn't "update" some code to the new `run` return value
- We were actually using `ProcessBuilder::exec_with_output` and I didn't
  want to disentangle what it would take to switch to `Execs`
- We did processing on the `Result` and I didn't want to check how that
  could be updated
2024-11-21 13:48:27 -06:00
Sebastian Dröge
dd698ff048 Always include Cargo.lock in published crates
Originally it was only included for packages that have executables or
examples for `cargo install`, however this causes inconsistencies and
is kind of unexpected nowadays, e.g. with cdylib crates.

Including it always only slightly increases the crate size and allows
for all crates to know a set of dependency versions that were working,
which can make regression tracking easier.

Fixes https://github.com/rust-lang/cargo/issues/13447
2024-11-14 09:06:18 +02:00
sanchitlegalai
6ede1e2b27 fix(publish): Bail on existing version 2024-09-06 13:25:55 -05: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
Ed Page
5b9799c6f4 refactor: Migrate from extern crate to test-support prelude
We now include the prelude in so many places, this simplifies how we can
present how `cargo-test-support` works.

Yes, this included some `use` clean ups but its already painful enough
walking through every test file, I didn't want to do it twice.
2024-07-12 15:57:00 -05:00
eth3lbert
b7c005459c
test: migrate registry_auth to snapbox 2024-06-27 22:41:17 +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
995746b937 refactor: Port from matches_contains to assert_e2e 2024-05-29 14:08:10 -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
14646e6af6 test: Make edition explicit on packages 2024-02-22 11:37:03 -06:00
Ed Page
e7e8d8748a fix(compiler): Clarify we're showing a profile name 2024-02-08 14:01:39 -06:00
Ed Page
69eb49194b fix: Switch more notes/warnings to lowercase
See https://doc.crates.io/contrib/implementation/console.html#style

By fixing existing cases, we make it more likely people will copy a case
they should.

I left out multi-sentance cases because I was unsure how to handle those

r? @weighanglo
2024-02-06 19:52:12 -06:00
Arlo Siemsen
d345ca212f feat: stabilize credential-process and registry-auth 2023-09-16 22:40:45 -05:00
Arlo Siemsen
8c13e9ae3f Create dedicated unstable flag for asymmetric-token 2023-08-24 00:12:50 -05:00
Arlo Siemsen
2b39792aef Credential provider implementation 2023-07-21 16:02:24 -05:00
Eric Huss
d6c20cf109 Fix redacting tokens in http debug. 2023-05-06 12:41:06 -07:00
Eric Huss
4702fa3ad3 Include the IP address in HTTP errors. 2023-04-12 09:38:53 -07:00
Eric Huss
a9e0b505d6 Update auth error message to specify args for cargo login. 2023-04-10 10:20:21 -07:00
Scott Schafer
ab1794bda4 chore: update registry_auth tests to use check 2023-02-20 12:22:24 -06:00
Arlo Siemsen
f1dadb6309 Do not error for auth-required: true without -Z sparse-registry 2023-01-31 11:03:02 -06:00
bors
985d561f0b Auto merge of #11224 - arlosi:sparse-stable, r=Eh2406
Stabilize sparse-registry

### What does this PR try to resolve?
Stabilize `sparse-registry`
* Does not change the default protocol for accessing crates.io

### How should we test and review this PR?
Set environment variable `REGISTRIES_CRATES_IO_PROTOCOL=sparse` or set in `config.toml`:
```
[registries.crates-io]
protocol = 'sparse'
```

cc #9069
2023-01-20 14:39:28 +00:00
Ed Page
ed8b85f10e chore: Fix typos 2023-01-10 20:03:11 -06:00
Arlo Siemsen
7dc5506756 Stabilize sparse-registry 2023-01-05 11:04:52 -06:00
Jacob Finkelman
d464dbbb5e add tests 2022-12-19 21:16:04 +00:00
Jacob Finkelman
6b83b3dc54 more tests 2022-12-14 21:45:25 +00:00
Jacob Finkelman
2ac15086fb end-to-end tests 2022-12-12 21:50:08 +00:00
Arlo Siemsen
9827412fee Implement RFC 3139: alternative registry authentication support 2022-11-16 14:36:19 -06:00