Commit graph

764 commits

Author SHA1 Message Date
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
Ed Page d674c2294b refactor(cli): Make help behave like other subcommands
Before, we had hacks to intercept raw arguments and to intercept clap
errors and assume what their intention was to be able to implement our
help system.

This flips it around and makes help like any other subcommand,
simplifying cargo initialization.
2022-08-31 19:18:26 -05:00
bors e5ec3a8ff9 Auto merge of #11004 - jonhoo:bump-git2, r=weihanglo
Bump git2 to 0.15 and libgit2-sys to 0.14

This will allow cargo to avoid vendored builds of git2 in up-to-date
environments going forward, and brings in the [libgit2 1.4.4 CVE fix].

[libgit2 1.4.4 CVE fix]: https://github.com/libgit2/libgit2/releases/tag/v1.4.4
2022-08-27 09:22:12 +00:00
Jon Gjengset ed78e6b747 Bump snapbox to 0.3
0.3 has a small number of [breaking changes], but makes diffs much
easier to visually parse by eliding large sections of unchanged content.

[breaking changes]: https://github.com/assert-rs/trycmd/blob/main/crates/snapbox/CHANGELOG.md#030---2022-08-01
2022-08-17 22:07:20 +00:00
Jon Gjengset 30fe22b260 Bump git2 to 0.15 and libgit2-sys to 0.14
This will allow cargo to avoid vendored builds of git2 in up-to-date
environments going forward, and brings in the [libgit2 1.4.4 CVE fix].

[libgit2 1.4.4 CVE fix]: https://github.com/libgit2/libgit2/releases/tag/v1.4.4
2022-08-17 22:02:28 +00:00
Eric Huss 34632c5925 Bump to 0.66.0 2022-08-12 12:22:05 -07:00
Weihang Lo 33497512a8
Use std:🧵:scope to replace crossbeam 2022-08-12 00:09:54 +01:00
Josh Triplett 86163845a5 Switch back to available_parallelism
This reverts commit 8345cf5037. Since that
time, there are now multiple calls to get the number of CPUs, to handle
the `-j -NUM` case, so factor out a helper function.
2022-08-10 17:49:24 +02:00
hi-rustin df8f33b4f2 Bump os_info to 3.5.0
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
2022-08-06 13:12:20 +08:00
Eric Huss fa39fd4cd9 Bump to 0.65.0 2022-07-01 11:43:25 -07:00
bors 501b56b26e Auto merge of #10804 - ehuss:bump-cargo-util, r=joshtriplett
Bump cargo-util version.

#10546 made a semver-incompatible change to the API of `ProcessBuilder::get_args`. Unfortunately we did not catch that until it was published. This bumps the version of cargo-util to 0.2.1 to accommodate that change. Stable will get version 0.2.0 so that the changes on beta can be released as 0.2.1 in their own time.

cc #10803
2022-07-01 04:21:25 +00:00
Eric Huss 41ac6078aa Bump cargo-util version. 2022-06-30 14:25:28 -07:00
Eric Huss 72320bdcca Update os_info 2022-06-30 14:00:23 -07:00
Ed Page 6f475f090e chore: Upgrade to clap 3.2 2022-06-13 10:02:23 -05:00
Weihang Lo 8345cf5037
Revert #10427: switch from num_cpus
This reverts commit 6d11f9e7d4, reversing
changes made to c5cdd25c14.
2022-06-09 07:47:00 +08:00
Yuki Okushi 819f7a5cff
Enforce to use tar v0.4.38 2022-06-01 19:17:15 +09:00
Eric Huss 1bfb897485 Update libcurl 2022-05-23 08:21:50 -07:00
Eric Huss 447384ed72 Bump to 0.64.0 2022-05-20 13:27:39 -07:00
Ed Page 8e0868057a chore: Upgrade toml_edit 2022-04-26 10:16:26 -05:00
Ed Page 6ec86fc47b test(add): Import cargo-add tests
This is a fork of https://github.com/killercup/cargo-edit/tree/merge-add
at d561719161ed5564111ff2152ff206463ec24cef
2022-04-11 13:09:40 -05:00
Ed Page 5ca5f2f157 feat: Add add cargo subcommand
This is a fork of https://github.com/killercup/cargo-edit/tree/merge-add
at d561719161ed5564111ff2152ff206463ec24cef
2022-04-11 13:06:10 -05:00
bors 1073915930 Auto merge of #10546 - weihanglo:issue-10381-rustc-argfile, r=epage
Retry command invocation with argfile

### What does this PR try to resolve?

Fixes #10381

The goal is to invoke `rustc` and `rustdoc` with ``@path`` arg file as a fallback.

Since the `-Zcheck-cfg-features`[^1] has already been implemented, in the foreseeable future cargo will probably hit the “**command line too big**” more often on Windows. `rustdoc` and `rustc` both support ``@path`` argfile [^2][^3], so we can leverage the feature for the fallback logic.

The idea behind this PR is that we put the **retry logic** in `ProcessBuilder::exec*` functions and reuse them as much as possible.

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

Review it commit by commit is recommended.

Argfile fallback is hard to tested with integration tests, so I added some unit tests for `cargo_util::ProcessBuilder` and `cargo::ops::fix::FixArgs`.

If you do want to test the support of argfile manually, a new environment variable `__CARGO_TEST_FORCE_ARGFILE` is added for the sake of forcing cargo to use argfile for rustc invocations. For example, `__CARGO_TEST_FORCE_ARGFILE cargo test --test testsuite -- fix::` is usually a good start to test this feature.

[^1]: https://doc.rust-lang.org/beta/cargo/reference/unstable.html?highlight=check#check-cfg-features
[^2]: https://doc.rust-lang.org/rustc/command-line-arguments.html#path-load-command-line-flags-from-a-path
[^3]: https://doc.rust-lang.org/rustdoc/command-line-arguments.html#path-load-command-line-flags-from-a-path
2022-04-11 14:57:46 +00:00
bors b36cc6ed41 Auto merge of #10538 - Muscraft:rfc2906-part3, r=epage
Part 3 of RFC2906 - Add support for inheriting `license-path`, and `depednency.path`

Tracking issue: #8415
RFC: rust-lang/rfcs#2906

[Part 1](https://github.com/rust-lang/cargo/pull/10497)
[Part 2](https://github.com/rust-lang/cargo/pull/10517)

This PR focuses on adding support for inheriting `license-path`, and `depednency.path`:
- To adjust the relative paths from being workspace-relative to package-relative, we use `pathdiff` which `cargo-add` is also going to be using for a similar purpose
- `ws_path` was added to `InheritableFields` so we can resolve relative paths from  workspace-relative to package-relative
- Moved `resolve` for toml dependencies from `TomlDependency::<P>` to `TomlDependency`
  - This was done since resolving a relative path should be a string
  - You should never inherit from a `.cargo/config.toml` which is the reason `P` was added

Remaining implementation work for the RFC
- Relative paths for `readme`
- Path dependencies infer version directive
- Lock workspace dependencies and warn when unused
- Optimizations, as needed
- Evaluate any new fields for being inheritable (e.g. `rust-version`)
2022-04-08 15:38:07 +00:00
Weihang Lo 4f6a2ec28b
Bump cargo-util to 0.1.3 2022-04-08 15:39:36 +08:00
Eric Huss 3d5f944180 Bump to 0.63.0 2022-04-07 15:04:31 -07:00
Scott Schafer 3d07652c38 Part 3 of RFC2906 - Add support for inheriting license-path, and depednency.path 2022-04-07 16:34:34 -05:00
Weihang Lo 0e044546f8
Bump git2@0.14.2 and libgit2-sys@0.13.2
The previous libgit2-sys release forgot to include the fix of libgit2 1.4.2.
https://github.com/rust-lang/git2-rs/pull/820#issuecomment-1064284814
That might cause problems when people don't have "Git for Windows"
installed on their machines.
2022-03-15 07:26:45 +08:00
bors 6d11f9e7d4 Auto merge of #10427 - weihanglo:drop-num_cpus, r=joshtriplett
Use `available_parallelism` instead of `num_cpus`
2022-03-08 17:07:30 +00:00
bors e756c130cf Auto merge of #10442 - Urgau:git2-update, r=alexcrichton
Update git2 dependencies

This pull-request update git2 to 0.14.1 and git2-curl to 0.15.0 and libgit2-sys to 0.13.1.

This fix a memory corruption that I have locally when running the testsuite:
```
==2338650==  Uninitialised value was created by a stack allocation
==2338650==    at 0x11FE3A0: git2::remote::Remote::fetch (remote.rs:276)
```
2022-03-01 18:12:20 +00:00
Loïc BRANSTETT dd701a17f3 Update git2 to 0.14.1 and git2-curl to 0.15.0 and libgit2-sys to 0.13.1 2022-03-01 18:39:22 +01:00
Weihang Lo 1988bc8d37
Use available_parallelism instead of num_cpus
`std:🧵:available_parallelism` has been stabilized since 1.59.0.

Also, we don't want to block timing data output, so if parallelism
data is not available the table will display `ncpu=n/a` instead.
2022-02-26 16:52:59 +08:00
Eric Huss 560ee81ec1 Bump to 0.62.0 2022-02-24 13:47:20 -08:00
Jon Gjengset dfda89a82e Bump clap to match when deprecations happened 2022-02-16 20:01:57 -08:00
Ed Page 0f75237617 test: Fix compatibilty with new toml_edit
`toml_edit` fixed a bug in 0.13.4 that this test was relying on that is
meant to help with rust-lang/cargo#10349.  This basically restores us
back to the pre-toml_edit behavior for published manifests.
2022-01-31 10:57:38 -06:00
Weihang Lo 13a09beccf
Bump clap to 3.0.13 2022-01-27 19:27:52 +08:00
bors bb96b3a3e8 Auto merge of #10086 - epage:toml, r=ehuss
Port cargo from toml-rs to toml_edit

Benefits:
- A TOML 1.0 compliant parser
- Unblock future work
  - Have `cargo init` add the current crate to the workspace, rather
    than error
  - #5586: Upstream `cargo-add`

TODO
- [x] Analyze performance and address regressions
- [x] Identify and resolve incompatibiies
- [x] Resolve remaining test failures, see
      https://github.com/ordian/toml_edit/labels/cargo
- [x] ~~Switch the code from https://github.com/rust-lang/cargo/pull/10176 to only parse once~~ (this PR is being merged first)
2022-01-20 03:56:18 +00:00
Eric Huss a25d3864d9 Bump to 0.61.0 2022-01-14 10:57:54 -08:00
Ed Page 320c279f43 Port cargo from toml-rs to toml_edit
Benefits:
- A TOML 1.0 compliant parser
- Unblock future work
  - Have `cargo init` add the current crate to the workspace, rather
    than error
  - #5586: Upstream `cargo-add`
2022-01-13 09:27:27 -06:00
bors e77c0719fd Auto merge of #10269 - ehuss:stabilized-new-features, r=alexcrichton
Stabilize namespaced and weak dependency features.

This stabilizes the namespaced and weak dependency features.  Support is now enabled on crates.io, so this should be ready to go.

As a part of this change, the new feature resolver is now enabled all of the time. This is fairly risky, since there are likely edge cases that haven't been exercised.
NOTE: Projects using `resolver="1"` *should* continue to have the same behavior, the old resolver behavior is emulated.

Closes #8813
Closes #8832
2022-01-12 15:15:09 +00:00
Eric Huss 43a063c80a Stabilize namespaced and weak dependency features. 2022-01-06 15:56:56 -08:00
Ed Page f17ecafc24 Upgrade to Clap 3
- One parser change found by `cargo_config::includes` is that clap 2
  would ignore any values after a `=` for flags.
  `cargo config --show-origin` is a flag but the test passed `--show-origin=yes` which
  happens to give the desired result for that test but is the same as
  `--show-origin=no` or `--show-origin=alien-invasion`.
- The parser now panics when accessing an undefined attribute but clap
  takes advantage of that for sharing code across commands that have
  different subsets of arguments defined.  I've extended clap so we can
  "look before you leap" and put the checks at the argument calls to
  start off with so its very clear what is tenuously shared.  This
  allows us to go in either direction in the future, either addressing
  how we are sharing between commands or by moving this down into the
  extension methods and pretending this clap feature doesn't exist
- On that topic, a test found clap-rs/clap#3263.  For now, there is a
  hack in clap.  Depending on how we fix that in clap for clap 4.0, we
  might need to re-address things in cargo.
- `value_of_os` now requires setting `allow_invalid_utf8`, otherwise it
  asserts.  To help catch this, I updated the argument definitions
  associated with lookups reported by:
  - `rg 'values?_os' src/`
  - `rg 'values?_of_os' src/`
- clap now reports `2` for usage errors, so we had to bypass clap's
  `exit` call to keep the same exit code.

BREAKING CHANGE: API now uses clap3
2022-01-05 19:54:54 -06:00
pinkforest e4f09b6afa Bumps up tar to 0.4.36 2021-12-15 15:01:43 +11:00
bors 599961b320 Auto merge of #10155 - ehuss:bump-deps, r=alexcrichton
Bump versions of local deps.

There have only been very minor changes since the last version.
2021-12-13 17:47:44 +00:00
bors 5d7ac5897d Auto merge of #10154 - ehuss:version-bump, r=alexcrichton
Bump to 0.60.0, update changelog
2021-12-13 17:00:36 +00:00
Weihang Lo cc267c7a72
Upgrade clap to 2.34.0
That includes the fix of preventing panicking on a broken pipe.
accf3d2511
2021-12-05 01:33:38 +08:00
Eric Huss 06bffb59a7 Bump versions of local deps. 2021-12-03 11:05:03 -08:00
Eric Huss c52f8e2b3b Bump to 0.60.0 2021-12-03 10:21:10 -08:00
Russ Weas 22ff7ac47c Update curl dependency, remove M1 macOS build error note 2021-11-20 22:04:58 -06:00
Eric Huss 84283f0c3a Update curl. 2021-11-04 21:14:19 -07:00
Alex Crichton c687d83ada Remove authors directives from Cargo crates
Most of these are pretty dated and Cargo defaults nowadays to not
emitting an `authors` field so this commit also removes them from the
manifests.
2021-10-22 10:27:20 -07:00
Alex Crichton cabe1cca0a Upgrade Cargo to the 2021 edition
This didn't actually result in any code changes yet, for now this simply
flips the edition flag for all of our crates and documentation.
2021-10-22 10:25:52 -07:00
Eric Huss 88117505b8 Bump to 0.59.0 2021-10-22 07:53:17 -07:00
Eric Huss 5a8be7ba21 Add os to verbose version string. 2021-10-11 11:22:48 -07:00
Eric Huss c5318a17e7 Add some more information to verbose version. 2021-10-08 12:54:24 -07:00
Eric Huss ed2bfc2cc8 Update git2 2021-10-06 16:04:41 -07:00
Alex Crichton 6b2ca55acd Bump curl-sys dependency
Brings in curl 7.79.1
2021-09-22 06:22:36 -07:00
Eric Huss 637ee66375 Temporarily revert curl-sys update. 2021-09-18 12:43:14 -07:00
Eric Huss 28eb20305c Update curl-sys 2021-09-17 03:04:06 -07:00
Alex Crichton 3093df485c Bump Cargo's curl requirement to 7.79.0
Brings in the latest release of `curl`
2021-09-15 07:39:25 -07:00
Eric Huss 0603dc0f20 Bump to 0.58.0 2021-09-10 09:47:06 -07:00
Eric Huss 7f1c80ea7f Bump curl. 2021-08-19 17:46:45 -07:00
Eric Huss 70a1ce3512 Bump jobserver. 2021-08-17 06:57:49 -07:00
bors 981508778c Auto merge of #9762 - erickt:bump, r=ehuss
Update cargo-platform to 0.1.2

This preps cargo-platform for a release. The only substantial change is that this should include the license files into the archive that is uploaded to crates.io.

Closes #9758
2021-08-05 01:23:53 +00:00
Erick Tryzelaar f71b231aea Update cargo-platform to 0.1.2
This preps cargo-platform for a release. The only substantial change is that
this should include the license files into the archive that is uploaded to
crates.io.

Closes #9758
2021-08-04 16:13:04 -07:00
Alex Crichton bddfc4cc7e Bump to the latest jobserver dependency
This should help mitigate #9739 at least with a better error message as
opposed to deadlocking.
2021-08-04 07:25:07 -07:00
Eric Huss 5578567277 Bump to 0.57.0 2021-07-30 07:24:53 -07:00
Eric Huss 4fbf61da10 Bump cargo-util version. 2021-07-29 09:23:23 -07:00
dependabot[bot] fc3e5697cd
Update env_logger requirement from 0.8.1 to 0.9.0
Updates the requirements on [env_logger](https://github.com/env-logger-rs/env_logger) to permit the latest version.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases)
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.8.1...v0.9.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-15 01:07:00 +00:00
Eric Huss c2b02b3926 Updates to future-incompatible reporting. 2021-06-21 09:49:41 -07:00
bors 1fc64069fd Auto merge of #9583 - rust-lang:dependabot/cargo/opener-0.5, r=ehuss
Update opener requirement from 0.4 to 0.5

Updates the requirements on [opener](https://github.com/Seeker14491/opener) to permit the latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/Seeker14491/opener/blob/master/CHANGELOG.md">opener's changelog</a>.</em></p>
<blockquote>
<h2>[0.5.0] - 2021-06-11</h2>
<h3>Added</h3>
<ul>
<li><code>open_browser()</code>, which uses the <code>$BROWSER</code> environment variable before falling back to <code>open()</code>.</li>
<li>WSL-specific implementation. Previously, WSL used the same implementation as Linux. Now the strategy on WSL is to use
the system's <code>wslview</code> command from <a href="https://github.com/wslutilities/wslu"><code>wslu</code></a> if available, falling back to the
system <code>xdg-open</code>, if available.</li>
</ul>
<h3>Changed</h3>
<ul>
<li>On Linux (non-WSL), the system <code>xdg-open</code> is now used if present. Otherwise, the bundled version is used, as before.</li>
<li>Avoid blocking the thread on Linux and WSL.</li>
</ul>
<h3>Removed</h3>
<ul>
<li><code>impl From&lt;io::Error&gt; for OpenError</code>.</li>
</ul>
<h2>[0.4.1] - 2019-09-30</h2>
<h3>Changed</h3>
<ul>
<li>Update <code>xdg-open</code>.</li>
</ul>
<h2>[0.4.0] - 2019-05-02</h2>
<h3>Added</h3>
<ul>
<li><code>OpenError</code> now implements <code>std::error::Error</code>.</li>
</ul>
<h3>Changed</h3>
<ul>
<li><code>OpenError</code>'s <code>failure::Fail</code> impl was removed from this crate, but the failure crate provides a blanket impl of
<code>failure::Fail</code> for types implementing <code>std::error::Error</code>, so this shouldn't break anything.</li>
</ul>
<h2>[0.3.0] - 2018-08-18</h2>
<h3>Added</h3>
<ul>
<li><code>stderr</code> field to <code>OpenError::ExitStatus</code> variant, which captures anything the failed process wrote to stderr.</li>
</ul>
<h2>[0.2.0] - 2018-08-08</h2>
<h3>Removed</h3>
<ul>
<li>The <code>open_sys</code> function, which was erroneously pub on non-Windows builds.</li>
</ul>
<h2>[0.1.0] - 2018-08-08</h2>
<ul>
<li>Initial release.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="86e0a154d2"><code>86e0a15</code></a> Fix Drakefile.ts</li>
<li><a href="4261c2be99"><code>4261c2b</code></a> Release v0.5.0</li>
<li><a href="5d24271a65"><code>5d24271</code></a> Revert command name in error type to <code>&amp;'static str</code></li>
<li><a href="9a36c6e656"><code>9a36c6e</code></a> Remove dependency on <code>wsl</code> crate</li>
<li><a href="165b933775"><code>165b933</code></a> Avoid blocking</li>
<li><a href="5c1e99a1c1"><code>5c1e99a</code></a> Update changelog</li>
<li><a href="2da976eb48"><code>2da976e</code></a> Refactor <code>linux_and_more</code> module</li>
<li><a href="f5c5564a9c"><code>f5c5564</code></a> Fix newline being included after WSL path conversion</li>
<li><a href="bd30011d61"><code>bd30011</code></a> [WSL] Try <code>wslview</code> first instead of second</li>
<li><a href="e16875d797"><code>e16875d</code></a> Misc formatting changes</li>
<li>Additional commits viewable in <a href="https://github.com/Seeker14491/opener/compare/v0.4.1...v0.5.0">compare view</a></li>
</ul>
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

</details>
2021-06-18 20:57:46 +00:00
Eric Huss 738912ab5a Bump to 0.56.0 2021-06-18 06:17:40 -07:00
dependabot[bot] ff9ee5ccf0
Update opener requirement from 0.4 to 0.5
Updates the requirements on [opener](https://github.com/Seeker14491/opener) to permit the latest version.
- [Release notes](https://github.com/Seeker14491/opener/releases)
- [Changelog](https://github.com/Seeker14491/opener/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Seeker14491/opener/compare/v0.4.1...v0.5.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-14 08:05:04 +00:00
Eric Huss 9362fe5ff3 Update rustfix. 2021-06-09 18:13:56 -07:00
David Tolnay f5c2645899
Pull in semver 1.0.3 'x' fix 2021-06-04 09:19:15 -07:00
bors 5fb59b0e4a Auto merge of #9420 - In-line:unknown-features-suggestions-in-workspace, r=ehuss
Implement suggestions for unknown features in workspace
2021-06-01 15:41:27 +00:00
bors 2f3df16921 Auto merge of #9508 - dtolnay-contrib:semver, r=ehuss
Update to semver 1.0.0

I am working on a 1.0.0 of the `semver` crate some time this week. It would be good to confirm Cargo will be able to use it, beforehand!

It's a from-scratch rewrite, but https://github.com/dtolnay/semver/issues/237 has code to compare against 0.10.0 (currently used by Cargo) how every possible version requirement currently published to crates.io matches against every possible crate version. The differences are all broken syntax like `^0-.11.0` previously parsing with ".11.0" as a pre-release string (which is invalid, because pre-release are not allowed to contain empty dot-separated identifiers) and `~2.0-2.2` previously parsing with "2.2" as a pre-release string, when the user almost certainly meant `>=2.0, <=2.2`. I'm not sure how much of those you want to add code into Cargo to preserve behavior, but I would be happy to do it.
2021-05-27 22:34:28 +00:00
Alex Crichton a02b6e5bfc Update tar dependency to 0.4.34
Pulls in a fix which should avoid 0 mtime files from showing up.

Closes #9512
2021-05-27 14:16:59 -07:00
David Tolnay 7ace4470c4
Update to semver 1.0.0 2021-05-26 14:39:13 -07:00
David Tolnay 3b62e466ec
Update to semver 1.0.0-rc 2021-05-25 17:42:05 -07:00
Paul Mabileau a5b4b4710a
Bump url to 2.2.2 where Into<String> for Url is used
The base package, `cargo-test-support` and `mdman`.

Signed-off-by: Paul Mabileau <paulmabileau@hotmail.fr>
2021-05-10 22:20:11 +02:00
Eric Huss c38cd662bc Bump to 0.55.0 2021-05-07 08:10:28 -07:00
Alik Aslanyan 0847630d07
Implement suggestions for unknown features in workspace 2021-04-27 13:09:44 +04:00
bors 7204d3989d Auto merge of #9302 - ehuss:cargo-config, r=alexcrichton
Add `cargo config` subcommand.

This adds an initial version of the `cargo config` command as discussed in #2362.

Closes #2362
2021-03-30 19:07:19 +00:00
Eric Huss d774f1f331 Bump to 0.54.0 2021-03-26 12:28:47 -07:00
Eric Huss 96a5642217 Add cargo config subcommand. 2021-03-25 13:52:31 -07:00
Eric Huss 4aa1ec2419 Move Sha256 to cargo-util. 2021-03-20 17:42:41 -07:00
Eric Huss 1dae5acb7d Move paths to cargo-util. 2021-03-20 17:42:41 -07:00
Eric Huss 888100352a Move ProcessBuilder to cargo-util. 2021-03-20 15:19:03 -07:00
Eric Huss 669340333a Split util code into a separate package. 2021-03-20 15:15:54 -07:00
Mukund Lakshman 54742ce726 Use serde's error message option to avoid implementing Deserialize. 2021-03-19 23:22:39 +00:00
Aaron Hill 6177c6584b
Implement future incompatibility report support
cc rust-lang/rust#71249

This implements the Cargo side of 'Cargo report future-incompat'

Based on feedback from alexcrichton and est31, I'm implemented this a
flag `--future-compat-report` on `cargo check/build/rustc`, rather than
a separate `cargo describe-future-incompatibilities` command. This
allows us to avoid writing additional information to disk (beyond the
pre-existing recording of rustc command outputs).

This PR contains:

* Gating of all functionality behind `-Z report-future-incompat`.
  Without this flag, all user output is unchanged.
* Passing `-Z emit-future-incompat-report` to rustc when
  `-Z report-future-incompat` is enabled
* Parsing the rustc JSON future incompat report, and displaying it
  it a user-readable format.
* Emitting a warning at the end of a build if any crates had
  future-incompat reports
* A `--future-incompat-report` flag, which shows the full report for
  each affected crate.
* Tests for all of the above.

At the moment, we can use the `array_into_iter` to write a test.
However, we might eventually get to a point where rustc is not currently
emitting future-incompat reports for any lints. What would we want the
cargo tests to do in this situation?

This functionality didn't require any significant internal changes to
Cargo, with one exception: we now process captured command output for
all units, not just ones where we want to display warnings. This may
result in a slightly longer time to run `cargo build/check/rustc` from
a full cache. since we do slightly more work for each upstream
dependency. Doing this seems unavoidable with the current architecture,
since we need to process captured command outputs to detect
any future-incompat-report messages that were emitted.
2021-03-04 15:21:15 -05:00
Eric Huss 6576befcd3 Bump to 0.53.0 2021-02-12 10:58:38 -08:00
Eric Huss eaa5896405 Remove Registry::new. 2021-01-22 11:06:51 -08:00
bors 638f33d036 Auto merge of #9035 - weihanglo:fix/git-init-search-path, r=alexcrichton
Fix: set default git config search path for tests

Fixes https://github.com/rust-lang/cargo/issues/8863 by setting the default config search path.

Just wait https://github.com/rust-lang/git2-rs/pull/656 being merged and update Cargo.toml the new release of git2-rs 😄
2021-01-22 15:29:39 +00:00
Weihang Lo 06d65a48f8
chore: bump versions of git2 and libgit2-sys 2021-01-22 23:27:44 +08:00
Eric Huss 60143816bf Bump to 0.52.0 2021-01-03 14:56:35 -08:00
Eric Huss 4e358386cc Update git2 2020-12-22 06:03:54 -08:00
Eric Huss b425e4ccb1 Update git2 2020-12-18 10:13:50 -08:00
Eric Huss 0b5c065f8d Remove version from dev-dependencies to make it easier to publish. 2020-11-30 08:12:02 -08:00
Linus Färnstrand f6a1618aab Bump miow dependency to not invalidly assume memory layout 2020-11-28 11:47:15 +01:00
Eric Huss 9b590d0dd4 Bump to 0.51.0 2020-11-23 17:34:18 -08:00
dependabot-preview[bot] 8e61d94e41
Update env_logger requirement from 0.7.0 to 0.8.1
Updates the requirements on [env_logger](https://github.com/env-logger-rs/env_logger) to permit the latest version.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases)
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.7.0...v0.8.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-19 05:17:38 +00:00
Eric Huss 0be75d2edc Update git2. 2020-10-13 18:13:25 -07:00
bors 90594df707 Auto merge of #8769 - rust-lang:dependabot/cargo/crossbeam-utils-0.8, r=alexcrichton
Update crossbeam-utils requirement from 0.7 to 0.8

Updates the requirements on [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) to permit the latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md">crossbeam-utils's changelog</a>.</em></p>
<blockquote>
<h1>Version 0.8.0</h1>
<ul>
<li>Bump the minimum supported Rust version to 1.36.</li>
<li>Bump <code>crossbeam-channel</code> to <code>0.5</code>.</li>
<li>Bump <code>crossbeam-deque</code> to <code>0.8</code>.</li>
<li>Bump <code>crossbeam-epoch</code> to <code>0.9</code>.</li>
<li>Bump <code>crossbeam-queue</code> to <code>0.3</code>.</li>
<li>Bump <code>crossbeam-utils</code> to <code>0.8</code>.</li>
</ul>
<h1>Version 0.7.3</h1>
<ul>
<li>Fix breakage with nightly feature due to <a href="https://github-redirect.dependabot.com/rust-lang/rust/issues/65214">rust-lang/rust#65214</a>.</li>
<li>Bump <code>crossbeam-channel</code> to <code>0.4</code>.</li>
<li>Bump <code>crossbeam-epoch</code> to <code>0.8</code>.</li>
<li>Bump <code>crossbeam-queue</code> to <code>0.2</code>.</li>
<li>Bump <code>crossbeam-utils</code> to <code>0.7</code>.</li>
</ul>
<h1>Version 0.7.2</h1>
<ul>
<li>Bump <code>crossbeam-channel</code> to <code>0.3.9</code>.</li>
<li>Bump <code>crossbeam-epoch</code> to <code>0.7.2</code>.</li>
<li>Bump <code>crossbeam-utils</code> to <code>0.6.6</code>.</li>
</ul>
<h1>Version 0.7.1</h1>
<ul>
<li>Bump <code>crossbeam-utils</code> to <code>0.6.5</code>.</li>
</ul>
<h1>Version 0.7.0</h1>
<ul>
<li>Remove <code>ArcCell</code>, <code>MsQueue</code>, and <code>TreiberStack</code>.</li>
<li>Change the interface of <code>ShardedLock</code> to match <code>RwLock</code>.</li>
<li>Add <code>SegQueue::len()</code>.</li>
<li>Rename <code>SegQueue::try_pop()</code> to <code>SegQueue::pop()</code>.</li>
<li>Change the return type of <code>SegQueue::pop()</code> to <code>Result</code>.</li>
<li>Introduce <code>ArrayQueue</code>.</li>
<li>Update dependencies.</li>
</ul>
<h1>Version 0.6.0</h1>
<ul>
<li>Update dependencies.</li>
</ul>
<h1>Version 0.5.0</h1>
<ul>
<li>Update <code>crossbeam-channel</code> to 0.3.</li>
<li>Update <code>crossbeam-utils</code> to 0.6.</li>
<li>Add <code>AtomicCell</code>, <code>SharedLock</code>, and <code>WaitGroup</code>.</li>
</ul>
<h1>Version 0.4.1</h1>
<ul>
<li>Fix a double-free bug in <code>MsQueue</code> and <code>SegQueue</code>.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="d9dfc9e1ff"><code>d9dfc9e</code></a> Merge <a href="https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/581">#581</a></li>
<li><a href="2a3d84b8db"><code>2a3d84b</code></a> Prepare for the next release</li>
<li><a href="5ea6e705ea"><code>5ea6e70</code></a> Merge <a href="https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/580">#580</a></li>
<li><a href="b363b3dcd7"><code>b363b3d</code></a> Fix UB in destroy_array test</li>
<li><a href="e08b21cc08"><code>e08b21c</code></a> Merge <a href="https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/577">#577</a></li>
<li><a href="6217abf4a9"><code>6217abf</code></a> Ignore clippy::match_like_matches_macro lint</li>
<li><a href="9cbfae7380"><code>9cbfae7</code></a> Update cfg-if to 1</li>
<li><a href="24447495c9"><code>2444749</code></a> Merge <a href="https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/574">#574</a></li>
<li><a href="619f7db2df"><code>619f7db</code></a> Fixed a few typos</li>
<li><a href="7cc8377263"><code>7cc8377</code></a> Better plot.py with Python 3 &amp; remove hard code (<a href="https://github-redirect.dependabot.com/crossbeam-rs/crossbeam/issues/569">#569</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.7.0...crossbeam-utils-0.8.0">compare view</a></li>
</ul>
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` use these labels` will set the current labels as the default for future PRs for this repo and language
- ``@dependabot` use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- ``@dependabot` use these assignees` will set the current assignees as the default for future PRs for this repo and language
- ``@dependabot` use this milestone` will set the current milestone as the default for future PRs for this repo and language
- ``@dependabot` badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Pull request limits (per update run and/or open at any time)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

</details>
2020-10-12 21:26:33 +00:00
Eric Huss ad34852f39 Update toml dependency 2020-10-12 11:22:45 -07:00
dependabot-preview[bot] ec6f64699b
Update crossbeam-utils requirement from 0.7 to 0.8
Updates the requirements on [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) to permit the latest version.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.7.0...crossbeam-utils-0.8.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-10-12 05:17:52 +00:00
Eric Huss 67a00f95bc Bump to 0.50.0 2020-10-09 09:46:36 -07:00
Eric Huss f2f12ba6a2 Bump to 0.49.0 2020-08-28 10:17:49 -07:00
Eric Huss 0e26eae5c1 Display embedded man pages for built-in commands. 2020-08-03 12:30:38 -07:00
Bram van den Heuvel dcd49a2fe8 Change fwdansi version from ~ to 2020-07-25 13:43:19 +02:00
Bram van den Heuvel 2b17b2d502 Increace termcolor version from 1.0 to 1.1 2020-07-24 17:43:46 +02:00
Eric Huss d750198a66 Bump to 0.48.0 2020-07-18 09:33:35 -07:00
dependabot-preview[bot] c4629eb93e
Update core-foundation requirement from 0.7.0 to 0.9.0
Updates the requirements on [core-foundation](https://github.com/servo/core-foundation-rs) to permit the latest version.
- [Release notes](https://github.com/servo/core-foundation-rs/releases)
- [Commits](https://github.com/servo/core-foundation-rs/compare/core-foundation-v0.7.0...core-foundation-v0.9.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-30 05:24:50 +00:00
est31 da86eaad8f Remove unused remove_dir_all dependency
Need to research why it isn't detected by cargo-udeps.
2020-06-26 06:37:40 +02:00
Eric Huss 8183cbaae6 Bump to 0.47.0 2020-06-05 10:15:15 -07:00
Alex Crichton 2af2abed4f Require latest libgit2 to pull in bugfixes
This'll pull in a fix for #8258
2020-06-03 08:14:57 -07:00
Daniel Wagner-Hall 556c236f9a Bump to semver 0.10 for VersionReq::is_exact
This stops using `to_string` as a proxy for this now-provided precise API.

This reverts commit b71927224f and bupms the
dependency version in Cargo.toml.
2020-05-25 11:11:45 +01:00
Alex Crichton b5c191911c Update im-rc to 15.0.0
Hopefully just a routine update triggered by dependabot!
2020-05-18 05:57:42 -07:00
bors ef3cbfcb5d Auto merge of #8095 - ehuss:paths-walking, r=alexcrichton
Updates to path source walking.

This is a collection of loosely related changes to path source walking:

* Add more context to error messages.
* Allow `package.exclude` patterns to match directories. Previously, the walker would recurse into the directory, and skip every file. Instead, just skip the whole directory. This can be helpful if the directory is not readable, or otherwise want to avoid walking.
* Don't require `Cargo.toml` to be in root of a git repo in order to use git to guide the selection. I'm not sure I understand the original reasoning that (any) `Cargo.toml` had to reside next to the `.git` directory.

The last is a moderately risky change, since it's hard to predict how this might affect more complex project layouts or new interactions with `.gitignore` that didn't exist before. Also, I'm wondering if it should just ignore if it fails to open the repo instead of emitting an error?

Closes #1729
Closes #6188
Closes #8092
2020-04-24 18:35:25 +00:00
Eric Huss 25715e4f2a Bump git2. 2020-04-24 09:58:17 -07:00
Eric Huss 0efc187816 Bump to 0.46.0 2020-04-24 08:45:16 -07:00
Eric Huss 65274ea7d5 Add a warning when using registry.token with source replacement. 2020-04-19 09:25:32 -07:00
Patrick Mooney c04a87c192 Update dependencies to support illumos target
This inlines the flock() logic from danburkert/fs2, which in its current
state does not compile on illumos (or certain other cfg(unix) targets).
2020-04-13 14:18:00 -05:00
bors 8a0d4d9c9a Auto merge of #8028 - ehuss:new-proc-macro-decouple, r=alexcrichton
Re-implement proc-macro feature decoupling.

This is essentially a rewrite of #8003. Instead of adding proc-macro to the index, it uses a strategy of downloading all packages before doing feature resolution. Then the package can be inspected for the proc-macro field.

This is a fairly major change. A brief overview:
- `PackageSet` now has a `download_accessible` method which tries to download a minimal set of every accessible package. This isn't very smart right now, and errs on downloading too much. In most cases it should be the same (or nearly the same) as before. It downloads extra in the following cases:
    - The check for `[target]` dependencies checks both host and target for every dependency. I could tighten that up a little so build dependencies only check for the host, but it would add some complexity and I wanted to get feedback first.
    - Optional dependencies disabled by the new feature resolver will get downloaded.
- Removed the loop in computing unit dependencies where downloading used to reside.
- When downloading starts, it should now show a more accurate count of how many crates are to be downloaded. Previously the count would fluctuate while the graph is being built.
2020-03-24 17:57:04 +00:00
Alex Tokarev 38aa4a2353 Remove unused transitive dependencies: miniz_oxide, adler32
Fixes #8019
2020-03-23 19:19:29 +03:00
Eric Huss 944f5049f1 Re-implement proc-macro feature decoupling. 2020-03-22 15:08:02 -07:00
Eric Huss 5a1862cd36 Add proc-macro to the index. 2020-03-15 10:10:25 -07:00
Eric Huss ac79b537e1 Bump to 0.45.0. 2020-03-13 19:31:06 -07:00
Alex Crichton 82239d7a10 Bump libgit2 dependencies
Brings in rust-lang/git2-rs#527

Closes #7466
Closes #7988
2020-03-13 12:26:46 -07:00
Alex Crichton 458138bf02 Replace std::sync::mpsc with a much simpler queue
We don't need the complexity of most channels since this is not a
performance sensitive part of Cargo, nor is it likely to be so any time
soon. Coupled with recent bugs (#7840) we believe in `std::sync::mpsc`,
let's just not use that and use a custom queue type locally which should
be amenable to a blocking push soon too.
2020-03-07 14:01:36 -08:00
Eric Huss 95008f91e5 Try to better handle restricted crate names. 2020-03-02 16:04:24 -08:00
Alex Crichton 5b6e7397ed Update libgit2 dependency
Brings in a few CVE fixes and such for libgit2, bringing libgit to
0.99.0
2020-02-26 09:39:05 -08:00
bors 1bc7f53139 Auto merge of #7875 - ehuss:update-jobserver, r=alexcrichton
Update jobserver.

Keep in sync with rust-lang/rust (https://github.com/rust-lang/rust/pull/68663), so that local users and lib users get the same version.
2020-02-06 20:44:26 +00:00
Eric Huss 8f09ac0c0b Update jobserver. 2020-02-06 11:30:07 -08:00
Eric Huss 635c423031 Update tar. 2020-02-06 11:29:07 -08:00
Eric Huss f8fafbc3de Bump to 0.44.0. 2020-01-31 12:05:14 -08:00
bors 4fbd644bc7 Auto merge of #7844 - spastorino:fix-infinite-loop, r=alexcrichton
Swap std::sync::mpsc channel with crossbeam_channel

Hoping it closes #7840

r? @Mark-Simulacrum
2020-01-30 07:54:51 +00:00
dependabot-preview[bot] 0086332785
Update pretty_env_logger requirement from 0.3 to 0.4
Updates the requirements on [pretty_env_logger](https://github.com/seanmonstar/pretty-env-logger) to permit the latest version.
- [Release notes](https://github.com/seanmonstar/pretty-env-logger/releases)
- [Commits](https://github.com/seanmonstar/pretty-env-logger/compare/v0.3.0...v0.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-30 05:12:20 +00:00
Santiago Pastorino 20ddff8cb6
Swap std::sync::mpsc channel with crossbeam_channel
Switching this hoping it closes #7840
2020-01-28 12:35:11 -03:00
dependabot-preview[bot] 2be0acc16b
Update humantime requirement from 1.2.0 to 2.0.0
Updates the requirements on [humantime](https://github.com/tailhook/humantime) to permit the latest version.
- [Release notes](https://github.com/tailhook/humantime/releases)
- [Commits](https://github.com/tailhook/humantime/compare/v1.2.0...v2.0.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-20 05:27:58 +00:00
bors c95f396b4c Auto merge of #7778 - ehuss:bump-crates-io, r=alexcrichton
Bump crates-io

Needed for #7776.
2020-01-08 18:26:02 +00:00
Eric Huss b688f7da56 Bump crates-io 2020-01-08 10:05:35 -08:00
Alex Crichton 3a18c89a55 Migrate from the failure crate to anyhow
The `anyhow` crate interoperates with the `std::error::Error` trait
rather than a custom `Fail` trait, and this is the general trend of
error handling in Rust as well.

Note that this is mostly mechanical (sed) and intended to get the test
suite passing. As usual there's still more idiomatic cleanup that can
happen, but that's left to later commits.
2020-01-07 16:50:09 -08:00
bors b42bec7f99 Auto merge of #7706 - matthiaskrgr:bump_git, r=Eh2406
bump git2 dependencies

This required some manual code changes which dependabot could not perform.
2019-12-23 15:10:46 +00:00
Eric Huss b52a01e360 Bump to 0.43.0 2019-12-21 14:13:53 -08:00
Matthias Krüger 8245e02924 bump git2 dependencies 2019-12-19 23:29:41 +01:00
Eric Huss fd65cbd816 Bump cargo-platform version. 2019-12-10 11:59:06 -08:00
Ralf Jung dc0959717c bump im-rc version 2019-11-19 15:36:46 +01:00
dependabot-preview[bot] 7762e73f73
Update core-foundation requirement from 0.6.0 to 0.7.0
Updates the requirements on [core-foundation](https://github.com/servo/core-foundation-rs) to permit the latest version.
- [Release notes](https://github.com/servo/core-foundation-rs/releases)
- [Commits](https://github.com/servo/core-foundation-rs/compare/core-foundation-v0.6.2...core-foundation-v0.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-13 05:12:59 +00:00
Eric Huss 1df81ee07e Bump to 0.42.0, Update changelog 2019-11-07 11:19:48 -08:00
dependabot-preview[bot] 2ed8f4f013
Update crossbeam-utils requirement from 0.6 to 0.7
Updates the requirements on [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam) to permit the latest version.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-utils-0.6.0...crossbeam-utils-0.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-07 05:12:30 +00:00
Alex Crichton 35bcbde3ac Update curl-sys dependency requirement
Pulls in alexcrichton/curl-rust#304 which fixes a bug from the last curl
update in #7308. This bug was not introduced by the Cargo PR itself but
rather by updating the `curl` submodule in the `curl-sys` crate. Without
this bugfix all downloads of a crate will make a new connection to
crates.io, which drastically increases download time since setting up a
connection takes so long.
2019-10-01 14:36:04 -07:00
Guanqun Lu d7071c2ff9 unify the quote in Cargo.toml 2019-10-01 15:39:57 +08:00
bors 8ae8b5ea98 Auto merge of #7308 - guanqun:add-ssl-version, r=alexcrichton
add an option to specify ssl version

Fixes #6684
2019-09-30 18:35:21 +00:00
Eric Huss 8ad031b54f Bump to 0.41.0, Update changelog 2019-09-27 09:02:13 -07:00
Guanqun Lu 05d88bf4dc add an option to specify ssl version
Fixes #6684
2019-09-26 23:05:09 +08:00
dependabot-preview[bot] 8f52dc9a87
Update env_logger requirement from 0.6.0 to 0.7.0
Updates the requirements on [env_logger](https://github.com/sebasmagri/env_logger) to permit the latest version.
- [Release notes](https://github.com/sebasmagri/env_logger/releases)
- [Changelog](https://github.com/sebasmagri/env_logger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sebasmagri/env_logger/compare/v0.6.0...v0.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-24 05:20:49 +00:00
bors 7ab477866e Auto merge of #7375 - ehuss:extract-platform, r=alexcrichton
Extract Platform to a separate crate.

This moves the `Platform`, `Cfg`, `CfgExpr` types to a new crate named "cargo-platform".  The intent here is to give users of `cargo_metadata` a way of parsing and inspecting cargo's platform values.

Along the way, I rewrote the error handling to remove `failure`, and to slightly improve the output.

I'm having doubts whether or not this is a good idea.  As you can see from the `examples/matches.rs` example, it is nontrivial to use this (which also misses cargo's config values and environment variables).  I don't know if anyone will actually use this.  If this doesn't seem to have value, I would suggest closing it.

I've also included a sample script, `publish.py`, for publishing cargo itself.  I suspect it will need tweaking, but I figure it would be a start and open for feedback.
2019-09-20 18:05:09 +00:00
dependabot-preview[bot] fa05eb2313
Update hex requirement from 0.3 to 0.4
Updates the requirements on [hex](https://github.com/KokaKiwi/rust-hex) to permit the latest version.
- [Release notes](https://github.com/KokaKiwi/rust-hex/releases)
- [Commits](https://github.com/KokaKiwi/rust-hex/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-18 05:15:16 +00:00
Eric Huss 57c96c194a Extract Platform to a separate crate. 2019-09-17 14:55:22 -07:00
bors cdf7f6380a Auto merge of #7374 - alexcrichton:less-url-serde, r=ehuss
Don't require the `serde` feature of `url`

Ends up meaning that in full crate compiles that `url` doesn't wait for
`serde` to finish, which in turn enables crates like `git2` to start
sooner!
2019-09-17 20:58:08 +00:00
bors d764fff2da Auto merge of #7311 - ehuss:pipeline-timing, r=alexcrichton
Experiment: Create timing report.

This is just an experiment, so I'm not sure if we'll want to merge it.

This adds an HTML report which gets saved to disk when the build is finished.  It is primarily geared for identifying slow dependencies, and for visualizing how pipelining affects the build.

Here's an example: https://ehuss.github.io/cargo-timing.html
You can mouse over the blocks to highlight the reverse-dependencies that are released when a unit finishes.  `syn` is a really good example.

It does a few other things, like displaying a message after each unit is finished.  See the docs for more information.
2019-09-17 20:33:15 +00:00
Alex Crichton 2f79b202ee Don't require the serde feature of url
Ends up meaning that in full crate compiles that `url` doesn't wait for
`serde` to finish, which in turn enables crates like `git2` to start
sooner!
2019-09-17 12:47:31 -07:00
Alex Crichton 9115b2c326 Extract support directory to its own crate
Extract out all our test support code to its own standalone crate so it
can be shared between multiple test suites if necessary.
2019-09-16 11:47:09 -07:00
Eric Huss 0664484552 Experiment: Create timing report. 2019-09-14 09:23:04 -07:00
Matthias Krüger d551d90455 add readme key to cargos manifest.
This should make the readme display on cargos crates.io page
2019-09-10 11:16:58 +02:00
Lzu Tao 1c9b292a2e Update home dependencies to v0.5
This home's release remove support for the old `.multirust`
directory. Also it fixes rustup_home and cargo_home implementation
when corresponding environment variables are absolute paths.
2019-08-21 20:24:06 +07:00
Alex Crichton 2a670c128b Update libgit2 dependencies
Pulls in a few fixes for libgit2, including some security-related
updates.
2019-08-20 13:05:51 -07:00
Eric Huss 5c7875d2e0 Bump to 0.40.0, Update changelog 2019-08-19 14:27:15 -07:00
dependabot-preview[bot] 09dc727f04
Update serde_ignored requirement from 0.0.4 to 0.1.0
Updates the requirements on [serde_ignored](https://github.com/dtolnay/serde-ignored) to permit the latest version.
- [Release notes](https://github.com/dtolnay/serde-ignored/releases)
- [Commits](https://github.com/dtolnay/serde-ignored/compare/0.0.4...0.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-19 06:26:20 +00:00
bors 60b7bf0045 Auto merge of #7247 - Eijebong:home, r=ehuss
Update home to 0.4
2019-08-13 23:59:51 +00:00
Eric Huss b41c209af3 Bump toml 0.5.3 2019-08-13 14:56:22 -07:00
Bastien Orivel dd20d69e49 Update home to 0.4.2 2019-08-13 17:46:10 +02:00
Eric Huss f3d4c6b8f5 Bump rustfix 2019-08-07 07:49:28 -07:00
Eric Huss 4f6553ab55 Use canonical paths when parsing dep-info.
Instead of treating Windows differently, this just always uses canonical paths
on all platforms.  This fixes a problem where symlinks were not treated
correctly on all platforms.

Switching rm_rf to the remove_dir_all crate because deleting symbolic links on
Windows is difficult.
2019-07-25 12:10:55 -07:00
bors 5251d92d47 Auto merge of #7175 - alexcrichton:update-url, r=ehuss
Update the `url` crate to 2.0

Looks like minor API changes, primarily around percent encoding.
2019-07-25 18:04:59 +00:00
bors c2ef5fddd0 Auto merge of #7176 - alexcrichton:update-git2, r=ehuss
Tighten requirements for git2 crates

Bring in a few updates, used to update libgit2 and fix a Windows issue
as well as updating the `url` dependencies.

Closes #7173
2019-07-25 17:21:07 +00:00
Alex Crichton bd7fe8914b Fix a deadlocking test with master libgit2
This commit fixes a test in Cargo to work around a seeming regression in
behavior in libgit2 around HTTP authentication. The expected flow for
HTTP authentication with git is that git sends an HTTP request and
receives an "unauthorized" response. It then sends another request with
authorization information and that's what we're testing is received in
the our test.

Previously libgit2 would issue a new HTTP connection if the previous one
was closed, but it looks like changes in libgit2 now require that the
same HTTP connection is used for the initial request and the subsequent
request with authorization information. This broke our test since it's
not using an HTTP compliant server at all and is just some handwritten
TCP reads/writes. The fix here is to basically stay with handwritten TCP
reads/writes but tweak how it happens so it's all on the same HTTP/TCP
connection to match what libgit2 is expecting.

Some extra assertions have also been added to try to prevent deadlocks
from happening in the future and instead make the test fail fast if this
situation comes up again.
2019-07-25 09:15:24 -07:00
Alex Crichton ae6778063f Tighten requirements for git2 crates
Bring in a few updates, used to update libgit2 and fix a Windows issue
as well as updating the `url` dependencies.

Closes #7173
2019-07-24 09:49:23 -07:00
Alex Crichton 3c67dc8430 Update the url crate to 2.0
Looks like minor API changes, primarily around percent encoding.
2019-07-24 08:26:28 -07:00
Lukas Lueg 91186e8c58 Remove byteorder-dependency 2019-07-08 12:35:34 +02:00
Eric Huss 2208c1f62f Bump to 0.39.0 2019-07-05 10:42:46 -07:00
Alex Crichton 290a727ad0 Extract resolver tests to their own crate
These tests take a good amount of time to run locally and they're also
causing a lot of dependencies to get pulled into rust-lang/rust, so
let's have a separate crate that we just test on our own CI
2019-06-18 10:50:48 -07:00
Alex Crichton e449cb23e3 Move the crates-io crate to a crates directory
That way when we add more crates we've got a place to put them!
2019-06-18 10:47:44 -07:00
Eric Huss a8c22ca1e8 Update to allow publishing cargo-test-macro. 2019-06-07 13:22:10 -07:00
Jethro Beekman a598309cb6 Don't rely on a thread local to uniquely create test roots 2019-06-07 12:41:25 -07:00
Josh Stone 1065102dc7 Update git2 crates for libgit2 0.28
See https://github.com/rust-lang/git2-rs/pull/425
2019-06-06 18:04:23 -07:00
bors a7648c7542 Auto merge of #6980 - Eh2406:varisat, r=alexcrichton
Test the Resolver against the varisat Library

Resolution can be reduced to the SAT problem. So this is an alternative implementation of the resolver that uses a SAT library for the hard work. This is intended to be easy to read, as compared to the real resolver, and run as part of the test sweet to make sure the real resolver works as expected. Part of #6120.

Some notes on performance:
The initial version did not support public & private deps:
~64 loc, `O(nln(n))` vars, `O(nln(n) + n*d)` clauses, 0.5x slower on `prop_passes_validation`
The final version:
~163 loc, `O(dn^2`) vars, `O(dn^3)`  clauses, 1.5x slower on `prop_passes_validation`

That comparison makes me feel better about spending months trying to get public & private deps to be fast enough for stabilization.
2019-05-28 15:13:28 +00:00
Eric Huss 353f7c0e1a Bump to 0.38.0 2019-05-23 10:03:14 -07:00
Eh2406 9602b78cc7 use varisat to verify the resolver 2019-05-21 12:11:25 -04:00
Eric Huss dcd4999d42 Add message caching. 2019-05-20 15:22:32 -07:00
dependabot[bot] 966e7f9f83
Update im-rc requirement from 12.1.0 to 13.0.0
Updates the requirements on [im-rc](https://github.com/bodil/im-rs) to permit the latest version.
- [Release notes](https://github.com/bodil/im-rs/releases)
- [Changelog](https://github.com/bodil/im-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bodil/im-rs/compare/12.1.0...13.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-05-20 05:41:28 +00:00
Eric Huss 337fbaaa12 Fix version of ignore.
Some tests relied on new behavior, so bump the minimal version.

The change to `gitignore_negate` was just an innocuous typo.
2019-05-13 18:05:10 -07:00
bors 22e2f23d5c Auto merge of #6880 - alexcrichton:cache, r=Eh2406
Parse less JSON on null builds

This commit fixes a performance pathology in Cargo today. Whenever Cargo
generates a lock file (which happens on all invocations of `cargo build`
for example) Cargo will parse the crates.io index to learn about
dependencies. Currently, however, when it parses a crate it parses the
JSON blob for every single version of the crate. With a lock file,
however, or with incremental builds only one of these lines of JSON is
relevant. Measured today Cargo building Cargo parses 3700 JSON
dependencies in the registry.

This commit implements an optimization that brings down the number of
parsed JSON lines in the registry to precisely the right number
necessary to build a project. For example Cargo has 150 crates in its
lock file, so now it only parses 150 JSON lines (a 20x reduction from
3700). This in turn can greatly improve Cargo's null build time. Cargo
building Cargo dropped from 120ms to 60ms on a Linux machine and 400ms
to 200ms on a Mac.

The commit internally has a lot more details about how this is done but
the general idea is to have a cache which is optimized for Cargo to read
which is maintained automatically by Cargo.

Closes #6866
2019-05-03 14:37:34 +00:00
Alex Crichton 6babe72e7c Parse less JSON on null builds
This commit fixes a performance pathology in Cargo today. Whenever Cargo
generates a lock file (which happens on all invocations of `cargo build`
for example) Cargo will parse the crates.io index to learn about
dependencies. Currently, however, when it parses a crate it parses the
JSON blob for every single version of the crate. With a lock file,
however, or with incremental builds only one of these lines of JSON is
relevant. Measured today Cargo building Cargo parses 3700 JSON
dependencies in the registry.

This commit implements an optimization that brings down the number of
parsed JSON lines in the registry to precisely the right number
necessary to build a project. For example Cargo has 150 crates in its
lock file, so now it only parses 150 JSON lines (a 20x reduction from
3700). This in turn can greatly improve Cargo's null build time. Cargo
building Cargo dropped from 120ms to 60ms on a Linux machine and 400ms
to 200ms on a Mac.

The commit internally has a lot more details about how this is done but
the general idea is to have a cache which is optimized for Cargo to read
which is maintained automatically by Cargo.

Closes #6866
2019-05-03 07:23:00 -07:00
Igor Gnatenko c14a329714
chore: Update opener to 0.4 2019-05-03 10:28:12 +02:00
bors f2ea95a37a Auto merge of #6861 - fluffysquirrels:http2-stream-error-spurious, r=alexcrichton
Treat HTTP/2 stream errors as spurious network errors.

Closes https://github.com/rust-lang/cargo/issues/6788.
2019-04-18 15:08:24 +00:00
Alex Helfet cc29c2b609 Treat HTTP/2 stream errors as spurious network errors. 2019-04-18 11:33:15 +01:00
Eric Huss 2923cfa390 Bump to 0.37.0 2019-04-15 12:09:02 -07:00
dependabot[bot] 227aa851f6
Update toml requirement from 0.4.2 to 0.5.0
Updates the requirements on [toml](https://github.com/alexcrichton/toml-rs) to permit the latest version.
- [Release notes](https://github.com/alexcrichton/toml-rs/releases)
- [Commits](https://github.com/alexcrichton/toml-rs/compare/0.4.2...0.5.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-18 05:35:49 +00:00
Eh2406 ed9386bd24 Proptest 0.9.1
This is a rework of #6636 now possible do to the change in testing from #6748
2019-03-16 08:00:39 -04:00
Alex Crichton d19b41f2c6 Release a jobserver token while locking a file
This is intended to fix #6747 where multiple Cargos invoked with the
same jobserver would all have their own token but not actually run
concurrently due to file locking. Instead the fix is that whenever Cargo
blocks for a file lock with a configured global jobserver, a token is
released just before we block and then reacquired afterwards. This way
we should ensure that we're not hogging a cpu/token unnecessarily
without doing any work!

Closes #6747
2019-03-15 07:07:06 -07:00
Eric Huss 78a60bc74f Stricter package change detection. 2019-03-12 20:33:45 -07:00
dependabot[bot] 5087cc45e4
Update glob requirement from 0.2.11 to 0.3.0
Updates the requirements on [glob](https://github.com/rust-lang/glob) to permit the latest version.
- [Release notes](https://github.com/rust-lang/glob/releases)
- [Commits](https://github.com/rust-lang/glob/compare/0.2.11...0.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2019-03-07 05:50:26 +00:00
Eric Huss 1a0430fd88 Bump to 0.36.0 2019-03-04 22:12:21 -08:00
Dale Wijnand 53a0995b4b
Add detail to multiple rename deps 2019-01-28 16:03:30 +00:00
Alex Crichton 78637a6bb8 Bump to 0.35.0
A routine update!
2019-01-22 13:18:16 -08:00
Eric Huss 3d84d0ad77 Add dependency registry to cargo metadata.
This adds the `registry` field for dependencies for alternate registries in
`cargo metadata`.
2018-12-29 21:14:25 -08:00
dependabot[bot] ed66cbc700
Update git2-curl requirement from 0.8.1 to 0.9.0
Updates the requirements on [git2-curl](https://github.com/alexcrichton/git2-rs) to permit the latest version.
- [Release notes](https://github.com/alexcrichton/git2-rs/releases)
- [Commits](https://github.com/alexcrichton/git2-rs/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-14 16:30:00 +00:00
dependabot[bot] 56dffe70cd
Update git2 requirement from 0.7.5 to 0.8.0
Updates the requirements on [git2](https://github.com/alexcrichton/git2-rs) to permit the latest version.
- [Release notes](https://github.com/alexcrichton/git2-rs/releases)
- [Commits](https://github.com/alexcrichton/git2-rs/commits/git2-curl-0.8.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-14 05:51:03 +00:00
Eric Huss 502ab6505c Update rustfix to 0.4.4. 2018-12-13 14:01:44 -08:00
Eric Huss fffb05d8fc Display errors when cargo fix fails.
It can be difficult to figure out what's wrong when a user reports that
`cargo fix` fails. There's often a large list of warnings, and it can
be hard to figure out which one caused a compile error.
2018-12-13 13:59:06 -08:00
Dale Wijnand 0e031b5a96
Allow testsuite warnings in dev
This makes the deny(warnings) in the testsuite conditional on a new
"deny-warnings" feature, that is then enabled in CI.

Ideally I could use the (reasonably well established) CI env var (like
we do for proptests), but I don't know how to get the attribute to be
defined in terms of an env var.
2018-12-13 01:03:08 +00:00
Alex Crichton 76ce4dfebd Reformat after idiom lints 2018-12-11 05:54:56 -08:00
Alex Crichton 9ed82b5779 Start using 2018 idioms in Cargo
Remove a number of `extern crate` directives and tweak a number of
imports. Not all `extern crate` is gone yet but this is the bulk of
them!
2018-12-11 05:45:46 -08:00
Alex Crichton 1b886f7072 Bump to 0.34.0 2018-12-08 03:07:46 -08:00
bors 41a7e150fc Auto merge of #6387 - dwijnand:rust-2018, r=dwijnand
Upgrade to Rust 2018 & fix edition idioms

None
2018-12-07 16:37:19 +00:00
dependabot[bot] c8d9085fd3
Update pretty_env_logger requirement from 0.2 to 0.3
Updates the requirements on [pretty_env_logger](https://github.com/seanmonstar/pretty-env-logger) to permit the latest version.
- [Release notes](https://github.com/seanmonstar/pretty-env-logger/releases)
- [Commits](https://github.com/seanmonstar/pretty-env-logger/commits/v0.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-07 06:48:49 +00:00
Dale Wijnand 04ddd4d0fc
Upgrade to Rust 2018 2018-12-06 20:18:35 +01:00
Dale Wijnand aa8eff88a9
Switch to pretty_env_logger, under --features pretty-env-logger 2018-11-30 14:13:35 +00:00
Eh2406 a703851abe try im-rs 2018-11-19 16:20:15 -05:00
Alex Crichton d9eca8c764 Enable the zlib feature of flate2
We're already pulling in zlib for other dependencies like curl/libgit2
so there's not really much use in duplicating the compression code with
miniz, so let's instruct `flate2` to use libz as well to compress and
decompress chunks.
2018-11-14 07:56:43 -08:00
bors 438c55d82e Auto merge of #6307 - alexcrichton:upgrade-crossbeam-utils, r=alexcrichton
Upgrade crossbeam-utils to 0.6.0
2018-11-13 00:47:39 +00:00
Alex Crichton 5e71ad6c5b Upgrade crossbeam-utils to 0.6.0 2018-11-12 08:04:28 -08:00
dependabot[bot] d3e22d81fd
Update env_logger requirement from 0.5.11 to 0.6.0
Updates the requirements on [env_logger](https://github.com/sebasmagri/env_logger) to permit the latest version.
- [Release notes](https://github.com/sebasmagri/env_logger/releases)
- [Commits](https://github.com/sebasmagri/env_logger/commits/v0.6.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-12 05:44:45 +00:00
Alex Crichton c181f490fc Enable HTTP/2 by default
This commit switches Cargo to using HTTP/2 by default. This is
controlled via the `http.multiplexing` configuration variable and has
been messaged out for testing [1] (although got very few responses).

There's been surprisingly little fallout from parallel downloads, so
let's see how this goes!

[1]: https://internals.rust-lang.org/t/testing-cargos-parallel-downloads/8466
2018-11-07 08:14:38 -08:00
bors f938c4f41b Auto merge of #6130 - alexcrichton:less-timeouts-u, r=ehuss
Fix timeouts firing while tarballs are extracted

This commit fixes #6125 by ensuring that while we're extracting tarballs
or doing other synchronous work like grabbing file locks we're not
letting the timeout timers of each HTTP transfer keep ticking. This is
curl's default behavior (which we don't want in this scenario). Instead
the timeout logic is inlined directly and we manually account for the
synchronous work happening not counting towards timeout limits.

Closes #6125
2018-11-06 01:53:17 +00:00
Khionu Sybiern 5a59494134 Remove patch and bump tar to 0.4.18
Signed-off-by: Khionu Sybiern <dev@khionu.net>
2018-11-05 11:42:19 -05:00
Khionu Sybiern 541e990681 Configure tar to not set mtime
Signed-off-by: Khionu Sybiern <dev@khionu.net>
2018-11-03 17:29:00 -04:00
Alex Crichton d2acfb6626 Bump to 0.33.0 2018-10-29 09:14:07 -07:00
Alex Crichton 0b0f089d3d Fix timeouts firing while tarballs are extracted
This commit fixes #6125 by ensuring that while we're extracting tarballs
or doing other synchronous work like grabbing file locks we're not
letting the timeout timers of each HTTP transfer keep ticking. This is
curl's default behavior (which we don't want in this scenario). Instead
the timeout logic is inlined directly and we manually account for the
synchronous work happening not counting towards timeout limits.

Closes #6125
2018-10-12 10:24:29 -07:00
Igor Matuszewski c1763256ac Bump flate2 to 1.0.3 2018-10-05 12:48:04 +02:00
Igor Matuszewski bcaaab03a8 Bump libgit2-sys to 0.7.9 2018-10-04 17:14:38 +02:00
bors 4e09634983 Auto merge of #5921 - Eh2406:proptest, r=alexcrichton
use proptest to fuzz the resolver

This has been a long time goal. This uses proptest to generate random registry indexes and throws them at the resolver.

It would be simple to generate a registry by,
1. make a list of name and version number each picked at random
2. for each pick a list of dependencies by making a list of name and version requirements at random.

Unfortunately, it would be extremely unlikely to generate any interesting cases, as the chance that the random name you depend on was also generated as the name of a crate is vanishingly small. So this implementation works very hard to ensure that it only generates valid dependency requirements.

This is still a WIP as it has many problems:
- [x] The current strategy is very convoluted. It is hard to see that it is correct, and harder to see how it can be expanded. Thanks to @centril for working with me on IRC to get this far. Do you have advice for improving it?
- [X] It is slow as molasses when run without release. I looked with a profilere and we seem to spend 2/3 of the time in `to_url`. Maybe we can special case `example.com` for test, like we do for `crates.io` or something? Edit: Done. `lazy_static` did its magic.
- [x] `proptest` does not yet work with `minimal-versions`, a taste of my own medicine.
- [x] I have not verified that, if I remove the fixes for other test that this regenerates them.

The current strategy does not:
- [x] generate interesting version numbers, it just dose 1.0.0, 2.0.0 ...
- [x] guarantee that the version requirements are possible to meet by the crate named.
- [ ] generate features.
- [ ] generate dev-dependencies.
- [x] build deep dependency trees, it seems to prefer to generate crates with 0 or 1 dependents so that on average the tree is 1 or 2 layers deep.

And last but not least, there are no interesting properties being tested. Like:
- [ ] If resolution was successful, then all the transitive requirements are met.
- [x] If resolution was successful, then unpublishing a version of a crate that was not selected should not change that.
- [x] If resolution was unsuccessful, then it should stay unsuccessful even if any version of a crate is unpublished.

- [ ] @maurer suggested testing for consistency. Same registry, same cargo version, same lockfile, every time.
- [ ] @maurer suggested a pareto optimality property (if all else stays the same, but new package versions are released, we don't get a new lockfile where every version is <= the old one, and at least one is < the old one)
2018-09-25 00:59:33 +00:00
Eh2406 6763eded58 proptest 0.8.7 has a better ci_no_shrink 2018-09-24 12:17:16 -04:00
David Tolnay d1218d2961
Fix missing messages when --message-format=json is deeply nested
This commit switches from serde_json::Value to RawValue, which can
process arbitrarily deeply nested JSON content without recursion.
2018-09-23 14:12:10 -07:00
Alex Crichton d9534bf498 Only load ~/.cargo/config for cargo install
This commit tweaks how configuration is loaded for `cargo install`, ensuring
that we only load configuration from `$HOME` instead of the current working
directory. This should make installations a little more consistent in that they
probably shouldn't cover project-local configuration but should respect global
configuration!

Closes #6025
2018-09-21 13:21:32 -07:00
Eh2406 40d9de46d6 Merge remote-tracking branch 'origin/master' into proptest 2018-09-19 22:04:11 -04:00
Alex Crichton bc942919e3 Use Message::result_for for better error messages
Recently fixed in the `curl` crate, this'll allow getting the full and complete
error message for each transfer instead of just the error code.
2018-09-18 11:33:18 -07:00
Alex Crichton a46df8fe7d Update the progress bar for parallel downloads
This is actually a super tricky problem. We don't really have the capacity for
more than one line of update-able information in Cargo right now, so we need to
squeeze a lot of information into one line of output for Cargo. The main
constraints this tries to satisfy are:

* At all times it should be clear what's happening. Cargo shouldn't just hang
  with no output when downloading a crate for a long time, a counter ideally
  needs to be decreasing while the download progresses.

* If a progress bar is shown, it shouldn't jump around. This ends up just being
  a surprising user experience for most. Progress bars should only ever
  increase, but they may increase at different speeds.

* Cargo has, currently, at most one line of output (as mentioned above) to pack
  information into. We haven't delved into fancier terminal features that
  involve multiple lines of update-able output.

* When downloading crates as part of `cargo build` (the norm) we don't actually
  know ahead of time how many crates are being downloaded. We rely on the
  calculation of unit dependencies to naturally feed into downloading more
  crates.

* Furthermore, once we decide to download a crate, we don't actually know how
  big it is! We have to wait for the server to tell us how big it is.

There doesn't really seem to be a great solution that satisfies all of these
constraints unfortunately. As a result this commit implements a relatively
conservative solution which should hopefully get us most of the way there. There
isn't actually a progress bar but rather Cargo prints that it's got N crates
left to download, and if it takes awhile it prints out that there are M bytes
remaining.

Unfortunately the progress is pretty choppy and jerky, not providing a smooth
UI. This appears to largely be because Cargo will synchronously extract
tarballs, which for large crates can cause a noticeable pause. Cargo's not
really prepared internally to perform this work on helper threads, but ideally
if it could do so it would improve the output quite a bit! (making it much
smoother and also able to account for the time tarball extraction takes).
2018-09-18 11:33:18 -07:00
Alex Crichton 468f243e0e Parallelize downloads with HTTP/2
This commit implements parallel downloads using `libcurl` powered by
`libnghttp2` over HTTP/2. Using all of the previous refactorings this actually
implements usage of `Multi` to download crates in parallel. This achieves some
large wins locally, taking download times from 30s to 2s in the best case.

The standard output of Cargo is also changed as a result of this commit. It's
no longer useful for Cargo to print "Downloading ..." for each crate really as
they all start instantaneously. Instead Cargo now no longer prints `Downloading`
by default (unless attached to a pipe) and instead only has one progress bar for
all downloads. Currently this progress bar is discrete and based on the total
number of downloads, no longer specifying how much of one particular download
has happened. This provides a less granular view into what Cargo is doing but
it's hoped that it looks reasonable from an outside perspective as there's
still a progress bar indicating what's happening.
2018-09-18 11:33:04 -07:00
Alex Crichton aab0a33859 Bump cargo to 0.32.0
It's that time of every-6-weeks!
2018-09-17 18:42:51 -07:00
bors 8201560b69 Auto merge of #5988 - Eh2406:explore_the_bug, r=alexcrichton
BUG fuzzing found a bug in the resolver, we need a complete set of conflicts to do backjumping

As mentioned in https://github.com/rust-lang/cargo/pull/5921#issuecomment-418890269, the new proptest found a live bug! This PR so far tracs my attempt to minimize the problematic input.

The problem turned out to be that we where backjumping on incomplete set of conflicts.
2018-09-17 22:01:12 +00:00
Eh2406 682b295257 bump env_logger to a more minimal-versions compatible one 2018-09-17 17:58:38 -04:00
Alex Crichton 0b30a790b1 Bump Cargo to 0.30.0
Looks like we accidentally forgot to do this!
2018-09-07 08:43:02 -07:00
Eh2406 17fe190aba update to the new version of proptest 2018-08-26 22:11:20 -04:00
Eh2406 ce1772c85a get working with minimal-versions 2018-08-21 16:43:06 -04:00
Eh2406 56a222cd30 a start on using proptest to fuzz the resolver 2018-08-21 14:10:14 -04:00
dependabot[bot] e36ae43400
Update opener requirement from 0.2.0 to 0.3.0
Updates the requirements on [opener](https://github.com/Seeker14491/opener) to permit the latest version.
- [Release notes](https://github.com/Seeker14491/opener/releases)
- [Changelog](https://github.com/Seeker14491/opener/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Seeker14491/opener/commits/v0.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-08-20 05:27:11 +00:00
bors a284c3ff96 Auto merge of #5856 - Eh2406:min-test, r=alexcrichton
run some tests with minimal-versions on CI

In #5757 we discovered that sum test don't pass with minimal-versions, and so only added CI for `cargo check`. This PR is to see if that is still needed, and if it is then which test rely on upstream bugfix.
2018-08-15 17:00:22 +00:00
Jacob Finkelman c4d565fc8f Try serde_json 2018-08-14 10:58:42 -04:00
Eh2406 1eaae61289 get features_are_quoted working with minimal-versions on CI 2018-08-14 10:58:42 -04:00
Brian Bowman 48d0708aa6 Handle opening browser with opener crate
Fixes #5701
2018-08-13 21:00:34 -05:00
bors 0e7a46e327 Auto merge of #5858 - dekellum:git-check-logging-and-test, r=alexcrichton
Improve verbose console and log for finding git repo in package check

Third attempt to resolve #5823 by improving logging and tests. This exposes the issue to testing,  via verbose console output and is dependent on alexcrichton/git2-rs#341 as just released in git2 0.7.5 crate. Thus tests *should* now pass on all platforms, incl. windows, but I also intend to bump the minimal git2 release dependency (in a subsequently added commit).

cc: @Eh2406 thanks for your fix and help!
2018-08-07 22:19:54 +00:00
bors 2b6e99639f Auto merge of #5862 - kennytm:capture-rustc-output, r=alexcrichton
Fully capture rustc and rustdoc output when -Zcompile-progress is passed

Fixes #5764 and #5695.

On Windows, we will parse the ANSI escape code into console commands via my `fwdansi` package, based on @ishitatsuyuki's idea in https://github.com/rust-lang/cargo/issues/5695#issuecomment-406300234. Outside of Windows the content is forwarded as-is.
2018-08-06 15:12:01 +00:00
Alex Crichton 585c7d43f9 Add a feature to build a vendored OpenSSL
This will be enabled through rust-lang/rust to ensure that for dist builds we
can build a Cargo with a vendored OpenSSL
2018-08-04 23:02:57 -07:00
kennytm 641f7ff2c7
Capture output from rustc and rustdoc. 2018-08-04 00:51:42 +08:00
David Kellum fcd86f3270 Update git2 minimal version to 0.7.5 for a fix 2018-08-02 15:46:19 -07:00
Alex Crichton 4477355b01 Switch strategies for how rustc's workspace is unioned
See rust-lang/rust#52919 for more details.
2018-08-01 21:28:47 -07:00
Alex Crichton adbd625e35 Upgrade to failure 0.1.2 idioms
Fixes some deprecation warnings in Cargo
2018-08-01 07:20:04 -07:00
Alex Crichton 876a50366b fix: Iteratively apply suggestions from the compiler
This commit updates the `cargo fix` implementation to iteratively apply fixes
from the compiler instead of only once. Currently the compiler can sometimes
emit overlapping suggestions, such as in the case of transitioning

    ::foo::<::Bar>();

to ...

    crate::foo::<crate::Bar>();

and `rustfix` rightfully can't handle overlapping suggestions as there's no
clear way of how to disambiguate the fixes. To fix this problem Cargo will now
run `rustc` and `rustfix` multiple times, attempting to reach a steady state
where no fixes failed to apply.

Naturally this is a pretty tricky thing to do and we want to be sure that Cargo
doesn't loop forever, for example. A number of safeguards are in place to
prevent Cargo from going off into the weeds when fixing files, notably avoiding
to reattempt fixes if no successful fixes ended up being applied.

Closes #5813
Closes rust-lang/rust#52754
2018-07-31 14:20:58 -07:00
dependabot[bot] 6f11cd9e14
Update crossbeam-utils requirement to 0.5
Updates the requirements on [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam-utils) to permit the latest version.
- [Release notes](https://github.com/crossbeam-rs/crossbeam-utils/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam-utils/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam-utils/commits/v0.5.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-26 05:30:17 +00:00
Dale Wijnand 8ea90e96cf
Switch to crossbeam_utils crate, sidesteppin 2018-07-25 23:32:25 +01:00
Dale Wijnand ac2d5d0917
Update the minimal parking_lot_core version 2018-07-25 17:11:26 +01:00
dependabot[bot] 4b73ed06cb
Update crossbeam requirement to 0.4
Updates the requirements on [crossbeam](https://github.com/crossbeam-rs/crossbeam) to permit the latest version.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-25 05:31:03 +00:00
Eh2406 4a8c70ecc0 update curl so we don't need so may hacks 2018-07-24 10:41:10 -04:00
Eh2406 96d3c05f84 typo 2018-07-23 10:42:36 -04:00
Eh2406 f6a29a7707 clarify synthetic nature of dep 2018-07-21 12:35:35 -04:00
Eh2406 8a7123c79e update min dependencies to build with minimal-versions on windows 2018-07-20 22:04:27 -04:00
Eh2406 adc8b5d6e1 update min dependencies to build with minimal-versions
Big thanks to @klausi for doing most of the work!
Thanks to @matklad for pointing out that we could finish it.
2018-07-20 17:13:08 -04:00
dependabot[bot] 413e6489ff
Update termcolor requirement to 1.0
Updates the requirements on [termcolor](https://github.com/BurntSushi/termcolor) to permit the latest version.
- [Release notes](https://github.com/BurntSushi/termcolor/releases)
- [Commits](https://github.com/BurntSushi/termcolor/commits/wincolor-1.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-18 05:36:04 +00:00
Alex Crichton b02ba3771e Import cargo fix directly in to Cargo
This commit imports the `cargo fix` subcommand in rust-lang-nursery/rustfix
directly into Cargo as a subcommand. This should allow us to ease our
distribution story of `cargo fix` as we prepare for the upcoming 2018 edition
release.

It's been attempted here to make the code as idiomatic as possible for Cargo's
own codebase. Additionally all tests from cargo-fix were imported into Cargo's
test suite as well. After this lands and is published in nightly the `cargo-fix`
command in rust-lang-nursery/rustfix will likely be removed.

cc rust-lang/rust#52272
2018-07-16 21:58:58 -07:00