Commit graph

571 commits

Author SHA1 Message Date
Weihang Lo ff644b8cac
Bump to 0.74.0 2023-07-15 00:20:53 +01:00
Arlo Siemsen d45ba88290 Bump version of crates-io due to unintentional semver-breaking change 2023-07-13 14:35:09 -05:00
Eric Huss 119fede29f Update criterion 2023-07-09 15:59:30 -07:00
dependabot[bot] ff26beca25
build(deps): bump openssl from 0.10.54 to 0.10.55
Bumps [openssl](https://github.com/sfackler/rust-openssl) from 0.10.54 to 0.10.55.
- [Release notes](https://github.com/sfackler/rust-openssl/releases)
- [Commits](https://github.com/sfackler/rust-openssl/compare/openssl-v0.10.54...openssl-v0.10.55)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-21 22:59:06 +00:00
bors 0d5370a9ae Auto merge of #12268 - epage:direct, r=weihanglo
fix(embedded): Don't create an intermediate manifest

### What does this PR try to resolve?

More immediately, this is to unblock rust-lang/rust#112601

More generally, this gets us away from hackily writing out an out-of-line manifest from an embedded manifest.  To parse the manifest, we have to write it out so our regular manifest
loading code could handle it.  This updates the manifest parsing code to
handle it.

This doesn't mean this will work everywhere in all cases though.  For
example, ephemeral workspaces parses a manifest from the SourceId and
these won't have valid SourceIds.

As a consequence, `Cargo.lock` and `CARGO_TARGET_DIR` are changing from being next to
the temp manifest to being next to the script.  This still isn't the
desired behavior but stepping stones.

### How should we test and review this PR?

A Commit at a time

### Additional information

In production code, this does not conflict with #12255 (due to #12262) but in test code, it does.
2023-06-17 08:08:50 +00:00
Ed Page 575b9ac934 fix(embedded): Don't create an intermediate manifest
To parse the manifest, we have to write it out so our regular manifest
loading code could handle it.  This updates the manifest parsing code to
handle it.

This doesn't mean this will work everywhere in all cases though.  For
example, ephemeral workspaces parses a manifest from the SourceId and
these won't have valid SourceIds.

As a consequence, `Cargo.lock` and `CARGO_TARGET_DIR` are changing from being next to
the temp manifest to being next to the script.  This still isn't the
desired behavior but stepping stones.

This also exposes the fact that we didn't disable `autobins` like the
documentation says we should.
2023-06-16 21:08:47 -05:00
Ed Page 4e0ac38b52 refactor(embedded): Switch to syn for parsing doc comments
The hope is this will result in more resilient comment handling, being
more consistent with rustdoc.

I also hoped for less code but `syn` is doing less than I had expected,
requiring us to copy code over from other parts of rust.  It seems every
proc macro has to do this but there is no guide to it, so they all do it
differently, only covering the cases they thought to test for.

Note that this still won't support `include_str!()`.
2023-06-14 14:43:35 -05:00
Ed Page 33c9d8e2fd feat(cli): Pull in cargo-script-mvs core logic
This is no where near the implementation we want but I think we should
develop incrementally on top of what we already have.

See https://github.com/epage/cargo-script-mvs/tree/main
2023-06-09 22:03:18 -05:00
Sebastian Thiel b0e99edd0d
Upgrade to gix v0.45 for multi-round pack negotiations.
Previously, fetches and clones would routinely fail with a panic
that indicated that pack-negotiation can't take longer than 1 round
with our previous `Naive` approach.

With this version of `gitoxide` there is now faithful support for both
the `consecutive` and the `skipping` algorithm and multiple rounds of
negotiations, which should make all clones and fetches possible.
2023-06-06 20:08:52 +02:00
bors bdd367f366 Auto merge of #12218 - ehuss:update-curl, r=weihanglo
Update curl-sys

This is a routine update for libcurl. Changelog:
* https://curl.se/changes.html#8_1_0
* https://curl.se/changes.html#8_1_1
* https://curl.se/changes.html#8_1_2
2023-06-02 10:36:53 +00:00
Weihang Lo 1fc4852e32
Bump to 0.73.0 2023-06-02 01:21:23 +01:00
Eric Huss 14000767e9 Update curl-sys 2023-06-01 17:01:14 -07:00
Weihang Lo fa7cc198aa
refactor: replace some usages of lazy_static with OnceLock
* Some usages still wait for `LazyCell`.
* `TEST_ROOTS` is no longer used. Removed.
2023-06-01 22:11:20 +01:00
Weihang Lo 8cb220f5eb
refactor: use IsTerminal from std instead of is-terminal crate 2023-06-01 21:50:43 +01:00
klensy 53715ab7ed deps: remove unused features from windows-sys 2023-05-24 13:24:29 +03:00
WANG Rui 526f5aefda Update libc to 0.2.144 2023-05-09 21:15:55 +08:00
Eric Huss 1ff784888f Update git2 2023-05-06 12:59:38 -07:00
Scott Schafer 34b8c39d77 chore: Use [workspace.dependencies] 2023-04-28 09:56:09 -05:00
Sebastian Thiel ed55f77c25
upgrade gix to v0.44 to remove empty shallow files. 2023-04-27 14:19:23 +02:00
Sebastian Thiel 4b93f095c8
Various improvements to address the PR review.
https://github.com/rust-lang/cargo/pull/11840#pullrequestreview-1383844802
2023-04-27 14:19:01 +02:00
Sebastian Thiel c7ff94fce8
Enable shallow clones and fetches for registry and git dependencies.
The implementation hinges on passing information about the kind of clone
and fetch to the `fetch()` method, which then configures the fetch accordingly.

Note that it doesn't differentiate between initial clones and fetches as
the shallow-ness of the repository is maintained nonetheless.
2023-04-27 14:18:22 +02:00
Eric Huss a4f01c0352 Update home dependency 2023-04-25 11:38:52 -07:00
bors a4a8bd1742 Auto merge of #12021 - ehuss:update-windows-sys, r=weihanglo
Update windows-sys

This updates the windows-sys dependency from 0.45 to 0.48. This shouldn't add or remove any duplicate dependencies (since there are other dependencies still using 0.45 and 0.42). The intent is to move it along the direction towards unifying in the future (though it seems like a moving target that will be difficult to ever hit).

This also bumps the home crate version. I think it should be OK to make the migration from winapi to windows-sys a patch version, though there seems to be some issues with the way windows-sys works that could introduce some build-time problems in some situations (such as those encountered in https://github.com/rust-lang/rust/pull/108665 and https://github.com/rust-lang/rust/pull/106610). However, I don't expect too much of an issue.
2023-04-24 11:50:26 +00:00
Eric Huss eea69e549f Bump versions of local crates 2023-04-23 13:01:29 -07:00
Eric Huss ac25009500 Update windows-sys 2023-04-23 12:40:00 -07:00
Luca Barbato dfb4be81a8 Add the Win32_System_Console feature since it is used 2023-04-22 13:24:59 +02:00
bors de80432f04 Auto merge of #12012 - weihanglo:version-bump, r=epage
Bump to 0.72.0; update changelog

[rendered](https://github.com/weihanglo/cargo/blob/version-bump/CHANGELOG.md)
2023-04-21 13:18:32 +00:00
Weihang Lo 8966ab0e19
chore: remove src/doc from exclude list in Cargo.toml 2023-04-21 10:58:45 +01:00
QiangHeisenberg 9ba0d4439b output use line wrap 2023-04-21 11:25:09 +08:00
Weihang Lo caf0c82b4c
Bump to 0.72.0 2023-04-21 01:12:56 +01:00
Ed Page 895435fba9 chore: Use globs for workspace members
This is a short-term option until we can have a better solution for
globbing.  This does not update `benches/` to support which has a README
in there preventing globbing; this seems low-churn enough not to find a
solution for it.

On the next sync-up with rust-lang/rust, we'll need to update 4e46301258/src/bootstrap/tool.rs (L588-L603)

Fixes #11988
2023-04-18 20:02:21 -05:00
Weihang Lo a0bb59c8a8
chore: use openssl only on non-Windows platforms 2023-04-16 07:56:54 +01:00
Weihang Lo aaca5a0a56
chore: remove dependency rustc-workspace-hack
Co-authored-by: Scott Schafer <schaferjscott@gmail.com>
Co-authored-by: Eric Huss <eric@huss.org>
2023-04-12 11:32:58 +01:00
Weihang Lo 796853ca54
chore: new Cargo feature all-static
This is primarily for the release process of rust-lang/rust.

Note that in rustc-worksace-hack[1] it enable http2 via libnghttp2,
cargo probably needs to enable it to compile in rust-lang/rust.

[1]: 992d154f3a/src/tools/rustc-workspace-hack/Cargo.toml (L77)

Co-authored-by: Scott Schafer <schaferjscott@gmail.com>
Co-authored-by: Eric Huss <eric@huss.org>
2023-04-12 11:30:42 +01:00
Weihang Lo ecfe92776c
chore: create a [workspace] for cargo
Some dependencies in `resolver-tests` do not have any license
information. This prevent it from being a member when integrating in
rust-lang/rust. Will figure it out after.

Co-authored-by: Scott Schafer <schaferjscott@gmail.com>
Co-authored-by: Eric Huss <eric@huss.org>
2023-04-12 11:30:42 +01:00
Eric Huss 78970bd4a8 Update git2 2023-04-02 15:37:53 -07:00
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