]> git.proxmox.com Git - cargo.git/log
cargo.git
6 years agoBump Cargo to 0.30.0
Alex Crichton [Fri, 7 Sep 2018 15:43:02 +0000 (08:43 -0700)]
Bump Cargo to 0.30.0

Looks like we accidentally forgot to do this!

6 years agoAuto merge of #5989 - alexcrichton:change-default, r=Mark-Simulacrum
bors [Fri, 7 Sep 2018 00:15:42 +0000 (00:15 +0000)]
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.

6 years agoChange the default edition for `cargo new` to 2018
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.

6 years agoAuto merge of #5984 - alexcrichton:stabilize-edition, r=ehuss
bors [Thu, 6 Sep 2018 22:17:24 +0000 (22:17 +0000)]
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.

Closes #5980

6 years agoStabilize `edition` key and add `cargo new --edition`
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.

Closes #5980

6 years agoAuto merge of #5987 - dwijnand:remove-cwd-root, r=alexcrichton
bors [Thu, 6 Sep 2018 17:27:02 +0000 (17:27 +0000)]
Auto merge of #5987 - dwijnand:remove-cwd-root, r=alexcrichton

Remove/rework some redundant .cwd(p.root()) in tests

Just a little trim to the tests.

6 years agoAuto merge of #5985 - dwijnand:fix-rustc-wrapper-unset, r=alexcrichton
bors [Thu, 6 Sep 2018 16:24:16 +0000 (16:24 +0000)]
Auto merge of #5985 - dwijnand:fix-rustc-wrapper-unset, r=alexcrichton

Don't use an empty RUSTC_WRAPPER

Fixes #5588

6 years agoDon't use an empty RUSTC_WRAPPER
Dale Wijnand [Wed, 5 Sep 2018 23:26:29 +0000 (00:26 +0100)]
Don't use an empty RUSTC_WRAPPER

6 years agoSimplify test::install_ignores_cargo_config
Dale Wijnand [Thu, 6 Sep 2018 06:37:01 +0000 (07:37 +0100)]
Simplify test::install_ignores_cargo_config

6 years agoFix change in install::install_ignores_cargo_config
Dale Wijnand [Thu, 6 Sep 2018 06:36:54 +0000 (07:36 +0100)]
Fix change in install::install_ignores_cargo_config

6 years agosupport::git::Repository doesn't support .cargo (yet?)
Dale Wijnand [Thu, 6 Sep 2018 06:33:24 +0000 (07:33 +0100)]
support::git::Repository doesn't support .cargo (yet?)

6 years agoAuto merge of #5983 - alexcrichton:fix-rustc-wrapper, r=dwijnand
bors [Thu, 6 Sep 2018 06:26:20 +0000 (06:26 +0000)]
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`!

Closes #5981

6 years agoRemove/reworksome redundant .cwd(p.root()) in tests
Dale Wijnand [Thu, 6 Sep 2018 00:12:53 +0000 (01:12 +0100)]
Remove/reworksome redundant .cwd(p.root()) in tests

6 years agofix: Fix unusual errors with `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`!

Closes #5981

6 years agoAuto merge of #5977 - ehuss:timeout-doc, r=alexcrichton
bors [Wed, 5 Sep 2018 06:56:44 +0000 (06:56 +0000)]
Auto merge of #5977 - ehuss:timeout-doc, r=alexcrichton

Fix http.timeout documentation.

This was changed in #2770, but the docs were never updated.

6 years agoFix http.timeout documentation.
Eric Huss [Wed, 5 Sep 2018 04:20:42 +0000 (21:20 -0700)]
Fix http.timeout documentation.

This was changed in #2770, but the docs were never updated.

6 years agoAuto merge of #5976 - ehuss:git-cli-test-win, r=alexcrichton
bors [Tue, 4 Sep 2018 23:39:08 +0000 (23:39 +0000)]
Auto merge of #5976 - ehuss:git-cli-test-win, r=alexcrichton

Add a way to skip the `use_the_cli` test for rust repo.

6 years agoAdd a way to skip the `use_the_cli` test for rust repo.
Eric Huss [Tue, 4 Sep 2018 21:01:49 +0000 (14:01 -0700)]
Add a way to skip the `use_the_cli` test for rust repo.

6 years agoAuto merge of #5973 - lostiniceland:5717-update-docs, r=alexcrichton
bors [Tue, 4 Sep 2018 20:46:07 +0000 (20:46 +0000)]
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

6 years agoRevert removal of default-value for curl low-speed-time
Marc Schlegel [Tue, 4 Sep 2018 17:16:41 +0000 (19:16 +0200)]
Revert removal of default-value for curl low-speed-time

In case no timeout is specified a default value is needed.

6 years agoDo not use a disabled-option in the docs
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

6 years agoAuto merge of #5970 - tbu-:pr_doc_fixlink, r=alexcrichton
bors [Tue, 4 Sep 2018 15:58:39 +0000 (15:58 +0000)]
Auto merge of #5970 - tbu-:pr_doc_fixlink, r=alexcrichton

Fix a doc link

6 years agoAuto merge of #5971 - dwijnand:one-architecture, r=alexcrichton
bors [Tue, 4 Sep 2018 15:20:08 +0000 (15:20 +0000)]
Auto merge of #5971 - dwijnand:one-architecture, r=alexcrichton

Migrate some architecture notes from the wiki

Merge https://github.com/rust-lang/cargo/wiki/Cargo's-architecture into
the ARCHITECTURE.md in the repo.

Fixes #5528

6 years agoMigrate some architecture notes from the wiki
Dale Wijnand [Tue, 4 Sep 2018 09:13:04 +0000 (10:13 +0100)]
Migrate some architecture notes from the wiki

Merge https://github.com/rust-lang/cargo/wiki/Cargo's-architecture into
the ARCHITECTURE.md in the repo.

6 years agoFix a doc link
Tobias Bucher [Tue, 4 Sep 2018 08:36:50 +0000 (10:36 +0200)]
Fix a doc link

6 years agoAuto merge of #5957 - lostiniceland:5717-curl-low_speed, r=alexcrichton
bors [Mon, 3 Sep 2018 22:51:19 +0000 (22:51 +0000)]
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`

Clear with
`sudo tc qdisc del dev eth0 root`

6 years agoAuto merge of #5966 - matthiaskrgr:clippy_3, r=dwijnand
bors [Mon, 3 Sep 2018 21:29:51 +0000 (21:29 +0000)]
Auto merge of #5966 - matthiaskrgr:clippy_3, r=dwijnand

clippy: resolve all warnings about useless format!()

6 years agoProvide http-config option for curl low-speed-limit
Marc Schlegel [Mon, 3 Sep 2018 15:44:07 +0000 (17:44 +0200)]
Provide http-config option for curl low-speed-limit

Fixes rust-lang/cargo#5717

low-speed-time was removed because the corresponding curl-option is already set via http.timeout.

removed unnecessary Option.

6 years agoclippy: resolve all warnings about useless format!()
Matthias Krüger [Mon, 3 Sep 2018 09:38:29 +0000 (11:38 +0200)]
clippy: resolve all warnings about useless format!()

6 years agoAuto merge of #5874 - japaric:revert-revert-gh5606, r=alexcrichton
bors [Sun, 2 Sep 2018 21:46:25 +0000 (21:46 +0000)]
Auto merge of #5874 - japaric:revert-revert-gh5606, r=alexcrichton

make `cargo install` ignore .cargo/config

closes #5850

r? @alexcrichton

6 years agoProvide http-config option for curl low-speed-limit/time
Marc Schlegel [Thu, 30 Aug 2018 21:55:53 +0000 (23:55 +0200)]
Provide http-config option for curl low-speed-limit/time

Fixes rust-lang/cargo#5717

6 years agofix unit test
Jorge Aparicio [Sat, 1 Sep 2018 16:16:49 +0000 (18:16 +0200)]
fix unit test

6 years agodrop CompileMode::Install; override target in `exec`
Jorge Aparicio [Sat, 1 Sep 2018 14:07:15 +0000 (16:07 +0200)]
drop CompileMode::Install; override target in `exec`

6 years agoadd Install to all_modes
Jorge Aparicio [Thu, 9 Aug 2018 19:43:23 +0000 (14:43 -0500)]
add Install to all_modes

6 years agofix test source
Jorge Aparicio [Thu, 9 Aug 2018 18:26:11 +0000 (13:26 -0500)]
fix test source

6 years agoadd a note to the reference
Jorge Aparicio [Wed, 8 Aug 2018 17:29:27 +0000 (12:29 -0500)]
add a note to the reference

6 years agomake `cargo install` ignore .cargo/config
Jorge Aparicio [Wed, 8 Aug 2018 15:09:54 +0000 (10:09 -0500)]
make `cargo install` ignore .cargo/config

closes #5850

6 years agoAuto merge of #5944 - dwijnand:fix-force-rebuild, r=alexcrichton
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?

6 years agoAuto merge of #5952 - dwijnand:fix-path-deep_dependencies_trigger_rebuild, r=alexcrichton
bors [Thu, 30 Aug 2018 18:47:24 +0000 (18:47 +0000)]
Auto merge of #5952 - dwijnand:fix-path-deep_dependencies_trigger_rebuild, r=alexcrichton

Fix path::deep_dependencies_trigger_rebuild often failing in CI

A shallow fix for `path::deep_dependencies_trigger_rebuild` in particular as it's failed my PRs often.

See https://github.com/rust-lang/cargo/pull/5935#issuecomment-417148372, and #5940 for the bigger picture.

6 years agoAuto merge of #5950 - dwijnand:cwd, r=alexcrichton
bors [Thu, 30 Aug 2018 09:47:09 +0000 (09:47 +0000)]
Auto merge of #5950 - dwijnand:cwd, r=alexcrichton

Introduce the CWD macro in test output asserting

Avoids dealing with things like CWD changing.

Mentioned in #5742

6 years agoIntroduce the CWD macro in test output asserting
Dale Wijnand [Wed, 29 Aug 2018 17:56:48 +0000 (19:56 +0200)]
Introduce the CWD macro in test output asserting

Avoids dealing with things like CWD changing.

6 years agoFix path::deep_dependencies_trigger_rebuild often failing in CI
Dale Wijnand [Thu, 30 Aug 2018 05:31:51 +0000 (07:31 +0200)]
Fix path::deep_dependencies_trigger_rebuild often failing in CI

6 years agoAssert fix::doesnt_rebuild_dependencies stderr fully
Dale Wijnand [Thu, 30 Aug 2018 05:28:20 +0000 (07:28 +0200)]
Assert fix::doesnt_rebuild_dependencies stderr fully

Gives more confidence.

6 years agoOnly force rebuild of top-level units, not of unit dependencies
Dale Wijnand [Wed, 29 Aug 2018 22:12:37 +0000 (00:12 +0200)]
Only force rebuild of top-level units, not of unit dependencies

6 years agoAuto merge of #5949 - dwijnand:extract-FixArgs-prepare_for_edition_resolve, r=alexcri...
bors [Wed, 29 Aug 2018 21:19:01 +0000 (21:19 +0000)]
Auto merge of #5949 - dwijnand:extract-FixArgs-prepare_for_edition_resolve, r=alexcrichton

Extract FixArgs::prepare_for_edition_resolve

A little code dedup from working on #5948.

6 years agoTest that cargo fix doesn't aggressively rebuild
Dale Wijnand [Wed, 29 Aug 2018 19:24:16 +0000 (21:24 +0200)]
Test that cargo fix doesn't aggressively rebuild

6 years agoExtract FixArgs::prepare_for_edition_resolve
Dale Wijnand [Wed, 29 Aug 2018 17:22:15 +0000 (19:22 +0200)]
Extract FixArgs::prepare_for_edition_resolve

6 years agoAuto merge of #5943 - dwijnand:fix-allow-staged, r=alexcrichton
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.

6 years agoAuto merge of #5945 - dwijnand:remove-hamcrest, r=alexcrichton
bors [Wed, 29 Aug 2018 16:12:28 +0000 (16:12 +0000)]
Auto merge of #5945 - dwijnand:remove-hamcrest, r=alexcrichton

Remove Cargo's internal `hamcrest` module

Fixes #5742

6 years agoActually delete the hamcrest module..
Dale Wijnand [Wed, 29 Aug 2018 15:09:39 +0000 (17:09 +0200)]
Actually delete the hamcrest module..

6 years agoRemove further references to hamcrest in the docs
Dale Wijnand [Wed, 29 Aug 2018 15:08:42 +0000 (17:08 +0200)]
Remove further references to hamcrest in the docs

6 years agoReplace some assert_that usage in doc comments
Dale Wijnand [Wed, 29 Aug 2018 06:37:21 +0000 (08:37 +0200)]
Replace some assert_that usage in doc comments

6 years agoMove MatchResult from hamcrest to testsuite/support
Dale Wijnand [Wed, 29 Aug 2018 06:33:18 +0000 (08:33 +0200)]
Move MatchResult from hamcrest to testsuite/support

6 years agoRemove hamcrest Matcher
Dale Wijnand [Wed, 29 Aug 2018 06:32:48 +0000 (08:32 +0200)]
Remove hamcrest Matcher

6 years agoRemove hamcrest has_installed_exe & is_not
Dale Wijnand [Wed, 29 Aug 2018 06:32:28 +0000 (08:32 +0200)]
Remove hamcrest has_installed_exe & is_not

6 years agoRemove hamcrest existing_file()
Dale Wijnand [Wed, 29 Aug 2018 06:11:10 +0000 (08:11 +0200)]
Remove hamcrest existing_file()

6 years agoRemove hamcrest existing_dir()
Dale Wijnand [Wed, 29 Aug 2018 05:53:01 +0000 (07:53 +0200)]
Remove hamcrest existing_dir()

6 years agoRemove hamcrest contains()
Dale Wijnand [Wed, 29 Aug 2018 05:42:03 +0000 (07:42 +0200)]
Remove hamcrest contains()

6 years agoAuto merge of #5942 - dwijnand:less-assert_that, r=alexcrichton
bors [Wed, 29 Aug 2018 00:27:20 +0000 (00:27 +0000)]
Auto merge of #5942 - dwijnand:less-assert_that, r=alexcrichton

Further reduce assert_that usage

Refs #5742

6 years agoRevert back to some .exec_with_output() usage
Dale Wijnand [Wed, 29 Aug 2018 00:04:28 +0000 (02:04 +0200)]
Revert back to some .exec_with_output() usage

Avoids difference in indentations across different PATHs.

6 years agoAlways rebuild targets when using cargo-fix
Pascal Hertleif [Fri, 20 Jul 2018 10:15:50 +0000 (12:15 +0200)]
Always rebuild targets when using cargo-fix

6 years agoFix typo in `cargo fix --help`
Pascal Hertleif [Fri, 20 Jul 2018 10:09:27 +0000 (12:09 +0200)]
Fix typo in `cargo fix --help`

6 years agoMerge branch 'master' into fix-allow-staged
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
  ...

6 years agoEnable Drop for Execs
Dale Wijnand [Tue, 28 Aug 2018 22:12:13 +0000 (00:12 +0200)]
Enable Drop for Execs

6 years agoAllow .build_command() to set Execs to ran
Dale Wijnand [Tue, 28 Aug 2018 22:44:48 +0000 (00:44 +0200)]
Allow .build_command() to set Execs to ran

6 years agoMake last two .exec_with_output() usages set Execs to ran
Dale Wijnand [Tue, 28 Aug 2018 22:12:06 +0000 (00:12 +0200)]
Make last two .exec_with_output() usages set Execs to ran

6 years agoReplace .exec_with_output() usage with .with_stdout_contains
Dale Wijnand [Tue, 28 Aug 2018 22:11:30 +0000 (00:11 +0200)]
Replace .exec_with_output() usage with .with_stdout_contains

6 years agoReplace .exec_with_output() usage with .run()
Dale Wijnand [Tue, 28 Aug 2018 22:10:01 +0000 (00:10 +0200)]
Replace .exec_with_output() usage with .run()

6 years agoRemove a dead comment in testsuite/support/mod.rs
Dale Wijnand [Tue, 28 Aug 2018 21:50:03 +0000 (23:50 +0200)]
Remove a dead comment in testsuite/support/mod.rs

6 years agoUpdate reference to .stream() in ARCHITECTURE.md
Dale Wijnand [Tue, 28 Aug 2018 21:30:56 +0000 (23:30 +0200)]
Update reference to .stream() in ARCHITECTURE.md

6 years agoDrop reference to the [/] macro in ARCHITECTURE.md
Dale Wijnand [Tue, 28 Aug 2018 21:30:46 +0000 (23:30 +0200)]
Drop reference to the [/] macro in ARCHITECTURE.md

6 years agoReplace Output hamcrest matchers for Execs
Dale Wijnand [Tue, 28 Aug 2018 21:24:10 +0000 (23:24 +0200)]
Replace Output hamcrest matchers for Execs

6 years agoReplace some bare ProcessBuilder usage with Execs
Dale Wijnand [Tue, 28 Aug 2018 21:05:39 +0000 (23:05 +0200)]
Replace some bare ProcessBuilder usage with Execs

6 years agoMake Project::process return Execs
Dale Wijnand [Tue, 28 Aug 2018 20:38:26 +0000 (22:38 +0200)]
Make Project::process return Execs

6 years agoAuto merge of #5929 - dwijnand:remove-hamcrest, r=alexcrichton
bors [Tue, 28 Aug 2018 17:18:06 +0000 (17:18 +0000)]
Auto merge of #5929 - dwijnand:remove-hamcrest, r=alexcrichton

Replace lots of hamcrest's assert_that with a builder style

Refs #5742

I've been thinking of possible solutions to close out #5742, so I'm submitting this for early feedback.

@alexcrichton what do you think? If you like the look of this I'll apply it across the suite.

r? @alexcrichton

6 years agoMigrate from tests fom assert_that/execs to .run()
Dale Wijnand [Tue, 28 Aug 2018 09:20:03 +0000 (10:20 +0100)]
Migrate from tests fom assert_that/execs to .run()

6 years agoWrap ProcessBuilder in Execs & make .cargo return that
Dale Wijnand [Tue, 28 Aug 2018 08:24:37 +0000 (09:24 +0100)]
Wrap ProcessBuilder in Execs & make .cargo return that

6 years agoMake old Execs methods take not consume self
Dale Wijnand [Fri, 24 Aug 2018 15:56:08 +0000 (16:56 +0100)]
Make old Execs methods take not consume self

6 years agoExtract Execs::match_process
Dale Wijnand [Tue, 28 Aug 2018 08:07:33 +0000 (09:07 +0100)]
Extract Execs::match_process

6 years agoAdd #[must_use] to Execs
Dale Wijnand [Thu, 23 Aug 2018 15:33:37 +0000 (16:33 +0100)]
Add #[must_use] to Execs

6 years agoInline Execs::_with_stderr
Dale Wijnand [Fri, 24 Aug 2018 15:55:34 +0000 (16:55 +0100)]
Inline Execs::_with_stderr

6 years agoRemove an unrun "cargo build" ProcessBuilder
Dale Wijnand [Fri, 24 Aug 2018 09:37:05 +0000 (10:37 +0100)]
Remove an unrun "cargo build" ProcessBuilder

6 years agoAuto merge of #5939 - ehuss:test-package-docs, r=alexcrichton
bors [Sat, 25 Aug 2018 04:23:02 +0000 (04:23 +0000)]
Auto merge of #5939 - ehuss:test-package-docs, r=alexcrichton

Add documentation for creating test dependencies.

Using `Package` has always been a little unclear to me. I think I understand
it now. Maybe this will help.

6 years agoAdd documentation for creating test dependencies.
Eric Huss [Fri, 24 Aug 2018 22:09:38 +0000 (15:09 -0700)]
Add documentation for creating test dependencies.

Using `Package` has always been a little unclear to me. I think I understand
it now. Maybe this will help.

6 years agoAuto merge of #5935 - alexcrichton:vendor-paths, r=ehuss
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.

Closes #5923

6 years agoOnly use non-absolute paths for `path` dependencies
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.

Closes #5923

6 years agoAuto merge of #5628 - ehuss:metabuild, r=alexcrichton
bors [Fri, 24 Aug 2018 17:14:10 +0000 (17:14 +0000)]
Auto merge of #5628 - ehuss:metabuild, r=alexcrichton

Metabuild (RFC 2196)

6 years agoAuto merge of #5937 - ehuss:fix-codemap, r=alexcrichton
bors [Fri, 24 Aug 2018 07:13:41 +0000 (07:13 +0000)]
Auto merge of #5937 - ehuss:fix-codemap, r=alexcrichton

Fix test failure on nightly due to `codemap::Span` change.

Update due to rust-lang/rust#52953.

6 years agoFix test failure on nightly due to `codemap::Span` change.
Eric Huss [Fri, 24 Aug 2018 06:56:50 +0000 (23:56 -0700)]
Fix test failure on nightly due to `codemap::Span` change.

Update due to rust-lang/rust#52953.

6 years agoNew metabuild strategy using custom src_path enum.
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.

6 years agoRemove unnecessary change.
Eric Huss [Tue, 12 Jun 2018 22:24:11 +0000 (15:24 -0700)]
Remove unnecessary change.

6 years agoAddress review comments.
Eric Huss [Tue, 12 Jun 2018 21:23:43 +0000 (14:23 -0700)]
Address review comments.

- Add newline at end of file.
- Remove unnecessary rustfmt changes.
- Move file writing code to `write_if_changed`.

6 years agoMetabuild (RFC 2196)
Eric Huss [Mon, 11 Jun 2018 17:44:55 +0000 (10:44 -0700)]
Metabuild (RFC 2196)

6 years agoAuto merge of #5927 - dwijnand:uninstall-cwd, r=ehuss
bors [Thu, 23 Aug 2018 16:25:14 +0000 (16:25 +0000)]
Auto merge of #5927 - dwijnand:uninstall-cwd, r=ehuss

Make "cargo uninstall" uninstall the cwd bins

Fixes #5916

Tested with a local build of cargo, using coreutils:

    17:33:57 $ dcargo uninstall
    Removing /Users/dnw/.cargo/bin/uutils

6 years agoHandle Window's missing file error message
Dale Wijnand [Thu, 23 Aug 2018 13:00:26 +0000 (14:00 +0100)]
Handle Window's missing file error message

6 years agoMake "cargo uninstall" uninstall the cwd bins
Dale Wijnand [Wed, 22 Aug 2018 16:36:53 +0000 (17:36 +0100)]
Make "cargo uninstall" uninstall the cwd bins

6 years agoAuto merge of #5919 - RalfJung:mtime, r=alexcrichton
bors [Wed, 22 Aug 2018 20:39:04 +0000 (20:39 +0000)]
Auto merge of #5919 - RalfJung:mtime, r=alexcrichton

fix cargo not doing anything when the input and output mtimes are equal

That's a problem as the input may have changed in that same second but after the output got generated!

Fixes https://github.com/rust-lang/cargo/issues/5918

6 years agoupdate comment based on further research
Ralf Jung [Wed, 22 Aug 2018 18:55:14 +0000 (20:55 +0200)]
update comment based on further research

6 years agoAuto merge of #5926 - alexcrichton:more-errors, r=dwijnand
bors [Wed, 22 Aug 2018 18:02:19 +0000 (18:02 +0000)]
Auto merge of #5926 - alexcrichton:more-errors, r=dwijnand

List URL in HTTP download failures

Hopefully will help diagnose issues like #5924

6 years agoAuto merge of #5925 - dwijnand:improve-install-cwd-deprecation, r=alexcrichton
bors [Wed, 22 Aug 2018 16:26:40 +0000 (16:26 +0000)]
Auto merge of #5925 - dwijnand:improve-install-cwd-deprecation, r=alexcrichton

Improve the `cargo install` deprecation messaging

Fixes #5917

r? @matklad
/cc @brson also as I'd love to hear your feedback too.