Commit graph

508 commits

Author SHA1 Message Date
Weihang Lo c4f9712a42
chore: bump patch version due to refactor 2023-09-14 14:44:44 +08:00
Weihang Lo 8a404ea711
chore: update globset to 0.4.13 2023-09-13 16:16:09 +08:00
Ed Page 51e1058379 refactor(shell): Centralize Shell styling
This is a very rough pass at naming the styles with a focus on getting
something in and keeping the colors the same.
2023-09-11 09:51:09 -05:00
Ed Page 2d5354adc9 refactor(cli): Extract CLI style definitions 2023-09-11 09:32:13 -05:00
bors c2d26f32d3 Auto merge of #12578 - epage:help, r=weihanglo
feat(help): Add styling to help output

### What does this PR try to resolve?

Try to make `--help` output easier to parse by using terminal styling

Screenshots:

![Screenshot from 2023-09-06 09-57-11](https://github.com/rust-lang/cargo/assets/60961/61069af4-ef05-40ad-9240-fedea44d4c71)

![Screenshot from 2023-09-06 09-57-21](https://github.com/rust-lang/cargo/assets/60961/d2e69024-42aa-47c0-ad0f-24e43551b8db)

![Screenshot from 2023-09-06 09-57-36](https://github.com/rust-lang/cargo/assets/60961/e3d895e2-745f-48c6-9e84-d6fb67198d6d)

*(`nargo` is my shell script wrapping `cargo run --manifest-path cargo/Cargo.toml`)*

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

At this time, the only styling snapshotting library I know of is a pain to use, so testing this requires manually running the commands which I did.  Screenshots are included for easier evaluation of the general idea.

Snapshotting of the plain text output ensures we don't have accidental formatting regressions from this change since the formatting isn't as obvious from looking at the code.

### Additional information

Traditionally, cargo has disabled clap's styled output.  My assumed
reason is that cargo mixes custom help output with auto-generated and
you couldn't previously make it all styled.
Clap 4.2 allowed users to pass in strings styled using ANSI escape
codes, allowing us to pass in styled text that matches clap, unblocking this.  In clap
4.4.1, clap gained the ability for the user to override the style.

In this PR, I decided to use the new 4.4.1 feature to style clap's
output to match the rest of cargo's output.  Alternatively, we could use
a more subdue style that clap uses by default.

I used the `color-print` crate to allow something almost html-like for styling `&static str`.  Alternatively, we could directly embed the ANSI escape codes harder to get write, harder to inspect), or we could do the styling at runtime and enable the `string` feature in clap.

I decided to *not* style `Arg::help` messages because
- It might be distracting to have the descriptions lit up like a
  christmas tree
- It is a lot more work

The one exception I made was for `--list` since it is for a
psuedo-command (`...`) and I wanted to intentionally draw attention to
it.

#12593 made styling of `cargo -h` cleaner imo.
#12592 and #12594 were improvements I noticed while doing this.
2023-09-11 06:25:47 +00:00
bors 8bd32310f5 Auto merge of #12631 - Eh2406:strip_prefix, r=epage
Ues strip_prefix for cleaner code

### What does this PR try to resolve?

In https://github.com/rust-lang/cargo/pull/12629#pullrequestreview-1614154046 Ed pointed out how much cleaner the code can be using `strip_prefix`, so I found a bunch more places where we should be using it.

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

Internal refactor and test still pass.
2023-09-08 20:05:02 +00:00
Jacob Finkelman 2b2838302f bump cargo-platform 2023-09-08 19:16:42 +00:00
Arlo Siemsen f020b00bdd Bump cargo-credential-1password to v0.4.0 2023-09-07 13:52:15 -05:00
Arlo Siemsen e58b84d35e breaking change(cargo-credential)
Changes the JSON format for cache:expires
2023-09-05 15:22:27 -05:00
Jacob Finkelman 16b330bc59 stop using lazy_static 2023-09-01 21:38:03 +00:00
Ed Page dbbc5dd6eb feat(help): Add styling to help output
Traditionally, cargo has disabled clap's styled help output.  My assumed
reason is that cargo mixes custom help output with auto-generated and
you couldn't previously make it all styled to match.  Clap 4.2 allowed
users to pass in strings styled using ANSI escape codes, allowing us to
pass in styled text that matches clap, unblocking this.  In clap
4.4.1, clap gained the ability for the user to override the style,
allowing us to choose the styling as we wish.

In this PR, I decided to use the new 4.4.1 feature to style clap's
output to match the rest of cargo's output.  Alternatively, we could use
a more subdue style that clap uses by default.  That subdued style was
mostly chosen to be app theme neurtral (since we didn't have theming
support yet) and there were problems with our style and no one stepped
up to fix them (cargo has a style we can match to instead).

I decided to *not* style `Arg::help` messages because
- It might be distracting to have the descriptions lit up like a
  christmas tree
- It is a lot more work

The one exception I made was for `--list` since it is for a
psuedo-command (`...`) and I wanted to intentionally draw attention to
it.
2023-09-01 09:30:20 -05:00
renovate[bot] b7408c7261
chore(deps): update compatible 2023-09-01 07:44:26 +00:00
renovate[bot] fd28a0383a
chore(deps): update rust crate cargo_metadata to 0.17.0 2023-09-01 02:16:59 +00:00
Arlo Siemsen 39db61e26e fix: add error for unsupported credential provider version 2023-08-29 21:22:29 -05:00
Eric Huss 58b5951d9f Update git2 2023-08-28 13:17:01 -07:00
David Tolnay 3871aecf3e
Improve deserialization errors of untagged enums 2023-08-27 16:27:08 -07:00
Eric Huss 3b6a008f73 Update serde 2023-08-26 11:40:10 -07:00
Deadbeef 3d50f47197 Add fields for bindeps on the registry 2023-08-25 01:43:29 +00:00
Ed Page 7a65c826a0 fix: Set MSRV for internal packages
For now, I'm punting on packages we generally expect others to use
2023-08-22 16:46:47 -05:00
Weihang Lo c1f7e2bb04
chore: upgrate clap to 4.3.23 2023-08-22 17:24:40 +01:00
Weihang Lo 5ab8a97645
Bump to 0.75.0 2023-08-22 11:54:44 +01:00
Ed Page 4793669b13 chore: Downgrade serde below the binary blob
As of serde 1.0.172, `serde_derive` ships a binary blog for Linux x64
for faster build times.  This blob is not yet reproducible to ensure
that the safety of it.  See serde-rs/serde#2538

This is not a judgement on serde or on dtolnay but just a precaution to
buy us more time as the community works through this since the beta cut
is coming up.  rust-1.72 branch is unaffected.
2023-08-18 19:33:32 -05:00
Arlo Siemsen 763edbab09 rename crate to cargo-credential-libsecret 2023-08-17 16:05:31 -05:00
Arlo Siemsen 3d8e8d32cd credential: make gnome-secret built-in as cargo:libsecret 2023-08-17 13:58:18 -05:00
bors 937b930a77 Auto merge of #12518 - arlosi:cred-dlopen, r=epage
cargo-credential-gnome-secret: dynamically load libsecret

Building `cargo-credential-gnome-secret` currently requires the `libsecret` development libraries to be installed and findable via `pkg-config`. This is often an extra step for users and complicates CI builds.

This loads the required functions from `libsecret` dynamically using `libloading` which uses `dlopen` internally.

Closes #12503

Testing this requires manually installing the credential provider on a system with libsecret set up. I tested it on Arch Linux.
2023-08-17 16:56:21 +00:00
Arlo Siemsen b74e5a0e7e credential: make 1password no longer built-in 2023-08-17 00:47:30 -05:00
Arlo Siemsen 627936bdf6 cargo-credential-gnome-secret: dynamically load libsecret 2023-08-17 00:18:00 -05:00
Weihang Lo 5691da2b79
chore(cargo-util): bump version to 0.2.6 2023-08-16 20:06:40 +01:00
Eric Huss a008741136 Update hermit-abi 2023-08-15 13:29:54 -07:00
Arlo Siemsen 5ade1ad1eb cargo-credential: reset stdin & stdout to the Console 2023-08-10 13:33:33 -05:00
bors 211fd7eac1 Auto merge of #12458 - weihanglo:tracing, r=epage
refactor: migrate to `tracing`
2023-08-07 20:59:03 +00:00
Arlo Siemsen af95711ae5 Add more docs and example for cargo-credential 2023-08-07 13:00:56 -05:00
Weihang Lo 9d707e4b9a
chore: remove log, env_logger, and pretty_env_logger 2023-08-07 12:02:19 +01:00
Weihang Lo 23561f36a1
chore: add tracing-subscriber crate 2023-08-07 11:25:41 +01:00
Weihang Lo 9f0565e985
chore: add tracing crate 2023-08-07 11:21:55 +01:00
Eric Huss c4b0e6b95a Update schannel from 0.1.21 to 0.1.22 2023-08-05 14:28:15 -07:00
Eric Huss 850ff884e8 Update miow from 0.5.0 to 0.6.0 2023-08-05 14:27:40 -07:00
Eric Huss 580bbf90f8 Update pretty_env_logger to 0.5 2023-08-03 15:14:02 -07:00
WANG Rui a28c597e17 Update rustix to 0.38.6 2023-08-02 23:07:03 +08:00
bors 6145d0c4d2 Auto merge of #12395 - weihanglo:cargo-semver-checks, r=epage
ci: rewrite bump check and respect semver

### What does this PR try to resolve?

This ports `ci/validate-version-bump.sh` and #12200 to the new xtask `bump-check`. It also adds the ability to set the correct baseline revision when checking version bump. That is, it fixes #12347.

In addition, this integrates the community tool `cargo-semver-checks`. SemVer violation can now be detected earlier.

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

This PR extracts the registry query part from `xtask-unpublished` and removes other pars. I don't feel like we need it in the short term.

For how it works, please the check doc comment in each function.

One concern is that this check is still a required job for bors. I believe `@obi1kenobi` is quite responsive and willing to help if there is something wrong. So, waiting for an upstream fix won't be a problem for cargo. Also as a good citizen in the community, we can always contribute back.
(Take it easy `@obi1kenobi,` don't be stressed out 🙂)
<!-- homu-ignore:end -->
2023-08-01 23:00:45 +00:00
Weihang Lo 8d31d626a2
chore: remove xtask-unpublished 2023-08-01 22:54:41 +01:00
Weihang Lo 9cca5721e4
chore: new xtask bump-check
This is a rewrite of old `ci/validate-version-bump.sh` in Rust.
2023-08-01 22:54:40 +01:00
renovate[bot] 599fe4c9ba
chore(deps): update compatible 2023-08-01 02:18:22 +00:00
Arlo Siemsen a81d558941 Use thiserror for credential provider errors 2023-07-31 13:45:08 -05:00
bors c86366091b Auto merge of #12399 - epage:normalize, r=weihanglo
fix(package): Recognize and normalize `cargo.toml`

### What does this PR try to resolve?

This solution is a blend of conservative and easy
- Normalizes `cargo.toml` to `Cargo.toml` on publish
  - Ensuring we publish the `prepare_for_publish` version and include `Cargo.toml.orig`
  - Avoids dealing with trying to push existing users to `Cargo.toml`
- All other cases of `Cargo.toml` are warnings
  - We could either normalize or turn this into an error in the future
  - When helping users with case previously, we've only handle the `cargo.toml` case
  - We already should have a fallback in case a manifest isn't detected
  - I didn't want to put in too much effort to make the code more complicated to handle this

As a side effect, if a Linux user has `cargo.toml` and `Cargo.toml`, we'll only put one of them in the `.crate` file.  We can extend this out to also include a warning for portability for case insensitive filesystems but I left that for after rust-lang/cargo#12235.

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

A PR at a time will show how the behavior changed as the source was edited

This does add a direct dependency on `unicase` to help keep case-insensitive comparisons easy / clear and to avoid riskier areas for bugs like writing an appropriate `Hash` implementation.  `unicase` is an existing transitive dependency of cargo.

### Additional information

Fixes #12384

[Discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/.60cargo.2Etoml.60.20on.20case.20insensitive.20filesystems)
2023-07-29 21:55:49 +00:00
Eric Huss d711c12535 Update curl-sys to pull in curl 8.2.1 2023-07-27 10:55:18 -07:00
Ed Page cc6b6c9584 fix(package): Avoid multiple package list entries
To keep things simple, especially in getting a `Hash` implementation
correct, I'm leveraging `unicase` for case-insensitive
comparisons which is an existing dependency and I've been using for
years on other projects.

This also opens the door for us to add cross-platform compatibility
hazard warnings about multiple paths that would write to the same
location on a case insensitive file system.  I held off on that because
I assume we would want #12235 first.

This does mean we can't test the "no manifest" case anymore because the
one case (no pun intended) I knew of for hitting it is now gone.
2023-07-26 11:02:47 -05:00
bors 54dfa98bbe Auto merge of #12401 - weihanglo:bump-home, r=epage
chore: update `home` to 0.5.7
2023-07-26 14:20:39 +00:00
Weihang Lo 46bf05dcaf
chore: update home to 0.5.7 2023-07-26 11:26:49 +01:00
Eric Huss 9a5ed74983 Update curl-sys to pull in curl 8.2.0 2023-07-25 08:53:11 -07:00
Arlo Siemsen 2b39792aef Credential provider implementation 2023-07-21 16:02:24 -05:00
Weihang Lo 31b500c7c0
refactor(crates-io): use thiserror
Optionally use `thiserror` to reduce boilerplates but this part can
be dropped if we don't want.
2023-07-18 22:22:47 +01:00
Weihang Lo b4499af4e9
refactor(crates-io): remove anyhow
This removes the dependency `anyhow` and uses our own custom Error
enum, so that crates-io consumer can access `Error::API::challenge`
field.
2023-07-18 22:22:47 +01:00
Weihang Lo 6805944715
feat(crates-io): expose headers for ResponseError::Api
In response to RFC 3231 [^1], our registry client need to return headers
to caller, so that the caller (cargo binary) can continue parsing
challenge headers.

[^1]: https://rust-lang.github.io/rfcs/3231-cargo-asymmetric-tokens.html#the-authentication-process
2023-07-18 22:22:46 +01:00
abhiram 04e5675717 Fix "cargo doc --open" crash on WSL2
"cargo doc --open" does not work on WSL2 due to a bug in the 'opener'
crate. Updated 'opener' to v0.6.1 to fix this issue.
2023-07-18 15:58:22 +05:30
Josh Stone 2bb6f9eb8a Upgrade to indexmap v2
No code changes are required for the current uses of indexmap.

I also updated `toml_edit` to get its update to `indexmap 2`, and
`gix-hashtable` to align them all on `hashbrown 0.14`.
2023-07-17 14:15:29 -07:00
Ed Page 83a5859221 chore(platform): Version bump 2023-07-17 13:21:41 -05:00
Ed Page 4bd5f9ca50 chore(util): Version bump 2023-07-17 13:21:41 -05:00
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
Weihang Lo bf06fc856f
Update dependencies
Hand-picked some dependencies to update. Looks pretty safe?

- anyhow
- base64
- clap@4.2.1
- flate2
- git2
- libgit2-sys
- log
- openssl
- pkg-config
- proptest
- pulldown-cmark
- serde
- serde_json
- snapbox
- tempfile
- time
- toml
- toml_edit
- url
2023-06-13 14:39:55 +01: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
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
Eric Huss 5c99dc43cb Update lock to normalize home dep 2023-05-04 07:24:48 -07:00
bors 2f06c80bd0 Auto merge of #11840 - Byron:shallow-support, r=weihanglo
support for shallow clones and fetches with `gitoxide`

This PR makes it possible to enable shallow clones and fetches for git dependencies and crate indices independently with the `-Zgitoxide=fetch,shallow_deps` and `-Zgitoxide=fetch,shallow_index` respectively.

### Tasks

* [x] setup the shallow option when fetching, differentiated by 'registry' and 'git-dependency'
* [x] validate registries are cloned shallowly *and* fetched shallowly
* [x] validate git-dependencies are cloned shallowly *and* fetched shallowly
* [x] a test to show what happens if a shallow index is opened with `git2` (*it can open it and fetch like normal, no issues*)
* [x] assure that `git2` can safely operate on a shallow clone - we unshallow it beforehand, both for registries and git dependencies
* [x] assure git-deps with revisions are handled correctly (they should just not be shallow, and they should unshallow themselves if they are)
* [x] make sure shallow index clones aren't seen by older cargo's
* [x] make sure shallow git dependency clones aren't seen by older cargo's
* [x] shallow.lock test and more test-suite runs with shallow clones enabled for everything
* [x] release new version of `gix` with full shallow support and use it here
* [x] check why `shallow` files remain after unshallowing. Should they not rather be deleted if empty? - Yes, `git` does so as well, implemented [with this commit](2cd5054b0a)
* ~~see if it can be avoided to ever unshallow an existing `-shallow` clone by using the right location from the start. If not, test that we can go `shallow->unshallow->shallow` without a hitch.~~ Cannot happen anymore as it can predict the final location perfectly.
* [x] `Cargo.lock` files don't prevent shallow clones
* [x] assure all other tests work with shallow cloning enabled (or fix the ones that don't with regression protection)
* [x] can the 'split-brain' issue be solved for good?

### Review Notes

* there is a chance of 'split brain' in git-dependencies  as the logic for determining whether the clone/fetch is shallow is repeated in two places. This isn't the case for registries though.

### Notes

* I am highlighting that this is the `gitoxide` version of shallow clones as the `git2` version [might soon be available](https://github.com/libgit2/libgit2/pull/6396) as well. Having that would be good as it would ensure interoperability remains intact.
* Maybe for when `git2` has been phased out, i.e. everything else is working, I think (unscientifically) there might be benefits  in using worktrees for checkouts. Admittedly I don't know the history of why they weren't used in the first place. Also: `gitoxide` doesn't yet support local clones and might not have to if worktrees were used instead.
2023-05-03 07:12:20 +00:00
Sebastian Thiel 99316c8e43
set openssl-src to specific version
This recreates the previously lost change from https://github.com/rust-lang/cargo/pull/12005.
2023-04-29 14:20:10 +02:00
Weihang Lo c01bad9b20
mdman: make build-man part of xtask
Turn `src/doc/build-man.sh` into a Cargo binary target.
So is `crates/mdman/build-man.sh`.
2023-04-28 15:46:37 +01:00
Weihang Lo 981282891f
xtask-stale-label: check stale paths in autolabel defintions 2023-04-28 12:02:51 +01:00
Utkarsh Gupta fd1f1043e0
home: bump version & update changelog 2023-04-27 22:00:19 +05:30
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
Ed Page 077b1bc311 chore: Mark unpublished crates as such
This is a follow up to #12039.
This makes it easier for tools to report less irrelevant information.

I did both `publish = false` and `version = "0.0.0"` to help draw
attention to the fact that these crates are internal (inspired by a
matklad post).

I left `cargo-test-macro` and `cargo-test-support` in for my own
personal bias of one day wanting to see those crates published...

The only one removed that had previously been published was `mdman` but
seeing as that was a `0.0.0`, I'm assuming that was a mistake or just
reserving the name.

Before:
```console
$ cargo unpublished
name published current
==== ========= =======
cargo-platform 0.1.2 0.1.3
cargo-test-macro - 0.1.0
cargo-test-support - 0.1.0
cargo-util 0.2.3 0.2.4
crates-io 0.36.0 0.36.1
mdman 0.0.0 0.1.0
resolver-tests - 0.1.0
cargo 0.70.1 0.72.0
semver-check - 0.1.0
cargo-credential 0.1.0 0.2.0
cargo-credential-1password 0.1.0 0.2.0
cargo-credential-gnome-secret 0.1.0 0.2.0
cargo-credential-macos-keychain 0.1.0 0.2.0
cargo-credential-wincred 0.1.0 0.2.0
benchsuite - 0.1.0
```

After:
```console
name published current
==== ========= =======
cargo-platform 0.1.2 0.1.3
cargo-test-macro - 0.1.0
cargo-test-support - 0.1.0
cargo-util 0.2.3 0.2.4
crates-io 0.36.0 0.36.1
cargo 0.70.1 0.72.0
cargo-credential 0.1.0 0.2.0
cargo-credential-1password 0.1.0 0.2.0
cargo-credential-gnome-secret 0.1.0 0.2.0
cargo-credential-macos-keychain 0.1.0 0.2.0
cargo-credential-wincred 0.1.0 0.2.0
```
2023-04-26 17:51:16 -05:00
bors 8bcf8fe770 Auto merge of #12039 - epage:xtask, r=weihanglo
chore(xtask): Add `cargo xtask unpublished`

### What does this PR try to resolve?

This tries to make it easy to see what existing versions have not been published.  A future version of this could post to a PR what the current delta in version numbers for touched crates so reviewer have more context when deciding if they should ask for a crate version to be bumped
```console
$ cargo unpublished
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s
     Running `/home/epage/src/personal/cargo/target/debug/xtask unpublished`
    Updating crates.io index
name published current
==== ========= =======
cargo-test-macro - 0.1.0
cargo-test-support - 0.1.0
cargo-util 0.2.3 0.2.4
mdman 0.0.0 0.1.0
resolver-tests - 0.1.0
cargo 0.70.0 0.71.0
cargo-credential 0.1.0 0.2.0
cargo-credential-1password 0.1.0 0.2.0
cargo-credential-gnome-secret 0.1.0 0.2.0
cargo-credential-macos-keychain 0.1.0 0.2.0
cargo-credential-wincred 0.1.0 0.2.0
benchsuite - 0.1.0
```

Room for improvement
- Aligning the start of each column
- Filtering the list by a commit range
- Adding this to an action to post to a review
- Maybe sorting the output
- Marking some our crates as `package.publish = false`, like benchsuite and resolver-tests

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

This is broken down commit by commit for easier seeing of the building blocks for our first xtask
2023-04-26 23:09:59 +00:00
Ed Page 5b13963044 perf(xtask): Split xtask binaries
This will allow running an xtask without requiring building the world.
In most cases, a user will already have been building cargo but not in
CI.

The packages keep an `xtask-` prefix to help raise awareness of them but
exposed as `cargo <suffix>` to avoid having a direction proxy to wrap
`cargo run -p xtask-<suffix>` as `cargo xtask <suffix>`.
2023-04-26 11:18:51 -05:00
Eric Huss a4f01c0352 Update home dependency 2023-04-25 11:38:52 -07:00
Ed Page c6f8ee9e51 feat(xtask): First pass at 'cargo xtask unpublished' 2023-04-25 03:06:46 -05:00
Ed Page 0b20bd99e3 chore(xtask): Add core cargo flags 2023-04-25 02:33:47 -05:00
Ed Page a675e047e7 chore(xtask): Add xtask skeleton 2023-04-25 02:13:56 -05: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
bors c5bee5d902 Auto merge of #12014 - ecnelises:bump_libc_142, r=weihanglo
Bump libc to 0.2.142

libc 0.2.141 cannot build successfully on AIX. (CI on AIX is not available yet)

Upgrade libc to 0.2.142 to make cargo build on AIX.
2023-04-24 11:01:59 +00:00
bors 65a135fc91 Auto merge of #12005 - loongarch-rs:update-openssl-src, r=weihanglo
Update openssl-src to 111.25.3+1.1.1t

### What does this PR try to resolve?

Support for LoongArch has been added to the `openssl-src` start from `v111.25.3`. Therefore, we have updated the version to include this support.

Thanks
2023-04-24 10:09:12 +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
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
Qiu Chaofan b1290767ac Bump libc to 0.2.142 2023-04-21 18:01:52 +08:00
Weihang Lo ff216ebc96
chore: make server-check a workspace member 2023-04-21 10:58:45 +01:00
WANG Rui 860b64a846 Update openssl-src to 111.25.3+1.1.1t
Adds support for LoongArch.
2023-04-21 12:59:57 +08: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
WANG Rui d54cc301eb Update linux-raw-sys to 0.3.2
Adds support for LoongArch.
2023-04-19 10:31:23 +08: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 0289f2b8d5
chore: track Cargo.lock
Co-authored-by: Scott Schafer <schaferjscott@gmail.com>
Co-authored-by: Eric Huss <eric@huss.org>
2023-04-12 11:32:24 +01:00
Alex Crichton 5c9665f41c Delete Cargo.lock from this repo
There's now a lock file upstream in rust-lang/rust so the one here isn't
actually used, and otherwise this crate is used as a dependency so the lock file
isn't respected anyway!
2017-10-18 07:43:15 -07:00
Alex Crichton 9b8efd18e9 Bump to 0.24.0
It's that time of the year again!
2017-10-15 08:30:11 -07:00
Dirkjan Ochtman 7097174a91 Update dependencies (unbreak macOS 10.13 with libgit2-sys-0.6.16) 2017-10-04 21:37:55 +02:00
Simon Sapin f38c53f5c3 Make manifest serialization deterministic
Fixes #4326

`cargo package` (and so `cargo publish`) parses a crate’s `Cargo.toml`,
makes some modifications, and re-serializes it.
Because the `TomlManifest` struct uses `HashMap`
with its default `RandomState` hasher,
the maps’ iteration order changed on every run.

As a result, when using `cargo vendor`,
updating a dependency would generate a diff larger than necessary,
with non-significant order-changes obscuring significant changes.

This replaces some uses of `HashMap` with `BTreeMap`,
whose iteration order is deterministic (based on `Ord`).
2017-10-02 12:09:54 +02:00
Dirkjan Ochtman ab724fc513 Update dependencies
It would be nice to use openssl-0.9.19 in particular, since it supports
newer LibreSSL.
2017-09-23 09:57:34 +02:00
Alex Crichton 4c077033dd Update dependencies
Just a usual `cargo update` plus moving over some major versions
2017-09-05 15:29:07 -07:00
Alex Crichton 1e54d9efa3 Bump Cargo to 0.23.0 2017-08-28 07:45:43 -07:00
Tatsuyuki Ishi 72de74c9eb cargotest: purge deps 2017-08-24 13:00:04 +09:00
bors 8720d63bc1 Auto merge of #4390 - alexcrichton:read-hard-links, r=matklad
Use `same-file` to avoid unnecessary hard links

This is targeted at removing the need for a workaround in rust-lang/rust#39518,
allowing the main rust build system to move back to hard links which should be
much more efficient.
2017-08-10 09:04:21 +00:00
Kornel 8e0a7caddf Exclude target directory from Time Machine
Temporary/derived files outside dedicated system directories should be explicitly excluded from backups to prevent undesirable bloat and churn.
2017-08-10 01:42:32 +01:00
Alex Crichton 599db09980 Use same-file to avoid unnecessary hard links
This is targeted at removing the need for a workaround in rust-lang/rust#39518,
allowing the main rust build system to move back to hard links which should be
much more efficient.
2017-08-09 17:22:34 -07:00
Guillaume Gomez 638ac11171 Update error-chain dep for crates-io as well 2017-07-28 23:37:54 +02:00
Guillaume Gomez 6f23ce5cc2 Update to rc error chain 2017-07-28 21:12:05 +02:00
Alex Crichton e8a7132805 Bump to 0.22.0 and update deps 2017-07-20 08:35:07 -07:00
Brian Anderson fdb9f1bd1d Replace homedir definition with home crate 2017-07-18 17:25:31 -07:00
Behnam Esfahbod c072ba4242 [sources/path] Add gitignore-like pattern matching and warn on mismatches
Add gitignore-like pattern matching logic to `list_files()` and throw
warnings for paths getting different inclusion/exclusion results from
the old and the new methods.

Migration Tracking: <https://github.com/rust-lang/cargo/issues/4268>
2017-07-18 00:14:14 -06:00
Alex Crichton f429be4f4c Don't set MAKEFLAGS for build scripts
Closes #4156
Closes rust-lang/rust#42635
2017-07-12 14:15:56 -07:00
Alex Crichton f490635e0f Update dependencies with semver-compat version
Just a standard update
2017-07-07 14:01:40 -07:00
Alex Crichton 9cd803bfe0 Update wincolor
Helps mitigate #4189
2017-06-19 10:42:58 -07:00
Alex Crichton 9629f99dd0 Use the atty crate for TTY detection
This is more robust in the face of msys terminals and otherwise helps share more
dependencies!

Closes #4166
2017-06-15 08:08:35 -07:00
Alex Crichton f8fb0a0228 Migrate from the term crate to termcolor
The API of `termcolor` fits what the system gives us much more nicely and should
be well battle-tested from ripgrep. Additionally we don't really need huge
terminfo parsers, that wasn't every really the intention of the color support
here.
2017-06-13 14:28:37 -07:00
bors 45148e0efd Auto merge of #4149 - ordian:master, r=alexcrichton
Drop rustc-serialize dependency

Fixes #3944.
2017-06-13 19:53:41 +00:00
Alex Crichton 63ea2d319b Update dependencies
Brings in a few fixes for Windows-related dependencies
2017-06-13 10:39:01 -07:00
Andronik Ordian 10373f4039 Drop rustc-serialize dependency 2017-06-09 00:56:48 +03:00
Alex Crichton 90299a66f2 Bump to 0.21.0
We're working on the next version now!
2017-06-08 09:08:01 -07:00
Marc-Antoine Perennou f407bc838f update git2
Fixes build with libressl

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-06-07 21:35:27 +02:00
Marco A L Barbosa 728694abf0 Bump jobserver to 0.1.4 2017-06-05 14:15:40 -03:00
Alex Crichton 74777c1274 Remove more allocatoins in index querying
Removing some allocations arounds the stored hashes by having nested hash maps
instead of tuple keys. Also remove an intermediate array when parsing
dependencies through a custom implementation of `Deserialize`. While this
doesn't make this code path blazingly fast it definitely knocks it down in the
profiles below other higher-value targets.
2017-06-05 07:36:44 -07:00
Alex Crichton 48446574a6 Optimize resolution by removing allocations
This commit is a relatively serious optimization pass of the resolution phase in
Cargo, targeted at removing as many allocations as possible from this phase.
Executed as an iterative loop this phase of Cargo can often be costly for large
graphs but it's run on every single build!

The main optimization here is to avoid cloning the context and/or pushing a
backtracking frame if there are no candidates left in the current list of
candidates. That optimizes a fast-path for crates with lock files (almost all of
them) and gets us to the point where cloning the context basically disappears
from all profiling.
2017-06-05 07:36:44 -07:00
bors 8fb6e7c157 Auto merge of #4110 - alexcrichton:jobserver, r=matklad
Add a GNU make jobserver implementation to Cargo

This commit adds a GNU make jobserver implementation to Cargo, both as a client
of existing jobservers and also a creator of new jobservers. The jobserver is
actually just an IPC semaphore which manifests itself as a pipe with N bytes
of tokens on Unix and a literal IPC semaphore on Windows. The rough protocol
is then if you want to run a job you read acquire the semaphore (read a byte on
Unix or wait on the semaphore on Windows) and then you release it when you're
done.

All the hairy details of the jobserver implementation are housed in the
`jobserver` crate on crates.io instead of Cargo. This should hopefully make it
much easier for the compiler to also share a jobserver implementation
eventually.

The main tricky bit here is that on Unix and Windows acquiring a jobserver token
will block the calling thread. We need to either way for a running job to exit
or to acquire a new token when we want to spawn a new job. To handle this the
current implementation spawns a helper thread that does the blocking and sends a
message back to Cargo when it receives a token. It's a little trickier with
shutting down this thread gracefully as well but more details can be found in
the `jobserver` crate.

Unfortunately crates are unlikely to see an immediate benefit of this once
implemented. Most crates are run with a manual `make -jN` and this overrides the
jobserver in the environment, creating a new jobserver in the sub-make. If the
`-jN` argument is removed, however, then `make` will share Cargo's jobserver and
properly limit parallelism.

Closes #1744
2017-06-02 22:53:36 +00:00
Alex Crichton cbf25a9b0a Add a GNU make jobserver implementation to Cargo
This commit adds a GNU make jobserver implementation to Cargo, both as a client
of existing jobservers and also a creator of new jobservers. The jobserver is
actually just an IPC semaphore which manifests itself as a pipe with N bytes
of tokens on Unix and a literal IPC semaphore on Windows. The rough protocol
is then if you want to run a job you read acquire the semaphore (read a byte on
Unix or wait on the semaphore on Windows) and then you release it when you're
done.

All the hairy details of the jobserver implementation are housed in the
`jobserver` crate on crates.io instead of Cargo. This should hopefully make it
much easier for the compiler to also share a jobserver implementation
eventually.

The main tricky bit here is that on Unix and Windows acquiring a jobserver token
will block the calling thread. We need to either way for a running job to exit
or to acquire a new token when we want to spawn a new job. To handle this the
current implementation spawns a helper thread that does the blocking and sends a
message back to Cargo when it receives a token. It's a little trickier with
shutting down this thread gracefully as well but more details can be found in
the `jobserver` crate.

Unfortunately crates are unlikely to see an immediate benefit of this once
implemented. Most crates are run with a manual `make -jN` and this overrides the
jobserver in the environment, creating a new jobserver in the sub-make. If the
`-jN` argument is removed, however, then `make` will share Cargo's jobserver and
properly limit parallelism.

Closes #1744
2017-06-02 08:06:30 -07:00
Brian Anderson a7cbd5eba1 Update gcc crate for MSVC 2017 2017-06-01 21:01:17 +00:00
jluner 7f6dbc14da Resolve upstream updates to referenced crates 2017-05-27 23:50:55 -05:00
Alex Crichton 0ceab8e3c1 Update a slew of dependencies and such
Standard bug fixes and otherwise keeping up to date
2017-05-27 17:21:42 -07:00
jluner d121e05966 Update gcc dependency to match updated gcc elsewhere in cargo 2017-05-27 02:37:10 -05:00
jluner 6e9161b38e Merge remote-tracking branch 'upstream/master' 2017-05-27 02:29:15 -05:00
Brian Anderson 2377bfd69e Update lockfile for gcc and cmake crates to pick up MSVC 2017 fixes 2017-05-26 10:14:12 -07:00
jluner e95044e313 Add error-chain errors
Convert CargoResult, CargoError into an implementation provided by error-chain. The previous is_human machinery is mostly removed; now errors are displayed unless of the Internal kind, verbose mode will print all errors.
2017-05-24 21:14:04 -05:00
Alex Crichton 852968e679 Remove chrono as a dependency
Turns out we don't use it!
2017-05-18 09:02:40 -07:00
Alex Crichton 77b761260b Update libssh2-sys
It now has an updated initialization routine to hopefully get ssh working on
Windows, with a fix for alexcrichton/git2-rs#202
2017-05-08 09:15:41 -07:00
Marc-Antoine Perennou f8d2883618 update libgit2-sys for libressl compat
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-04-30 08:08:23 +02:00
Alex Crichton 2dd168c14e Bump to 0.20.0 2017-04-27 20:11:52 -07:00
Alex Crichton 0b59f17d63 Update dependencies Cargo uses
Namely update to serde 1.0.0!
2017-04-27 12:06:34 -07:00
Marco A L Barbosa f125e4d7c5 Bump time (0.1.37) and libc (0.2.22) 2017-04-27 11:46:45 -03:00
Jessica Hamilton f463e3c747 Update num_cpus to 1.4.0 (adds support for Haiku) 2017-04-26 15:29:44 +12:00