cargo.git
7 years agoAuto merge of #5590 - esteve:libname-doc, r=matklad
bors [Tue, 29 May 2018 11:19:13 +0000 (11:19 +0000)]
Auto merge of #5590 - esteve:libname-doc, r=matklad

Handle the case where the name of a library is different from the package's

Resolves #5568

7 years agoDisable cargo doc --open tests on Windows and macOS.
Esteve Fernandez [Tue, 29 May 2018 10:34:27 +0000 (12:34 +0200)]
Disable cargo doc --open tests on Windows and macOS.

7 years agoAdded two more tests: one where a package contains a library and a binary and another...
Esteve Fernandez [Tue, 29 May 2018 10:23:50 +0000 (12:23 +0200)]
Added two more tests: one where a package contains a library and a binary and another where it only contains a binary.

7 years agoAuto merge of #5591 - simonasker:correct-command-paths, r=matklad
bors [Tue, 29 May 2018 10:20:08 +0000 (10:20 +0000)]
Auto merge of #5591 - simonasker:correct-command-paths, r=matklad

Correct command directory paths

r? @matklad

7 years agoUse [/] instead of hardcoded / so that it's portable on Windows.
Esteve Fernandez [Tue, 29 May 2018 10:05:12 +0000 (12:05 +0200)]
Use [/] instead of hardcoded / so that it's portable on Windows.

7 years agoDon't pass --open as an argument.
Esteve Fernandez [Tue, 29 May 2018 10:04:38 +0000 (12:04 +0200)]
Don't pass --open as an argument.

7 years agoCorrect command directory paths
Simon Andersson [Tue, 29 May 2018 10:04:59 +0000 (12:04 +0200)]
Correct command directory paths

7 years agoAdded test where the name of the library is different from the package's.
Esteve Fernandez [Tue, 29 May 2018 09:55:29 +0000 (11:55 +0200)]
Added test where the name of the library is different from the package's.

7 years agoAuto merge of #5584 - boxdot:master, r=matklad
bors [Tue, 29 May 2018 09:41:12 +0000 (09:41 +0000)]
Auto merge of #5584 - boxdot:master, r=matklad

Verify that src dir wasn't modified by build.rs when publishing

Fixes issue #5073.

Implemented during RustFest Paris `impl days`.

7 years agoFix test to work on Windows
Gabriel Féron [Tue, 29 May 2018 09:38:27 +0000 (11:38 +0200)]
Fix test to work on Windows

7 years agoAdd more instructions to error message
Gabriel Féron [Tue, 29 May 2018 09:05:34 +0000 (11:05 +0200)]
Add more instructions to error message

7 years agoA package will always contain at least one library or a binary.
Esteve Fernandez [Tue, 29 May 2018 09:03:16 +0000 (11:03 +0200)]
A package will always contain at least one library or a binary.

7 years agoAuto merge of #5587 - matklad:rustdoc-target, r=alexcrichton
bors [Mon, 28 May 2018 16:49:15 +0000 (16:49 +0000)]
Auto merge of #5587 - matklad:rustdoc-target, r=alexcrichton

Support `--target` argument in `cargo rustdoc`

We don't support `--target` in `cargo rustdoc`. Seems like an omission to me? We support it in `cargo rustc`. Discovered in https://github.com/rust-lang/cargo/pull/5543#issuecomment-392525154.

7 years agoSupport `--target` argument in `cargo rustdoc`
Aleksey Kladov [Mon, 28 May 2018 14:27:52 +0000 (17:27 +0300)]
Support `--target` argument in `cargo rustdoc`

7 years agoUse auto split argument in test
Gabriel Féron [Mon, 28 May 2018 12:43:17 +0000 (14:43 +0200)]
Use auto split argument in test

7 years agoProvide more context when src files changed while packaging
Gabriel Féron [Mon, 28 May 2018 12:34:47 +0000 (14:34 +0200)]
Provide more context when src files changed while packaging

Co-authored-by: boxdot <d@zerovolt.org>
7 years agoDocument that build scripts should not modify files outside OUT_DIR.
boxdot [Mon, 28 May 2018 12:11:52 +0000 (14:11 +0200)]
Document that build scripts should not modify files outside OUT_DIR.

Co-authored-by: Gabriel Feron <feron.gabriel@gmail.com>
7 years agoAdd cargo --no-verify test when checking that src dir was not modified while publishing
Gabriel Féron [Mon, 28 May 2018 11:59:35 +0000 (13:59 +0200)]
Add cargo --no-verify test when checking that src dir was not modified while publishing

7 years agoAdd test to check that publish fails when src directory was changed.
Gabriel Féron [Mon, 28 May 2018 10:05:46 +0000 (12:05 +0200)]
Add test to check that publish fails when src directory was changed.

Co-authored-by: boxdot <d@zerovolt.org>
7 years agoVerify that src dir was not modified by build.rs during publish.
boxdot [Mon, 28 May 2018 10:06:03 +0000 (12:06 +0200)]
Verify that src dir was not modified by build.rs during publish.

Co-authored-by: Gabriel Feron <feron.gabriel@gmail.com>
7 years agoAuto merge of #5574 - kornelski:names, r=matklad
bors [Mon, 28 May 2018 09:56:34 +0000 (09:56 +0000)]
Auto merge of #5574 - kornelski:names, r=matklad

A more complete example of authors

Documentation doesn't show how to specify author names or how to specify multiple authors.

7 years agoAuto merge of #5570 - alexcrichton:fix-deadlock, r=matklad
bors [Mon, 28 May 2018 09:34:35 +0000 (09:34 +0000)]
Auto merge of #5570 - alexcrichton:fix-deadlock, r=matklad

Fix an issue of deadlock in Cargo

Currently Cargo can deadlock itself via file locks in somewhat obscure
scenarios. One way to trigger this scenario is by causing the index to fail
being created, for example through an invalid `init.templatedir` configuration.

This commit takes the strategy of solving two bugs:

* First, the deadlock is fixed. This is done by manually ensuring that the
  current deadlock doesn't happen by scheduling cached work to happen outside
  the scope of a lock.
* Second, the initialization of the registry's index is fixed. We turn off the
  usage of external templates as we don't want to use them for this internally
  managed repository anyway.

Closes #5551

7 years agoAuto merge of #5581 - kngwyu:for-racer, r=alexcrichton
bors [Mon, 28 May 2018 02:45:30 +0000 (02:45 +0000)]
Auto merge of #5581 - kngwyu:for-racer, r=alexcrichton

Add missing reexport for #5572

Sorry I forgot to change `mod.rs` in #5572

7 years agoAuto merge of #5580 - ehuss:doc-build-plan, r=alexcrichton
bors [Mon, 28 May 2018 02:11:09 +0000 (02:11 +0000)]
Auto merge of #5580 - ehuss:doc-build-plan, r=alexcrichton

Document unstable --build-plan

7 years agoAdd missing reexport for #5572
Yuji Kanagawa [Mon, 28 May 2018 02:06:25 +0000 (11:06 +0900)]
Add missing reexport for #5572

7 years agoDocument unstable --build-plan
Eric Huss [Sun, 27 May 2018 22:59:29 +0000 (15:59 -0700)]
Document unstable --build-plan

7 years agoAuto merge of #5578 - cardoe:extend-ci, r=alexcrichton
bors [Sun, 27 May 2018 22:52:20 +0000 (22:52 +0000)]
Auto merge of #5578 - cardoe:extend-ci, r=alexcrichton

add GitLab CI to the CI docs

Cargo supports GitLab CI natively for CI badges so include a basic
example of how to use it in the CI section of the documentation.

7 years agoadd GitLab CI to the CI docs
Doug Goldstein [Sun, 27 May 2018 19:28:54 +0000 (14:28 -0500)]
add GitLab CI to the CI docs

Cargo supports GitLab CI natively for CI badges so include a basic
example of how to use it in the CI section of the documentation.

7 years agoAuto merge of #5572 - kngwyu:for-racer, r=alexcrichton
bors [Sun, 27 May 2018 19:55:37 +0000 (19:55 +0000)]
Auto merge of #5572 - kngwyu:for-racer, r=alexcrichton

Make add_overrides and get_resolved_packages pub

For https://github.com/racer-rust/racer/pull/855.
Now  we're planning to use cargo to resolve dependencies, but for RLS we can't write `Cargo.lock`.
So we have to call `resolve_with_previous` directly, and want to use these functions.

7 years agoAuto merge of #5576 - matklad:revert-deps, r=alexcrichton
bors [Sun, 27 May 2018 16:04:30 +0000 (16:04 +0000)]
Auto merge of #5576 - matklad:revert-deps, r=alexcrichton

Revert "Auto merge of #5461 - matklad:meta-rename, r=alexcrichton"

This reverts commit d0d3cb5ac963eb8c3f83d079b6a547992cac2cc4, reversing
changes made to 757112c39f8a5a4f6ffa0b7e29d23a56f03fb931.

It is unclear if the design is right, see
https://github.com/rust-lang/cargo/pull/5558#issuecomment-391791164

7 years agoRevert "Auto merge of #5461 - matklad:meta-rename, r=alexcrichton"
Aleksey Kladov [Sun, 27 May 2018 08:54:25 +0000 (11:54 +0300)]
Revert "Auto merge of #5461 - matklad:meta-rename, r=alexcrichton"

This reverts commit d0d3cb5ac963eb8c3f83d079b6a547992cac2cc4, reversing
changes made to 757112c39f8a5a4f6ffa0b7e29d23a56f03fb931.

It is unclear if the design is right, see
https://github.com/rust-lang/cargo/pull/5558#issuecomment-391791164

7 years agoA more complete example of authors
Kornel [Sat, 26 May 2018 15:41:47 +0000 (16:41 +0100)]
A more complete example of authors

7 years agoMake add_overrides and get_resolved_packages pub
kngwyu [Sat, 26 May 2018 12:31:59 +0000 (21:31 +0900)]
Make add_overrides and get_resolved_packages pub

7 years agoFix an issue of deadlock in Cargo
Alex Crichton [Sat, 26 May 2018 02:12:53 +0000 (19:12 -0700)]
Fix an issue of deadlock in Cargo

Currently Cargo can deadlock itself via file locks in somewhat obscure
scenarios. One way to trigger this scenario is by causing the index to fail
being created, for example through an invalid `init.templatedir` configuration.

This commit takes the strategy of solving two bugs:

* First, the deadlock is fixed. This is done by manually ensuring that the
  current deadlock doesn't happen by scheduling cached work to happen outside
  the scope of a lock.
* Second, the initialization of the registry's index is fixed. We turn off the
  usage of external templates as we don't want to use them for this internally
  managed repository anyway.

Closes #5551

7 years agoAuto merge of #5564 - mati865:metadata_fix, r=alexcrichton
bors [Fri, 25 May 2018 14:10:01 +0000 (14:10 +0000)]
Auto merge of #5564 - mati865:metadata_fix, r=alexcrichton

Always replace metadata when replacing package

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

I'm having problem writing test for it.
The test should install binary, make commit and reinstall binary, this part is done.
To know if it was done properly we need to compare git revision of HEAD and installed binary and that's where the problems begin...

7 years agoAlways replace metadata when replacing package
Mateusz Mikuła [Thu, 24 May 2018 09:39:56 +0000 (11:39 +0200)]
Always replace metadata when replacing package

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

7 years agoAuto merge of #5556 - alexcrichton:fix, r=matklad
bors [Thu, 24 May 2018 18:30:29 +0000 (18:30 +0000)]
Auto merge of #5556 - alexcrichton:fix, r=matklad

Copy `--all-features` request to all workspace members

This fixes an accidental regression introduced in #5012 where the
`--all-features` CLI flag was only propagated to the "main crate" as opposed to
all workspace packages. This behavior has [already been deemed][pr] as
"basically not what you want", but for now it's best to avoid the regression.

Closes #5518

[pr]: https://github.com/rust-lang/cargo/pull/5353

7 years agoAuto merge of #5534 - matklad:feature-workflow, r=alexcrichton
bors [Thu, 24 May 2018 07:19:13 +0000 (07:19 +0000)]
Auto merge of #5534 - matklad:feature-workflow, r=alexcrichton

Feature workflow

Docs based on todays discussion.

@dwijnand you seem to actually read the docs, so I am curious how do you feel about it? :)

We have a **lot** of feature-requests for Cargo, but we care about long-term maintainability and backwards comparability, so we stick to the conservative side of things. This leads to a situation when there are a lot of `C-feature-request` tagged issues on the repo, but only a fraction of those are "yeah, we definitely want that in Cargo", while most are "this **could** be useful, but we are not really sure if it belongs to Cargo", and we'd love to signal which issues are "it would be awesome if you implement this" and which are "you could try to implement this, but there's no guarantee that the PR will be merged".

7 years agoTweak the feature lifecycle notes
Dale Wijnand [Mon, 14 May 2018 22:03:59 +0000 (00:03 +0200)]
Tweak the feature lifecycle notes

7 years agoSome hints about feature lifecycle
Aleksey Kladov [Mon, 14 May 2018 21:23:05 +0000 (00:23 +0300)]
Some hints about feature lifecycle

7 years agoClarify the meaning of feature-related labels
Aleksey Kladov [Mon, 14 May 2018 21:11:54 +0000 (00:11 +0300)]
Clarify the meaning of feature-related labels

7 years agoAuto merge of #5563 - ehuss:cargotest-doc, r=alexcrichton
bors [Thu, 24 May 2018 05:55:01 +0000 (05:55 +0000)]
Auto merge of #5563 - ehuss:cargotest-doc, r=alexcrichton

cargotest: Add some more docs

Hopefully this isn't too wordy.  This isn't intended for rustdoc output, but generally to be read in-editor.

7 years agocargotest: Add some more docs
Eric Huss [Thu, 24 May 2018 04:09:27 +0000 (21:09 -0700)]
cargotest: Add some more docs

7 years agoAuto merge of #5559 - alexcrichton:update-core-foundation, r=alexcrichton
bors [Wed, 23 May 2018 02:47:32 +0000 (02:47 +0000)]
Auto merge of #5559 - alexcrichton:update-core-foundation, r=alexcrichton

Update version of core-foundation crate

7 years agoUpdate version of core-foundation crate
Alex Crichton [Wed, 23 May 2018 02:46:30 +0000 (19:46 -0700)]
Update version of core-foundation crate

7 years agoAuto merge of #5557 - ehuss:linux-cbfct, r=alexcrichton
bors [Tue, 22 May 2018 14:08:52 +0000 (14:08 +0000)]
Auto merge of #5557 - ehuss:linux-cbfct, r=alexcrichton

Fix test failure in changing_bin_features_caches_targets for Linux.

Fixes rust-lang/rust#50962.

My theory is that while copying the binary, another thread forked with the fd
open.  The copy finishes and attempts to exec before the other child execs (and
closes the writeable fd).

I was able to easily repro this on linux.  I ran some stress tests of this fix
locally on linux and on appveyor, and was unable to trigger it again.

7 years agoFix test failure in changing_bin_features_caches_targets for Linux.
Eric Huss [Tue, 22 May 2018 11:45:46 +0000 (04:45 -0700)]
Fix test failure in changing_bin_features_caches_targets for Linux.

Fixes rust-lang/rust#50962.

My theory is that while copying the binary, another thread forked with the fd
open.  The copy finishes and attempts to exec before the other child execs (and
closes the writeable fd).

I was able to easily repro this on linux.  I ran some stress tests of this fix
locally on linux and on appveyor, and was unable to trigger it again.

7 years agoCopy `--all-features` request to all workspace members
Alex Crichton [Mon, 21 May 2018 19:57:25 +0000 (12:57 -0700)]
Copy `--all-features` request to all workspace members

This fixes an accidental regression introduced in #5012 where the
`--all-features` CLI flag was only propagated to the "main crate" as opposed to
all workspace packages. This behavior has [already been deemed][pr] as
"basically not what you want", but for now it's best to avoid the regression.

Closes #5518

[pr]: https://github.com/rust-lang/cargo/pull/5353

7 years agoAuto merge of #5541 - ehuss:fix-rustdoc-edition, r=alexcrichton
bors [Tue, 15 May 2018 17:53:20 +0000 (17:53 +0000)]
Auto merge of #5541 - ehuss:fix-rustdoc-edition, r=alexcrichton

Fix passing --edition to rustdoc during doctests.

Fixes #5538

7 years agoFix passing --edition to rustdoc during doctests.
Eric Huss [Tue, 15 May 2018 16:29:34 +0000 (09:29 -0700)]
Fix passing --edition to rustdoc during doctests.

Fixes #5538

7 years agoAuto merge of #5540 - ehuss:fix-build-plan-tests, r=alexcrichton
bors [Tue, 15 May 2018 14:55:06 +0000 (14:55 +0000)]
Auto merge of #5540 - ehuss:fix-build-plan-tests, r=alexcrichton

Fix tests when CARGO_TARGET_DIR is set.

Fixes #5536

7 years agoFix tests when CARGO_TARGET_DIR is set.
Eric Huss [Tue, 15 May 2018 14:52:24 +0000 (07:52 -0700)]
Fix tests when CARGO_TARGET_DIR is set.

Fixes #5536

7 years agoAuto merge of #5537 - eddyb:no-trans, r=matklad
bors [Tue, 15 May 2018 08:20:05 +0000 (08:20 +0000)]
Auto merge of #5537 - eddyb:no-trans, r=matklad

Remove -Zno-trans test.

Needed for https://github.com/rust-lang/rust/pull/50615 (where the flag is now `-Zno-codegen`) - which revealed that the test shouldn't even exist anymore, and was accidentally added back (https://github.com/rust-lang/rust/pull/50615#issuecomment-388968326).

7 years agoRemove -Zno-trans test.
Eduard-Mihai Burtescu [Tue, 15 May 2018 07:14:03 +0000 (10:14 +0300)]
Remove -Zno-trans test.

7 years agoAuto merge of #5535 - ehuss:ignore-test-tab, r=alexcrichton
bors [Tue, 15 May 2018 06:01:29 +0000 (06:01 +0000)]
Auto merge of #5535 - ehuss:ignore-test-tab, r=alexcrichton

Ignore <tab> in libtest output.

rust-lang/rust#50387 is changing the output from libtest which affected a few Cargo tests.

7 years agoIgnore <tab> in libtest output.
Eric Huss [Tue, 15 May 2018 05:02:34 +0000 (22:02 -0700)]
Ignore <tab> in libtest output.

rust-lang/rust#50387 is changing the output from libtest which affected a few Cargo tests.

7 years agoAuto merge of #5533 - dwijnand:patch-1, r=matklad
bors [Mon, 14 May 2018 20:53:12 +0000 (20:53 +0000)]
Auto merge of #5533 - dwijnand:patch-1, r=matklad

Detail how to run locally-built nightly cargo

Documenting from https://gitter.im/rust-lang/cargo?at=5af6d407862c5e33e92bf2ca.

Apologies if this is documenting too much what is effectively rustup behaviour.

Let me know if it's time to replace this with links to rustup docs instead.

7 years agoDetail how to run locally-built nightly cargo
Dale Wijnand [Mon, 14 May 2018 20:34:41 +0000 (22:34 +0200)]
Detail how to run locally-built nightly cargo

Documenting from https://gitter.im/rust-lang/cargo?at=5af6d407862c5e33e92bf2ca.

7 years agoAuto merge of #5527 - tcr:patch-1, r=alexcrichton
bors [Sun, 13 May 2018 15:25:21 +0000 (15:25 +0000)]
Auto merge of #5527 - tcr:patch-1, r=alexcrichton

Point Source Replacement to the Overriding Dependencies section

This would've saved me a minute. This mirrors a similarly helpful caveat in [the [patch] section](https://doc.rust-lang.org/cargo/reference/manifest.html#the-patch-section).

7 years agoPoint Source Replacement to the Overriding Dependencies section
Tim Ryan [Sun, 13 May 2018 05:51:54 +0000 (01:51 -0400)]
Point Source Replacement to the Overriding Dependencies section

This would've saved me a minute. This mirrors a similarly helpful caveat in [the [patch] section](https://doc.rust-lang.org/cargo/reference/manifest.html#the-patch-section).

7 years agoAuto merge of #5522 - DarkDrek:user_agent_option, r=alexcrichton
bors [Fri, 11 May 2018 23:38:48 +0000 (23:38 +0000)]
Auto merge of #5522 - DarkDrek:user_agent_option, r=alexcrichton

Add option to set user-agent

Fixes #5494

7 years agoAdd option to set user-agent
DarkDrek [Fri, 11 May 2018 22:41:15 +0000 (00:41 +0200)]
Add option to set user-agent

Fixes #5494

7 years agoAuto merge of #5520 - alexcrichton:check-with-full-proc-macro, r=matklad
bors [Fri, 11 May 2018 22:55:05 +0000 (22:55 +0000)]
Auto merge of #5520 - alexcrichton:check-with-full-proc-macro, r=matklad

Fix mode generated in `maybe_lib`

The new `mode` for the library dependency is dependent on the library target
rather than the target which is the reason for the dependency on the library!

Closes rust-lang/rust#50640

7 years agoAuto merge of #5519 - matthiaskrgr:typos, r=alexcrichton
bors [Fri, 11 May 2018 22:31:25 +0000 (22:31 +0000)]
Auto merge of #5519 - matthiaskrgr:typos, r=alexcrichton

NFC: fix a couple of typos, found by codespell.

7 years agoFix mode generated in `maybe_lib`
Alex Crichton [Fri, 11 May 2018 15:04:10 +0000 (08:04 -0700)]
Fix mode generated in `maybe_lib`

The new `mode` for the library dependency is dependent on the library target
rather than the target which is the reason for the dependency on the library!

Closes rust-lang/rust#50640

7 years agoNFC: fix a couple of typos, found by codespell.
Matthias Krüger [Fri, 11 May 2018 14:54:23 +0000 (16:54 +0200)]
NFC: fix a couple of typos, found by codespell.

7 years agoAuto merge of #5513 - ehuss:test-binary-panic, r=alexcrichton
bors [Thu, 10 May 2018 22:10:48 +0000 (22:10 +0000)]
Auto merge of #5513 - ehuss:test-binary-panic, r=alexcrichton

Fix `panic` for binaries built during tests.

Fixes #5435

Also re-enable tests now that #5460 has landed.

7 years agoFix `panic` for binaries built during tests.
Eric Huss [Thu, 10 May 2018 21:25:17 +0000 (14:25 -0700)]
Fix `panic` for binaries built during tests.

Fixes #5435

Also re-enable tests now that #5460 has landed.

7 years agoAuto merge of #5512 - Eh2406:simplify_FeatureValue, r=alexcrichton
bors [Thu, 10 May 2018 21:13:05 +0000 (21:13 +0000)]
Auto merge of #5512 - Eh2406:simplify_FeatureValue, r=alexcrichton

simplify build_requirements

use InternedString's ability to be a &'static str to appease the borrow checker

This "slight workaround" was added in #5270. So @djc does this still look correct and an improvement?

7 years agosimplify build_requirements
Eh2406 [Thu, 10 May 2018 20:55:09 +0000 (16:55 -0400)]
simplify build_requirements

use InternedString's ability to be a &'static str to appease the borrow checker

This "slight workaround" was added in #5270. So @djc dose this still look correct?

7 years agoAuto merge of #5301 - mshal:build-plan, r=matklad
bors [Thu, 10 May 2018 19:55:02 +0000 (19:55 +0000)]
Auto merge of #5301 - mshal:build-plan, r=matklad

Add --build-plan for 'cargo build'

With 'cargo build --build-plan', cargo does not actually run any
commands, but instead prints out what it would have done in the form of
a JSON data structure.

Fixes #3815

7 years agoFixup some minor review comments
Alex Crichton [Thu, 10 May 2018 19:07:02 +0000 (12:07 -0700)]
Fixup some minor review comments

7 years agoAuto merge of #5460 - ehuss:conservative-link, r=alexcrichton
bors [Thu, 10 May 2018 19:01:06 +0000 (19:01 +0000)]
Auto merge of #5460 - ehuss:conservative-link, r=alexcrichton

Be more conservative about which files are linked to the output dir.

This changes it so that only top-level targets requested on the command-line will be included in the output directory.  Dependencies are no longer included.

Fixes #5444.

7 years agoAuto merge of #5509 - Eh2406:use_the_new, r=alexcrichton
bors [Thu, 10 May 2018 18:18:09 +0000 (18:18 +0000)]
Auto merge of #5509 - Eh2406:use_the_new, r=alexcrichton

Use the new stable

The new rust release has stabilized `Box::leak` and `impl Iterator` lets use them!

7 years agouse Box::leak and clean up our string leak
Eh2406 [Wed, 9 May 2018 17:24:11 +0000 (13:24 -0400)]
use Box::leak and clean up our string leak

7 years agouse impl Trait
Eh2406 [Wed, 9 May 2018 17:20:25 +0000 (13:20 -0400)]
use impl Trait

7 years agoAddress review comment, no need to check export_dir.
Eric Huss [Thu, 10 May 2018 16:34:46 +0000 (09:34 -0700)]
Address review comment, no need to check export_dir.

7 years agoUpdate due to #5503.
Eric Huss [Thu, 10 May 2018 16:33:05 +0000 (09:33 -0700)]
Update due to #5503.

7 years agoFix broken test.
Eric Huss [Thu, 3 May 2018 00:15:11 +0000 (17:15 -0700)]
Fix broken test.

7 years agoBe more conservative about which files are linked to the output dir.
Eric Huss [Wed, 2 May 2018 18:18:37 +0000 (11:18 -0700)]
Be more conservative about which files are linked to the output dir.

This changes it so that only top-level targets requested on the command-line will be included in the output directory.  Dependencies are no longer included.

Fixes #5444.

7 years agoAuto merge of #5503 - ehuss:fix-rustc-test, r=matklad
bors [Thu, 10 May 2018 12:44:16 +0000 (12:44 +0000)]
Auto merge of #5503 - ehuss:fix-rustc-test, r=matklad

Fix `cargo rustc` for test with implicit binary.

Fixes #5502

7 years agoAuto merge of #5507 - ordovicia:no-secs-frac, r=matklad
bors [Thu, 10 May 2018 12:20:00 +0000 (12:20 +0000)]
Auto merge of #5507 - ordovicia:no-secs-frac, r=matklad

Does not print seconds fraction with minutes

As discussed in https://github.com/rust-lang/cargo/pull/5456#issuecomment-387731047,
seconds fraction seems unnecessary when the elapsed time is reported in minutes.

7 years agoRemove unnecessary computation in printing elapsed time
Hidehito Yabuuchi [Thu, 10 May 2018 09:21:27 +0000 (18:21 +0900)]
Remove unnecessary computation in printing elapsed time

7 years agoDoes not print seconds fraction with minutes
Hidehito Yabuuchi [Thu, 10 May 2018 02:52:44 +0000 (11:52 +0900)]
Does not print seconds fraction with minutes

7 years agoFix `cargo rustc` for test with implicit binary.
Eric Huss [Wed, 9 May 2018 00:23:28 +0000 (17:23 -0700)]
Fix `cargo rustc` for test with implicit binary.

Fixes #5502

7 years agoAuto merge of #5498 - alexcrichton:bump, r=alexcrichton
bors [Tue, 8 May 2018 03:00:12 +0000 (03:00 +0000)]
Auto merge of #5498 - alexcrichton:bump, r=alexcrichton

Bump to 0.29.0

7 years agoBump to 0.29.0
Alex Crichton [Tue, 8 May 2018 02:40:58 +0000 (19:40 -0700)]
Bump to 0.29.0

7 years agoAuto merge of #5497 - dwijnand:patch-1, r=alexcrichton
bors [Tue, 8 May 2018 02:37:04 +0000 (02:37 +0000)]
Auto merge of #5497 - dwijnand:patch-1, r=alexcrichton

Mention +nightly in ARCHITECTURE.md

See the conversation on Gitter: https://gitter.im/rust-lang/cargo?at=5aee83305cf0b830045d0602.

7 years agotypo
Dale Wijnand [Mon, 7 May 2018 23:21:28 +0000 (16:21 -0700)]
typo

7 years agoMention +nightly in ARCHITECTURE.md
Dale Wijnand [Mon, 7 May 2018 23:20:45 +0000 (16:20 -0700)]
Mention +nightly in ARCHITECTURE.md

7 years agoAdd --build-plan for 'cargo build'
Mike Shal [Thu, 3 Aug 2017 14:02:00 +0000 (10:02 -0400)]
Add --build-plan for 'cargo build'

With 'cargo build --build-plan', cargo does not actually run any
commands, but instead prints out what it would have done in the form of
a JSON data structure.

Fixes #3815

7 years agoAuto merge of #5493 - ehuss:fix-changing_bin_features_caches_targets, r=matklad
bors [Mon, 7 May 2018 06:55:24 +0000 (06:55 +0000)]
Auto merge of #5493 - ehuss:fix-changing_bin_features_caches_targets, r=matklad

Fix random Windows CI error for changing_bin_features_caches_targets

Fixes #5481.

7 years agoFix random Windows CI error for changing_bin_features_caches_targets
Eric Huss [Sun, 6 May 2018 15:25:44 +0000 (08:25 -0700)]
Fix random Windows CI error for changing_bin_features_caches_targets

Fixes #5481.

7 years agoAuto merge of #5491 - ehuss:profile-spec, r=alexcrichton
bors [Sun, 6 May 2018 03:56:43 +0000 (03:56 +0000)]
Auto merge of #5491 - ehuss:profile-spec, r=alexcrichton

Add package spec support to profile overrides.

Note: It errors out if multiple overrides match the same package.  This could potentially merge the overrides together with a hierarchy similar to CSS specificity.  However, that seems overkill for now.

7 years agoAdd package spec support to profile overrides.
Eric Huss [Sat, 5 May 2018 23:13:09 +0000 (16:13 -0700)]
Add package spec support to profile overrides.

Note: It errors out if multiple overrides match the same package.  This could potentially merge the overrides together with a hierarchy similar to CSS specificity.  However, that seems overkill for now.

7 years agoAuto merge of #5461 - matklad:meta-rename, r=alexcrichton
bors [Sat, 5 May 2018 21:32:18 +0000 (21:32 +0000)]
Auto merge of #5461 - matklad:meta-rename, r=alexcrichton

Support crate renames in `cargo metadata`

This adds information about (currently unstable) crate renames to metadata. Unfortunately, we already expose dependencies as a list of package ids (which are strings), so we can't easily add a `rename` field easily. For this reason, I've added a parallel `deps` key, which basically deprecates `dependencies` field.

So, the new format looks like this

```JavaScript
{
    "dependencies": [
        "bar 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
        "bar 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)"
    ],
    "deps": [
        {
            "extern_crate_name": "baz", // this one is actually renamed
            "id": "bar 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)"
        },
        {
            "extern_crate_name": "bar",
            "id": "bar 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)"
        }
    ],
    "features": [],
    "id": "foo 0.5.0 (path+file://[..])"
},
```

Questions:

* Is there a better name for `extern_crate_name`? This name is precise, but it's longer than I like, and might become opaque in meaning if we remove `extern crate` from the language :)
* Should we feature gate this (i.e, only produce `deps` if we have a feature in `Cargo.toml`)? I think the answer is yes, but that'll require threading `Features` to `Workspace`...

r? @alexcrichton

7 years agoExpand dependency info of cargo --metadata
Aleksey Kladov [Sat, 5 May 2018 15:07:18 +0000 (18:07 +0300)]
Expand dependency info of cargo --metadata

The old `dependencies` key in `resolve` is deprecated.

Instead, the new `deps` key introduced which lists dependencies kinds
(dev/build/normal) as well as `extern crate` name for the dep.

7 years agoExtract Package::lib_target method
Aleksey Kladov [Wed, 2 May 2018 17:26:52 +0000 (20:26 +0300)]
Extract Package::lib_target method

7 years agoAuto merge of #5490 - alexcrichton:fix-thrash, r=matklad
bors [Sat, 5 May 2018 20:41:12 +0000 (20:41 +0000)]
Auto merge of #5490 - alexcrichton:fix-thrash, r=matklad

Factor in `used_in_plugin` to target filenames

This prevents thrashing the cache of compiled libraries for when they're used in
a plugin or not.

7 years agoFactor in `used_in_plugin` to target filenames
Alex Crichton [Sat, 5 May 2018 19:59:50 +0000 (12:59 -0700)]
Factor in `used_in_plugin` to target filenames

This prevents thrashing the cache of compiled libraries for when they're used in
a plugin or not.