Commit graph

535 commits

Author SHA1 Message Date
Eric Huss 6bd1209a55 Add delays to network retries. 2023-03-31 14:04:48 -07:00
Ed Page 6feea34f8a chore: Upgrade to clap v4.2
Tests in `master` are currently failing because its building with clap
v4.2 but the tests have snapshots from v4.1
2023-03-28 05:00:49 -05:00
Eric Huss 89b86b7da2 Update curl-sys 2023-03-20 11:54:02 -07:00
bors 0dec9a3d59 Auto merge of #11820 - weihanglo:bump-crates-io, r=ehuss
Bump crates-io to 0.36.0

This was an overlook of https://github.com/rust-lang/cargo/pull/11600

Since we already got #11806 to backport, I guess it is not harmful to <https://github.com/rust-lang/cargo/labels/beta-nominated> this as well.  Maybe it do need a backport as `src/cargo/ops/registry.rs` use a new public API from that PR.

BTW, please help check if it is really a breaking change.
2023-03-09 20:19:04 +00:00
Weihang Lo 8296cfe547
Bump crates-io to 0.36.0
This was an overlook of https://github.com/rust-lang/cargo/pull/11600
2023-03-09 17:10:32 +00:00
Weihang Lo 4dccac6a4a
Bump to 0.71.0 2023-03-08 21:46:33 +00:00
Andreas Hollmann ccb8a4acc9 Fix cargo-util version 2023-03-07 13:42:18 +01:00
Sebastian Thiel 6e96095cfc
Adjust git::fetch() progress bar to deal with gitoxide-specifics
The `git2` implementation can leverage that `git2` provides a consistent
view on the objects to be index, so it looks like 33% of the time is spent
receiving objects, and the rest of the time is used resolving them.

In `gitoxide`, there are two distinct phases and these are exposed by the way
we obtain progress for two separate phases. We have to do some math to renormalize
those to a single, continuous progress by mapping the values for 'amount of objects'
to the first half and second half of the progress bar respectively.

This has the advantage of having the first phase (receiving objects) end at 50%
and the second phase (resolving deltas) at 100%.
2023-03-04 14:20:10 +01:00
bors 7b443fbfbf Auto merge of #11796 - epage:deps, r=weihanglo
chore: Update base64

This removes one of cargo's duplicate dependencies as found by #11761.

`base64` is a bit of a controversial crate right now.  It is going through large API changes, making it not as ergonomic for basic cases, which has ticked off a number of people.  I kept it for now because its elsewhere in our dependency tree.

Byron already updated `prodash` to use the latest `parking_lot`

Remaining duplicates
- `hex` is blocked on `crypto-hash` which seems to no longer be maintained
- `hashbrown` is blocked on `indexmap` (updated in master) and `imara-diff`
- `humantime`, `env_logger`, `hermit-abi` are present from the optional `pretty_env_logger` dependency (why are we using optional deps? #6348)
- `windows-sys` is held back by `schannel`, `tempfile`, and `mio`
2023-03-03 08:45:21 +00:00
Sebastian Thiel cfffda9ae5
add -Zgitoxide=fetch feature toggle and implementation.
This allows to use `gitoxide` for all fetch operations, boosting performance
for fetching the `crates.io` index by a factor of 2.2x, while being consistent
on all platforms.

For trying it, nightly builds of `cargo` can specify `-Zgitoxide=fetch`.
It's also possible to set the `__CARGO_USE_GITOXIDE_INSTEAD_OF_GIT2=1` environment
variable (value matters), which is when `-Zgitoxide=none` can be used
to use `git2` instead.

Limitations
-----------
Note that what follows are current shortcomings that will be addressed in future PRs.

- it's likely that authentication around the `ssh` protocol will work differently in practice
  as it uses the `ssh` program.
- clones from `file://` based crates indices will need the `git` binary to serve the locatl repository.
- the progress bar shown when fetching doesn't work like the orgiinal, but should already feel 'faster'.
2023-03-02 12:35:50 +01:00
Ed Page 855b1ad050 chore: Update base64
This removes one of cargo's duplicate dependencies
2023-02-28 15:55:19 -06:00
Weihang Lo b9bfda596f
chore: bump jobserver to respect --jobserver-auth=fifo:PATH'
See https://github.com/alexcrichton/jobserver-rs/pull/49
2023-02-28 16:08:12 +00:00
Weihang Lo ec05b237b2
chore: bump is-terminal to 0.4.4
Fixes #11710. See sunfishcode/is-terminal#18
2023-02-23 14:55:18 +00:00
Eric Huss 43a27cbcde
Revert "Update curl-sys to use libcurl 7.88.1" 2023-02-22 06:55:20 -08:00
bors b6c7fbeb13 Auto merge of #11750 - klensy:pe, r=arlosi
reuse url encoding from `url` crate, don't use separate `percent-encoding`

Reuse encoding from `url`, don't use separate `percent-encoding`.
2023-02-21 17:50:08 +00:00
klensy 37d429ca67 reuse url encoding from url crate, don't use separate percent-encoding 2023-02-21 18:57:25 +03:00
Eric Huss a616356b39 Update curl-sys to use libcurl 7.88.1 2023-02-21 06:44:36 -08:00
Scott Schafer c3043d9a9e chore: Make dependencies alphabetical order 2023-02-15 09:22:08 -06:00
Ed Page 6007f05a85 chore: Update to toml v0.6, toml_edit v0.18
`toml` replaces `toml_edit::easy`, using `toml_edit` as its parser.
2023-01-19 15:26:28 -06:00
Ed Page d52f29897a chore: Deny warnings across entire cargo repo 2023-02-10 16:17:33 -06:00
hzlinyiyu ae91d4ed41 do some clean up 2023-01-31 18:02:57 +08:00
Weihang Lo 03dfbb97ba
Bump to 0.70.0 2023-01-27 21:55:20 +00:00
Ed Page 8fb9effcae test: Update for clap 4.1.3
The latest clap release fixed a bug with the algorithm for providing
suggestions, leading this suggestion to change.
2023-01-23 21:19:48 -06:00
Eric Huss 198d2ee432 Temporarily pin libgit2-sys. 2023-01-21 12:14:31 -08:00
Weihang Lo c51c6bb6ac
chore: reflect to clap updates 2023-01-14 09:23:39 +00:00
Eric Huss 67ae2dcafe
ssh known_hosts: support hashed hostnames 2023-01-10 14:36:39 +01:00
Eric Huss 1387fd4105
Validate SSH host keys 2023-01-10 14:36:22 +01:00
bors 7fb01c68c1 Auto merge of #10771 - Eh2406:asymmetric_tokens, r=ehuss
Asymmetric tokens

Builds on and is blocked by #10592. This adds initial support for Asymmetric Tokens #10519.
2022-12-29 16:39:06 +00:00
Weihang Lo 65827de784
Bump to 0.69.0 2022-12-17 00:21:01 +00:00
Jacob Finkelman 29ff25f6d9 cleanups round 1 2022-12-13 23:49:07 +00:00
Jacob Finkelman ccd69bcf2c Send Asymmetric Tokens to read endpoints 2022-12-12 17:53:05 +00:00
Jacob Finkelman 40325c4d4a generate and check secret_key 2022-12-12 17:52:49 +00:00
Ed Page 48895b1681 fix: Move off atty to resolve soundness issue
There is a soundness issue with atty when building on Windows with a
custom allocator.

This PR switches direct dependencies on atty to is-terminal.  New semver
compatible versions of clap and snapbox remove atty. #11417 upgrades
env_logger to remove it from there.

Fixes #11415
2022-11-25 06:28:01 -06:00
Ed Page 5a3bf71d6a chore: Upgrade to env_logger
This removes one path to `atty`.

Others:
- clap: fixed in 4.0.27
- pretty-env-logger: seanmonstar/pretty-env-logger#52 needs to be resolved first
- snapbox: this will be fixed soonish but is also only a test dependency
- direct dependency

This is part of #11416
2022-11-24 12:01:07 -06:00
Arlo Siemsen 9827412fee Implement RFC 3139: alternative registry authentication support 2022-11-16 14:36:19 -06:00
Weihang Lo 7dc316e0ba
chore: upgrade cargo-util and crates-io 2022-11-13 11:00:55 +00:00
Weihang Lo a3d4cd4732
Bump to 0.68.0 2022-11-05 00:41:09 +00:00
Ed Page 25f838bfb7 chore: Upgrade snapbox 2022-11-02 23:15:48 -05:00
Eric Huss d3a208a9b5 Update curl-sys 2022-11-02 13:03:11 -07:00
Kornel 589d704209 Newer anyhow features are required 2022-10-31 15:33:27 +00:00
Eric Huss d014c2929d Update libcurl 2022-10-27 17:20:09 -07:00
Ed Page a9f704aaaa fix: Remove leading newline in vendor output
This supersedes #11271
2022-10-21 12:27:21 -05:00
Ed Page 5f30808d00 chore: Update tests for latest clap 2022-10-13 15:16:38 -05:00
bors b2ee005824 Auto merge of #11162 - pacak:master, r=ehuss
Expose libgit2-sys/vendored feature as vendored-libgit2

### What does this PR try to resolve?

Compiling cargo on MacOS can be problematic due present libraries, `cargo` already supports vendoring for openssl (and it helps https://github.com/pacak/cargo-show-asm/pull/51 to some users). This pull request attempts to extend vendoring support to libgit2 in order to fix more foreign library issues: https://github.com/pacak/cargo-show-asm/issues/50

While it is possible for me to enable it on my side (https://github.com/pacak/cargo-show-asm/pull/52) a special care needs to keep versions in sync. Exposing this feature in `cargo` directly will make such fixes for my and other crates more robust.

### How should we test and review this PR?
Disabled by default means existing behavior is unchanged, testing with it enabled to confirm if it still works should do the trick.
2022-09-30 00:14:30 +00:00
Michael Baikov 8818a89330 Expose libgit2-sys/vendored feature as vendored-libgit2
disabled by default
2022-09-29 12:17:25 -04:00
Ed Page 96948f7a24 refactor(cli): Upgrade to clap v4 2022-09-28 13:32:14 -05:00
Weihang Lo 92df3e73e6
Bump to 0.67.0 2022-09-23 09:20:30 +01:00
bors 9230e4839d Auto merge of #11113 - rdimartino:maybeworkspace-deserialize, r=epage
Improve errors for TOML fields that support workspace inheritance

Fixes #10997

This also addresses the issue with `MaybeWorkspace<VecStringOrBool>` mentioned in #10942:

```
Caused by:
  invalid type: string "foo", expected a boolean or vector of strings for key `package.publish`
```

I removed the `maybe_workspace_vec_string` deserializer in 7a50c0c718 because the error message from the inner `Vec<String>` is now surfaced, but I can revert that if it's preferable to keep those changes.

I tried to base the `deserialize` implementation off of the derived impl for an untagged enum from `cargo expand`. This approach [ultimately led me](https://github.com/serde-rs/serde/blob/v1.0.144/serde/src/private/de.rs#L218) to adding the `serde-value` dependency.
2022-09-22 20:10:33 +00:00
Weihang Lo bf1523b663
test: renamed uplifted artifact remains unmodified after rebuild 2022-09-21 16:02:42 +01:00
Robert DiMartino 06c31de972 Improve errors for TOML fields that support workspace inheritance 2022-09-19 23:41:20 -04:00