Auto merge of #5989 - alexcrichton:change-default, r=Mark-Simulacrum
Change the default edition for `cargo new` to 2018
As it says on the tin! Some tests were updated to explicitly pass 2015 so they
can continue to work on stable, and otherwise `cargo new` should now by default
generate a 2018 project.
Alex Crichton [Fri, 7 Sep 2018 00:01:20 +0000 (17:01 -0700)]
Change the default edition for `cargo new` to 2018
As it says on the tin! Some tests were updated to explicitly pass 2015 so they
can continue to work on stable, and otherwise `cargo new` should now by default
generate a 2018 project.
Auto merge of #5984 - alexcrichton:stabilize-edition, r=ehuss
Stabilize `edition` key and add `cargo new --edition`
This commit stabilizes the `edition` key in `Cargo.toml`, both in the
`[package]` section and inside subtargets. Additionally the `cargo new` and
`cargo init` subcommands have been enhanced with a `--edition` flag to allow
explicitly specifying the edition to be generated.
This commit does not yet change the default edition that's generated.
Alex Crichton [Wed, 5 Sep 2018 22:29:22 +0000 (15:29 -0700)]
Stabilize `edition` key and add `cargo new --edition`
This commit stabilizes the `edition` key in `Cargo.toml`, both in the
`[package]` section and inside subtargets. Additionally the `cargo new` and
`cargo init` subcommands have been enhanced with a `--edition` flag to allow
explicitly specifying the edition to be generated.
This commit does not yet change the default edition that's generated.
Auto merge of #5983 - alexcrichton:fix-rustc-wrapper, r=dwijnand
fix: Fix unusual errors with `RUSTC_WRAPPER`
This commit fixes the interaction of `cargo fix` and `RUSTC_WRAPPER`, ensuring
that Cargo at least doesn't die internally. For now `RUSTC_WRAPPER` is
overridden for normal execution but we can eventually one day probably support
`RUSTC_WRAPPER`!
Alex Crichton [Wed, 5 Sep 2018 22:17:43 +0000 (15:17 -0700)]
fix: Fix unusual errors with `RUSTC_WRAPPER`
This commit fixes the interaction of `cargo fix` and `RUSTC_WRAPPER`, ensuring
that Cargo at least doesn't die internally. For now `RUSTC_WRAPPER` is
overridden for normal execution but we can eventually one day probably support
`RUSTC_WRAPPER`!
Auto merge of #5973 - lostiniceland:5717-update-docs, r=alexcrichton
Do not use a disabled-option in the docs
Updates rust-lang/cargo#5717
Since people tend to copy/paste, the docs should not use the option which will disable curls low-speed-limit. Rather use a value lower than the default of 10
Also reverts removal of default low-speed-time (30s) in case no timeout is configured
Marc Schlegel [Tue, 4 Sep 2018 16:22:10 +0000 (18:22 +0200)]
Do not use a disabled-option in the docs
Updates rust-lang/cargo#5717
Since people tend to copy/paste, the docs should not use the option which will disable curls low-speed-limit. Rather use a value lower than the default of 10
Auto merge of #5957 - lostiniceland:5717-curl-low_speed, r=alexcrichton
Provide http-config option for curl low-speed-limit/time
Fixes rust-lang/cargo#5717
Provides new override options for curl in Cargo http config-section.
```
[http]
timeout = 2
low-speed-limit = 5
```
Test with the following during crate-download
`sudo tc qdisc add dev eth0 handle 1: root htb default 11 && sudo tc class add dev eth0 parent 1: classid 1:1 htb rate 8bps && sudo tc class add dev eth0 parent 1:1 classid 1:11 htb rate 8bps`
bors [Fri, 31 Aug 2018 22:43:25 +0000 (22:43 +0000)]
Auto merge of #5944 - dwijnand:fix-force-rebuild, r=alexcrichton
Force `cargo fix` to rebuild
Fixes #5736
This is a resubmit of @killercup's #5750, rebased on current master.
@alexcrichton From browsing the code I feel like `-p` would still restrict the packages to rebuild, despite the rebuild flag added. But I might be misreading or not-fully-reading the code. Could you give me some mentoring instructions for the test cases you're concerned with?
bors [Wed, 29 Aug 2018 17:08:25 +0000 (17:08 +0000)]
Auto merge of #5943 - dwijnand:fix-allow-staged, r=alexcrichton
Add `--allow-staged` to `cargo fix`
Fixes #5737
This is @jljusten's branch, adapted to the testsuite changes in master.
Submitted as an alternative to #5910 to expedite #5737 resolution in time for Edition RC 1.
Dale Wijnand [Tue, 28 Aug 2018 23:17:39 +0000 (01:17 +0200)]
Merge branch 'master' into fix-allow-staged
* master: (25 commits)
Migrate from tests fom assert_that/execs to .run()
Wrap ProcessBuilder in Execs & make .cargo return that
Make old Execs methods take not consume self
Extract Execs::match_process
Add #[must_use] to Execs
Inline Execs::_with_stderr
Remove an unrun "cargo build" ProcessBuilder
Add documentation for creating test dependencies.
Only use non-absolute paths for `path` dependencies
Fix test failure on nightly due to `codemap::Span` change.
New metabuild strategy using custom src_path enum.
Remove unnecessary change.
Address review comments.
Metabuild (RFC 2196)
Handle Window's missing file error message
Make "cargo uninstall" uninstall the cwd bins
update comment based on further research
List URL in HTTP download failures
Fix compilation error
Improve the `cargo install` deprecation messaging
...
bors [Fri, 24 Aug 2018 19:37:00 +0000 (19:37 +0000)]
Auto merge of #5935 - alexcrichton:vendor-paths, r=ehuss
Only use non-absolute paths for `path` dependencies
Previously Cargo would use a non-absolute path for any dependency contained
within the workspace root but this switches Cargo to only using relative paths
for `path` dependencies. In practice this shouldn't make much difference, but
for vendored crates and moving around `CARGO_HOME` it can produce more
consistent results when target directories are shared.
Alex Crichton [Thu, 23 Aug 2018 18:51:05 +0000 (11:51 -0700)]
Only use non-absolute paths for `path` dependencies
Previously Cargo would use a non-absolute path for any dependency contained
within the workspace root but this switches Cargo to only using relative paths
for `path` dependencies. In practice this shouldn't make much difference, but
for vendored crates and moving around `CARGO_HOME` it can produce more
consistent results when target directories are shared.
Eric Huss [Fri, 24 Aug 2018 04:49:43 +0000 (21:49 -0700)]
New metabuild strategy using custom src_path enum.
- Use new enum `TargertSourcePath` for Target::src_path to make it explicit that metabuild has a special path.
- `cargo metadata` now skips the metabuild Target.
- JSON artifacts include the true path to the metabuild source file. This may not be the best solution, but it's unclear what it should be, and I would prefer to avoid breaking the output. Alternatively it could just not emit anything? I'm not completely familiar with the use case of these artifact messages.
- Place the file in `target/.metabuild/metabuild-pkgname-HASH.rs` instead of in the debug/release directory. Its contents do not depend on the profile.
- Fix bug in write_if_changed.
- More tests.