cargo.git
8 years agoImproving the error message for when a patched dependency does not resolve to anything
Sunjay Varma [Tue, 10 Oct 2017 19:51:59 +0000 (15:51 -0400)]
Improving the error message for when a patched dependency does not resolve to anything

8 years agoAuto merge of #4675 - mgeisler:align-cmdline-examples, r=alexcrichton
bors [Mon, 30 Oct 2017 15:51:43 +0000 (15:51 +0000)]
Auto merge of #4675 - mgeisler:align-cmdline-examples, r=alexcrichton

Align command line examples in "cargo help test"

The initial example used an indentation of four spaces, the other
examples used only two spaces. They now all use four spaces.

I checked all other Cargo commands and found no other such problems.

8 years agoAuto merge of #4677 - integer32llc:unpin-nightly, r=alexcrichton
bors [Mon, 30 Oct 2017 15:15:33 +0000 (15:15 +0000)]
Auto merge of #4677 - integer32llc:unpin-nightly, r=alexcrichton

Revert "Auto merge of #4659 - integer32llc:pin-nightly, r=alexcrichton"

This reverts commit 55442e8922ae7ad51545576a4f1326ab131a333a, reversing
changes made to 92a3a4efa27900e97a8ccb3c5c9b45f06f439454.

Testing to see if there is a fix on the latest nightly as rumored here: https://github.com/rust-lang/rust/issues/45500#issuecomment-340431032

8 years agoRevert "Auto merge of #4659 - integer32llc:pin-nightly, r=alexcrichton"
Carol (Nichols || Goulding) [Mon, 30 Oct 2017 15:10:29 +0000 (11:10 -0400)]
Revert "Auto merge of #4659 - integer32llc:pin-nightly, r=alexcrichton"

This reverts commit 55442e8922ae7ad51545576a4f1326ab131a333a, reversing
changes made to 92a3a4efa27900e97a8ccb3c5c9b45f06f439454.

8 years agoAuto merge of #4672 - kennytm:fix-4671, r=alexcrichton
bors [Sun, 29 Oct 2017 16:39:30 +0000 (16:39 +0000)]
Auto merge of #4672 - kennytm:fix-4671, r=alexcrichton

When uplifting directories, symlink them instead of hard-link them.

Fixes #4671.

8 years agoAlign command line examples in "cargo help test"
Martin Geisler [Sun, 29 Oct 2017 12:21:53 +0000 (13:21 +0100)]
Align command line examples in "cargo help test"

The initial example used an indentation of four spaces, the other
examples used only two spaces. They now all use four spaces.

I checked all other Cargo commands and found no other such problems.

8 years agoWhen uplifting directories, symlink them instead of hard-link them.
kennytm [Sat, 28 Oct 2017 19:47:29 +0000 (03:47 +0800)]
When uplifting directories, symlink them instead of hard-link them.

Fixes #4671.

8 years agoAuto merge of #4665 - lukaslueg:issue4327, r=matklad
bors [Fri, 27 Oct 2017 14:02:41 +0000 (14:02 +0000)]
Auto merge of #4665 - lukaslueg:issue4327, r=matklad

Discover vcs in new-cmd only if --vcs not set

If a commandline-argument is given, it takes precedence
over the config and existing vcs. Avoid trying to discover
existing repositories in that case, saving use from
shelling out to `hg`. Fixes #4327

8 years agoDiscover vcs in new-cmd only if --vcs not set
Lukas Lueg [Fri, 27 Oct 2017 13:00:23 +0000 (15:00 +0200)]
Discover vcs in new-cmd only if --vcs not set

If a commandline-argument is given, it takes precedence
over the config and existing vcs. Avoid trying to discover
existing repositories in that case, saving use from
shelling out to `hg`. Fixes #4327

8 years agoAuto merge of #4650 - main--:patch-1, r=matklad
bors [Thu, 26 Oct 2017 10:44:49 +0000 (10:44 +0000)]
Auto merge of #4650 - main--:patch-1, r=matklad

Document that cargo test --release uses profile.bench

It certainly makes sense but it's still surprising behavior when the docs clearly state `cargo bench` = `profile.bench`, `cargo test` = `profile.test`. Had to dive into the code to figure this out.

8 years agoDocument that cargo test --release uses profile.bench
main() [Thu, 26 Oct 2017 10:19:31 +0000 (12:19 +0200)]
Document that cargo test --release uses profile.bench

8 years agoAuto merge of #4634 - kivikakk:cargo-env-prevails, r=matklad
bors [Thu, 26 Oct 2017 07:35:44 +0000 (07:35 +0000)]
Auto merge of #4634 - kivikakk:cargo-env-prevails, r=matklad

Use argv[0] for cargo_exe so we don't rely on /proc on Linux

This is a proposed solution to #4450. I'm not at all wedded to the idea or the code, though, so feel free to shoot it down with abandon if this isn't something that'd work out or that you like.

In short, we use the existing `CARGO_ENV` (`"CARGO"`) if present, and only if not do we attempt to perform a lookup with `env::current_exe()` ourselves. This means users without access to `current_exe` (such as Linux without `procfs` mounted) can supply the `CARGO` env var themselves for external commands to use.

My concern here is: what if maybe we intentionally switch cargo binaries and didn't intend for this to happen? Could this ever happen outside a test environment? This kind-of-sorta-happened by accident in the test suite, necessitating the explicit removal of `CARGO_ENV` from the subprocess environment, because the actual cargo executing the test suite propagated its own path into the test subprocess!

/cc @alexcrichton as the originator of the idea of `CARGO_ENV`

8 years agoTry to replicate shell behavior more accurately
Ashe Connor [Thu, 26 Oct 2017 07:30:50 +0000 (18:30 +1100)]
Try to replicate shell behavior more accurately

8 years agoMerge remote-tracking branch 'upstream/master' into cargo-env-prevails
Ashe Connor [Thu, 26 Oct 2017 07:18:39 +0000 (18:18 +1100)]
Merge remote-tracking branch 'upstream/master' into cargo-env-prevails

8 years agoAuto merge of #4644 - dethoter:4620, r=matklad
bors [Thu, 26 Oct 2017 05:17:36 +0000 (05:17 +0000)]
Auto merge of #4644 - dethoter:4620, r=matklad

Fix documentation for package.readme option.

Fix for #4620.

8 years agoAuto merge of #4506 - withoutboats:alt-registries, r=alexcrichton
bors [Wed, 25 Oct 2017 17:09:02 +0000 (17:09 +0000)]
Auto merge of #4506 - withoutboats:alt-registries, r=alexcrichton

Alternative registries

An implementation of alt registries. Still needs to get tested more thoroughly but seems to work.

8 years agoAuto merge of #4627 - integer32llc:document-libs-and-bins, r=matklad
bors [Wed, 25 Oct 2017 14:29:13 +0000 (14:29 +0000)]
Auto merge of #4627 - integer32llc:document-libs-and-bins, r=matklad

Document the lib if a lib and bin have the same name

Fixes #4341, as discussed in that issue.

- Removes the check that bailed if there was a  bin and lib with the
  same name
- Exclude bins with the same name as libs from the proposed targets to
  build when compiling docs
- Adjust tests to expect this behavior

8 years agoAdd more tests about documenting lib vs bins with the same name
Carol (Nichols || Goulding) [Mon, 16 Oct 2017 20:05:47 +0000 (16:05 -0400)]
Add more tests about documenting lib vs bins with the same name

8 years agoDocument the lib if a lib and bin have the same name
Carol (Nichols || Goulding) [Mon, 16 Oct 2017 16:30:57 +0000 (12:30 -0400)]
Document the lib if a lib and bin have the same name

Fixes #4341.

- Removes the check that bailed if there was a  bin and lib with the
  same name
- Exclude bins with the same name as libs from the proposed targets to
  build when compiling docs
- Adjust tests to expect this behavior

8 years agoAuto merge of #4649 - jongiddy:gitignore-newline, r=alexcrichton
bors [Wed, 25 Oct 2017 06:42:27 +0000 (06:42 +0000)]
Auto merge of #4649 - jongiddy:gitignore-newline, r=alexcrichton

Add a newline before appended VCS ignore lines

The `cargo init` command appends to `.gitignore` or `.hgignore` without checking if the last line of the existing file ends with a newline.

This change will insert a newline before the appended lines. If the last line has no newline, this will ensure the lines are kept separated. If the newline is present, this will insert a blank line. Both Git and Mercurial ignore blank lines in these files.

8 years agoAuto merge of #4654 - rwakulszowa:inferred_test_cleanup, r=matklad
bors [Wed, 25 Oct 2017 05:29:49 +0000 (05:29 +0000)]
Auto merge of #4654 - rwakulszowa:inferred_test_cleanup, r=matklad

Clean up inferred* tests

Deduplicate, simplify and rename interred_* tests.
Follow up to #4496
@matklad

8 years agoAuto merge of #4659 - integer32llc:pin-nightly, r=alexcrichton
bors [Wed, 25 Oct 2017 00:11:50 +0000 (00:11 +0000)]
Auto merge of #4659 - integer32llc:pin-nightly, r=alexcrichton

try pinning to a nightly of two weeks ago

This passed CI [over here](https://github.com/rust-lang/cargo/pull/4658) and should get the 32-bit windows cross compiling tests passing until someone figures out why rustc is broken for that purpose

r? @alexcrichton

cc https://github.com/rust-lang/rust/issues/45500

8 years agoUpdate alt-registry tests to the use the new interface.
Chris Swindle [Tue, 24 Oct 2017 20:24:12 +0000 (21:24 +0100)]
Update alt-registry tests to the use the new interface.

8 years agoMerge branch 'master' of github.com:rust-lang/cargo into alt-registries
Chris Swindle [Tue, 24 Oct 2017 19:54:59 +0000 (20:54 +0100)]
Merge branch 'master' of github.com:rust-lang/cargo into alt-registries

8 years agotry pinning to a nightly of two weeks ago
Carol (Nichols || Goulding) [Tue, 24 Oct 2017 17:17:27 +0000 (13:17 -0400)]
try pinning to a nightly of two weeks ago

8 years agoAdd tests of transitive dependencies.
Without Boats [Fri, 6 Oct 2017 22:34:00 +0000 (15:34 -0700)]
Add tests of transitive dependencies.

8 years agoClean up inferred* tests
rwakulszowa [Mon, 23 Oct 2017 09:18:12 +0000 (10:18 +0100)]
Clean up inferred* tests

8 years agoAdding test for alternate registry dependency, with alternate registry dependency.
Chris Swindle [Mon, 23 Oct 2017 05:54:25 +0000 (06:54 +0100)]
Adding test for alternate registry dependency, with alternate registry dependency.

8 years agoSwitch to use registry in the dependency so that it matches RFC2141.
Chris Swindle [Sun, 22 Oct 2017 07:44:11 +0000 (08:44 +0100)]
Switch to use registry in the dependency so that it matches RFC2141.

8 years agoSorting out file permissions.
Chris Swindle [Sun, 22 Oct 2017 06:47:32 +0000 (07:47 +0100)]
Sorting out file permissions.

8 years agoAdd support for other registries in dependencies.
Chris Swindle [Sun, 22 Oct 2017 06:46:50 +0000 (07:46 +0100)]
Add support for other registries in dependencies.

8 years agoAdding some extra tests.
Chris Swindle [Sat, 21 Oct 2017 19:10:25 +0000 (20:10 +0100)]
Adding some extra tests.

8 years agoDocument that cargo test --release uses profile.bench
main() [Sat, 21 Oct 2017 15:55:32 +0000 (17:55 +0200)]
Document that cargo test --release uses profile.bench

8 years agoAdd a newline before appended VCS ignore lines
Jonathan Giddy [Sat, 21 Oct 2017 15:15:52 +0000 (16:15 +0100)]
Add a newline before appended VCS ignore lines

8 years agoComments!
Ashe Connor [Fri, 20 Oct 2017 00:51:23 +0000 (11:51 +1100)]
Comments!

8 years agoFix documentation for package.readme option.
Evgen Druzhynin [Thu, 19 Oct 2017 10:36:52 +0000 (13:36 +0300)]
Fix documentation for package.readme option.

8 years agoAuto merge of #4623 - alexcrichton:remove-lock, r=matklad
bors [Thu, 19 Oct 2017 07:58:19 +0000 (07:58 +0000)]
Auto merge of #4623 - alexcrichton:remove-lock, r=matklad

Delete Cargo.lock from this repo

There's now a lock file upstream in rust-lang/rust so the one here isn't
actually used, and otherwise this crate is used as a dependency so the lock file
isn't respected anyway!

8 years agoAuto merge of #4637 - kivikakk:vers-version, r=alexcrichton
bors [Thu, 19 Oct 2017 06:50:17 +0000 (06:50 +0000)]
Auto merge of #4637 - kivikakk:vers-version, r=alexcrichton

Allow cargo install --version as well (preferred)

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

The usage looks pretty ugly with this extra line in it, but it's not really avoidable with our docopt use.

We fail if both are provided; accepting both feels like a path to demons.

8 years agoTry current_exe, then argv0 canonicalize, then PATH
Ashe Connor [Thu, 19 Oct 2017 05:15:16 +0000 (16:15 +1100)]
Try current_exe, then argv0 canonicalize, then PATH

8 years agoDelete Cargo.lock from this repo
Alex Crichton [Sun, 10 Sep 2017 16:38:29 +0000 (09:38 -0700)]
Delete Cargo.lock from this repo

There's now a lock file upstream in rust-lang/rust so the one here isn't
actually used, and otherwise this crate is used as a dependency so the lock file
isn't respected anyway!

8 years agoAuto merge of #4638 - efyang:docs-cc, r=alexcrichton
bors [Wed, 18 Oct 2017 14:04:33 +0000 (14:04 +0000)]
Auto merge of #4638 - efyang:docs-cc, r=alexcrichton

Update docs to use cc instead of gcc

Closes #4626.

8 years agoAuto merge of #4633 - kivikakk:readme-file, r=carols10cents
bors [Wed, 18 Oct 2017 12:50:42 +0000 (12:50 +0000)]
Auto merge of #4633 - kivikakk:readme-file, r=carols10cents

transmit: send README filename as well as content

This is required to solve https://github.com/rust-lang/crates.io/issues/995; we currently only send the README content, but not the name of the README itself, so it's not possible to determine how we should render it.

I've confirmed the existing crates.io server silently ignores the new field, so this should be safe to roll out whenever.

8 years agoUpdate docs to use cc instead of gcc
Edward Yang [Wed, 18 Oct 2017 06:39:49 +0000 (01:39 -0500)]
Update docs to use cc instead of gcc

8 years agoLet's not accept both, just to be safe
Ashe Connor [Wed, 18 Oct 2017 06:39:11 +0000 (17:39 +1100)]
Let's not accept both, just to be safe

8 years agoAllow --version as well (preferred)
Ashe Connor [Wed, 18 Oct 2017 06:18:42 +0000 (17:18 +1100)]
Allow --version as well (preferred)

8 years agoAuto merge of #4635 - dethoter:4430, r=alexcrichton
bors [Tue, 17 Oct 2017 17:32:27 +0000 (17:32 +0000)]
Auto merge of #4635 - dethoter:4430, r=alexcrichton

Fix a documentation for package.build option.

Fix for #4430.

8 years agoFix a documentation for package.build option.
Evgen Druzhynin [Tue, 17 Oct 2017 15:52:56 +0000 (18:52 +0300)]
Fix a documentation for package.build option.

8 years agoAuto merge of #4630 - ehuss:new-test-temp-dir, r=alexcrichton
bors [Tue, 17 Oct 2017 14:24:37 +0000 (14:24 +0000)]
Auto merge of #4630 - ehuss:new-test-temp-dir, r=alexcrichton

Fix `new` tests on Windows inadvertently picking up ~/.cargo/config.

Fixes #4601.  By relying on `__CARGO_TEST_ROOT`, using a temp directory is no
longer necessary.

8 years agotransmit: send README filename as well as content
Ashe Connor [Tue, 17 Oct 2017 05:04:33 +0000 (16:04 +1100)]
transmit: send README filename as well as content

8 years agoFix `new` tests on Windows inadvertently picking up ~/.cargo/config.
Eric Huss [Mon, 16 Oct 2017 23:41:11 +0000 (16:41 -0700)]
Fix `new` tests on Windows inadvertently picking up ~/.cargo/config.

Fixes #4601.  By relying on `__CARGO_TEST_ROOT`, using a temp directory is no
longer necessary.

8 years agoAuto merge of #4628 - pixelistik:patch-1, r=alexcrichton
bors [Mon, 16 Oct 2017 22:24:57 +0000 (22:24 +0000)]
Auto merge of #4628 - pixelistik:patch-1, r=alexcrichton

Fix typo in docs

8 years agoFix typo in docs
pixelistik [Mon, 16 Oct 2017 20:11:24 +0000 (22:11 +0200)]
Fix typo in docs

8 years agoAuto merge of #4619 - camjackson:patch-1, r=alexcrichton
bors [Sun, 15 Oct 2017 17:00:09 +0000 (17:00 +0000)]
Auto merge of #4619 - camjackson:patch-1, r=alexcrichton

Document how to make `build.rs` write to the terminal

Documenting the solution mentioned here: https://github.com/rust-lang/cargo/issues/985

8 years agoAuto merge of #4624 - alexcrichton:bump, r=alexcrichton
bors [Sun, 15 Oct 2017 15:30:51 +0000 (15:30 +0000)]
Auto merge of #4624 - alexcrichton:bump, r=alexcrichton

Bump to 0.24.0

It's that time of the year again!

8 years agoBump to 0.24.0
Alex Crichton [Sun, 15 Oct 2017 15:30:11 +0000 (08:30 -0700)]
Bump to 0.24.0

It's that time of the year again!

8 years agoDocument how to make `build.rs` write to the terminal
Cam Jackson [Sun, 15 Oct 2017 03:30:38 +0000 (11:30 +0800)]
Document how to make `build.rs` write to the terminal

8 years agoAuto merge of #4616 - kennytm:fix-4490, r=alexcrichton
bors [Sat, 14 Oct 2017 14:54:15 +0000 (14:54 +0000)]
Auto merge of #4616 - kennytm:fix-4490, r=alexcrichton

Uplift *.dSYM

Fixed #4490.

The solution is based on #4570. Simply adding `.dSYM` into `add_target_specific_suffixes` will cause cargo trying to actually run that `.dSYM` folder, so I've upgraded the `linkable` boolean into a 3-value enum `TargetFileType`, to tell `cargo run` and `cargo test` to avoid these debug symbol files.

(I haven't checked if it can solve #4056, don't wanna mess with Spotlight 😝)

8 years agoAuto merge of #4618 - integer32llc:config-in-home, r=alexcrichton
bors [Sat, 14 Oct 2017 14:19:16 +0000 (14:19 +0000)]
Auto merge of #4618 - integer32llc:config-in-home, r=alexcrichton

Clarify that $HOME/.cargo is always checked

8 years agoClarify that $HOME/.cargo is always checked
Jake Goulding [Fri, 13 Oct 2017 23:50:04 +0000 (19:50 -0400)]
Clarify that $HOME/.cargo is always checked

8 years agoUplift *.dSYM. Fix #4490.
kennytm [Fri, 13 Oct 2017 19:13:32 +0000 (03:13 +0800)]
Uplift *.dSYM. Fix #4490.

8 years agoAuto merge of #4610 - hdhoang:patch-1, r=alexcrichton
bors [Thu, 12 Oct 2017 14:23:24 +0000 (14:23 +0000)]
Auto merge of #4610 - hdhoang:patch-1, r=alexcrichton

layout: fix typo, and improve pronoun

"it" is ambiguous between `new` and `at` (the most recent noun).

8 years agoAuto merge of #4314 - nodakai:phantom-type-in-projectbuilder, r=matklad
bors [Thu, 12 Oct 2017 08:52:44 +0000 (08:52 +0000)]
Auto merge of #4314 - nodakai:phantom-type-in-projectbuilder, r=matklad

cargotest/support: remove internal mutability in favor of switching types

`Cell<bool>` was removed from `ProjectBuilder`. Instead `PhantomData<T>` was added to it (and `RepoBuilder`) to manage state transition in the type level (`T` is either `Configuring` or `Done`.)
`ProjectBuilder::cargo_process()` was removed as its design heavily depended on the internal mutability.

Also added `#[must_use]` to `ProjectBuilder` and `RepoBuilder` to check for call sites of their `build()` method.

8 years agolayout: fix typo, and improve pronoun
Hoàng Đức Hiếu [Thu, 12 Oct 2017 04:04:58 +0000 (13:04 +0900)]
layout: fix typo, and improve pronoun

"it" is ambiguous between `new` and `at` (the most recent noun).

8 years agoAuto merge of #4608 - vmx:patch-1, r=alexcrichton
bors [Thu, 12 Oct 2017 00:20:13 +0000 (00:20 +0000)]
Auto merge of #4608 - vmx:patch-1, r=alexcrichton

Remove wrong information about git repository

Dependencies cannot be a git repository when published to crates.io.

8 years agoRemove wrong information about git repository
Volker Mische [Wed, 11 Oct 2017 19:18:41 +0000 (21:18 +0200)]
Remove wrong information about git repository

Dependencies cannot be a git repository when published to crates.io.

8 years agoAuto merge of #4594 - behnam:workspace, r=alexcrichton
bors [Tue, 10 Oct 2017 19:20:43 +0000 (19:20 +0000)]
Auto merge of #4594 - behnam:workspace, r=alexcrichton

[core/workspace] Create WorkspaceRootConfig

Create `WorkspaceRootConfig`, which knows its `root_dir` and lists of
`members` and `excludes`, to answer queries on which paths are a member
and which are not.

----

This is the first step of the fix, that's only a codemod to put together the relevant parts : `workspace.members`, `workspace.excludes`, and the `root_dir` (where `members` and `excludes` are relative to). There's no logic change in this PR to keep review easier.

The added tests are commented out, because they fail with the current logic. The next step to get these steps to pass.

Tracker: <https://github.com/rust-lang/cargo/issues/4089>
Old PR: <https://github.com/rust-lang/cargo/pull/4297>

8 years agoAuto merge of #4581 - tamird:master, r=alexcrichton
bors [Tue, 10 Oct 2017 18:36:48 +0000 (18:36 +0000)]
Auto merge of #4581 - tamird:master, r=alexcrichton

cargo_rustc: remove workaround for fixed upstream issue

Fixed in https://github.com/rust-lang/rust/pull/25411. Also, the
removed code is implicated in test failures observed in
https://github.com/rust-lang/rust/pull/44515.

r? @alexcrichton

8 years agoAuto merge of #4602 - ehuss:fix-new-test-windows, r=alexcrichton
bors [Tue, 10 Oct 2017 17:58:30 +0000 (17:58 +0000)]
Auto merge of #4602 - ehuss:fix-new-test-windows, r=alexcrichton

Allow test to pass if user has ~/.gitconfig on Windows.

The `new` test will fail on Windows if you have `~/.gitconfig` configured with a username/email.  This is because libgit2 searches quite a few environment variables hunting for a config file.  Rather than adjusting other environment variables (I think at a minimum it would be `%HOMEDRIVE%%HOMEPATH%` and `%USERPROFILE%`), this just adds an empty config file since libgit2 will stop at the first one it finds.

8 years agocargo_rustc: remove workaround for fixed upstream issue
Tamir Duberstein [Thu, 5 Oct 2017 06:54:43 +0000 (02:54 -0400)]
cargo_rustc: remove workaround for fixed upstream issue

Fixed in https://github.com/rust-lang/rust/pull/25411. Also, the
removed code is implicated in test failures observed in
https://github.com/rust-lang/rust/pull/44515.

8 years agocargotest/support: remove internal mutability in favor of switching types
NODA, Kai [Sat, 22 Jul 2017 03:12:21 +0000 (11:12 +0800)]
cargotest/support: remove internal mutability in favor of switching types

Remove is_build: Cell<bool> from ProjectBuilder and introduce a new type Project.

is_build==false <-> ProjectBuilder
is_build==true <-> Project

Also add #[must_use] to ProjectBuilder to confirm its instances are surely consumed by its build() method to produce Project.

The same goes for RepoBuilder.

ProjectBuilder::cargo_process() was removed as its design heavily depended on the internal mutability.

Signed-off-by: NODA, Kai <nodakai@gmail.com>
8 years agoAllow test to pass if user has ~/.gitconfig on Windows.
Eric Huss [Tue, 10 Oct 2017 00:52:51 +0000 (17:52 -0700)]
Allow test to pass if user has ~/.gitconfig on Windows.

8 years agoAuto merge of #4570 - tatsuya6502:target-specific-artifacts, r=alexcrichton
bors [Mon, 9 Oct 2017 20:48:17 +0000 (20:48 +0000)]
Auto merge of #4570 - tatsuya6502:target-specific-artifacts, r=alexcrichton

Handle target specific outputs such as .wasm or .dll.lib

Fixes #4500, #4535

Until now, Cargo does not have any knowledge about target-specific output files. It relies solely on rustc for this sort of information (`rustc --print=file-names ...`).

As a result, Cargo does not place some build artifacts (files) to target/{debug,release} directory. These files include *.wasm for wasm32-unknown-emscripten target and *.dll.lib for *-pc-windows-msvc cdylib target.

This commit will add such knowledge to Cargo so that *.wasm and *.dll.lib will be placed in target/{debug,release} directory.

**EDIT**: I added [a summary of changes](https://github.com/rust-lang/cargo/pull/4570#issuecomment-334433635). Please read it for more details of changes.

**IMPORTANT**
Although I added test cases for both wasm32-unknown-emscripten and *-pc-windows-msvc cdylib targets, ~I did not do manual testing on wasm32-unknown-emscripten target as I do not have an environment with emscripten installed. It will be appreciated if anybody tests this change for wasm32-unknown-emscripten target.~  **EDIT**: Tested for both wasm32-unknown-emscripten and x86_64-pc-windows-msvc. Thanks @Herschel for the help.

8 years agoAuto merge of #4597 - andreevlex:fix-cargo-doc, r=alexcrichton
bors [Mon, 9 Oct 2017 17:53:25 +0000 (17:53 +0000)]
Auto merge of #4597 - andreevlex:fix-cargo-doc, r=alexcrichton

Fixed spelling error in manifest.md

8 years agoFixed spelling error in manifest.md
Andreev Alexander [Mon, 9 Oct 2017 13:38:06 +0000 (16:38 +0300)]
Fixed spelling error in manifest.md

8 years agoAuto merge of #4595 - treiff:update-appveyor-badge-documentation, r=alexcrichton
bors [Sun, 8 Oct 2017 02:32:33 +0000 (02:32 +0000)]
Auto merge of #4595 - treiff:update-appveyor-badge-documentation, r=alexcrichton

Update docs for appveyor badge.

Can now optionally specify the appveyor `project_name`.

Related PR: [rust-lang/crates.io#1111](https://github.com/rust-lang/crates.io/pull/1111)
Related Issue: [rust-lang/crates.io#587](https://github.com/rust-lang/crates.io/issues/587)

8 years agoUpdate docs for appveyor badge.
Trevor Reiff [Sun, 8 Oct 2017 00:59:39 +0000 (20:59 -0400)]
Update docs for appveyor badge.

8 years ago[workspace] Add some docs
Behnam Esfahbod [Sat, 7 Oct 2017 22:00:13 +0000 (15:00 -0700)]
[workspace] Add some docs

Plus some little codemod.

8 years ago[core/workspace] Create WorkspaceRootConfig
Behnam Esfahbod [Tue, 26 Sep 2017 05:55:02 +0000 (22:55 -0700)]
[core/workspace] Create WorkspaceRootConfig

Create `WorkspaceRootConfig`, which knows its `root_dir` and lists of
`members` and `excludes`, to answer queries on which paths are a member
and which are not.

8 years agoAuto merge of #4578 - derekdreery:refactor/cargo_util_config, r=alexcrichton
bors [Sat, 7 Oct 2017 15:09:06 +0000 (15:09 +0000)]
Auto merge of #4578 - derekdreery:refactor/cargo_util_config, r=alexcrichton

Remove some cells from Config

In most cases it makes sense to not use interior mutability in Config, so that mutability is more transparent. This PR removes Cells in these cases. It leaves those cases where parameters are only initialized on first access (LazyCell).

8 years agoUpdate docs (replace todos)
Richard Dodd [Sat, 7 Oct 2017 12:47:21 +0000 (13:47 +0100)]
Update docs (replace todos)

8 years agoClean up alt registries lookup.
Without Boats [Fri, 6 Oct 2017 20:29:37 +0000 (13:29 -0700)]
Clean up alt registries lookup.

8 years agoAuto merge of #4586 - lukaslueg:issue4534, r=alexcrichton
bors [Fri, 6 Oct 2017 17:54:30 +0000 (17:54 +0000)]
Auto merge of #4586 - lukaslueg:issue4534, r=alexcrichton

Report hint if single failure with --no-fail-fast

There are two things going on in #4534:

* The doctest-kind masks the unittest-kind if doctests are executed during `--no-fail-fast`, no doctests fail and tests errors have already piled up. This is bug, fixed.
* Cargo would previously not report any unittest-hints if running with `--no-fail-fast`. This behavior has been changed to report a specific hint iif exactly one error has bubbled up during `--no-fail-fast`. The hint in #4534 is now `...pass '--test integ'`.

8 years agoReport hint if single failure with --no-fail-fast
Lukas Lueg [Fri, 6 Oct 2017 16:14:23 +0000 (18:14 +0200)]
Report hint if single failure with --no-fail-fast

If a single unit-test fails, report a rerun-hint for it,
even with --no-fail-fast.

Fixes reporting a doctest-hint if doctest succeeds while
unittest fail with --no-fail-fast.

Fixes #4534

8 years agoGet features in virtual manifest.
boats [Thu, 5 Oct 2017 23:13:53 +0000 (23:13 +0000)]
Get features in virtual manifest.

8 years agoClean up
boats [Thu, 5 Oct 2017 23:11:40 +0000 (23:11 +0000)]
Clean up

8 years agoAuto merge of #4583 - alexcrichton:unstable, r=matklad
bors [Thu, 5 Oct 2017 22:54:59 +0000 (22:54 +0000)]
Auto merge of #4583 - alexcrichton:unstable, r=matklad

Fix [patch] causing updates with a virtual manifest

This commit fixes the [patch] implementation to avoid causing spurious updates
of the registry when specified inside of a virtual manifest via a path
dependency that was otherwise outside of the workspace.

Cargo previously attempted to learn about path dependencies through the
configuration of the workspace by looking at members, their path dependencies,
and their replace sections. The replace/patch sections, however, only matter at
the root of the workspace and those weren't looked at! This commit fixes this
problem by explicitly looking at the workspace's replace/patch sections and
avoiding looking at other manifest replace/patch which shouldn't matter.

Closes #4552

8 years agoFix [patch] causing updates with a virtual manifest
Alex Crichton [Thu, 5 Oct 2017 22:11:25 +0000 (15:11 -0700)]
Fix [patch] causing updates with a virtual manifest

This commit fixes the [patch] implementation to avoid causing spurious updates
of the registry when specified inside of a virtual manifest via a path
dependency that was otherwise outside of the workspace.

Cargo previously attempted to learn about path dependencies through the
configuration of the workspace by looking at members, their path dependencies,
and their replace sections. The replace/patch sections, however, only matter at
the root of the workspace and those weren't looked at! This commit fixes this
problem by explicitly looking at the workspace's replace/patch sections and
avoiding looking at other manifest replace/patch which shouldn't matter.

Closes #4552

8 years agoHandle target specific outputs such as .wasm
Tatsuya Kawano [Thu, 5 Oct 2017 01:37:04 +0000 (09:37 +0800)]
Handle target specific outputs such as .wasm

Fixes #4535

- Do not add metadata to wasm32 bin target because generated .js will
  refer corresponding .wasm.
- Handle different usages of "-" and "_" in .js and .wasm file names.
  (e.g "foo-bar.js" vs. "foo_bar.wasm")
- Change file mode of cargo_rustc/context.rs (100755 -> 100644)

8 years agoAuto merge of #4580 - djc:cargo-update, r=alexcrichton
bors [Wed, 4 Oct 2017 22:35:33 +0000 (22:35 +0000)]
Auto merge of #4580 - djc:cargo-update, r=alexcrichton

Update dependencies (unbreak macOS 10.13 with libgit2-sys-0.6.16)

It would be nice to pull in the fix for https://github.com/alexcrichton/git2-rs/issues/257.

8 years agoFix tests (to do with printing).
Without Boats [Wed, 4 Oct 2017 22:07:01 +0000 (15:07 -0700)]
Fix tests (to do with printing).

8 years agoAuto merge of #4579 - mdevlamynck:issue-3388, r=alexcrichton
bors [Wed, 4 Oct 2017 22:04:49 +0000 (22:04 +0000)]
Auto merge of #4579 - mdevlamynck:issue-3388, r=alexcrichton

Fix error message when Cargo.toml misses a [package] section

Fixes #3388.

8 years agoAdd backticks.
Without Boats [Wed, 4 Oct 2017 20:36:04 +0000 (13:36 -0700)]
Add backticks.

8 years agoUpdate dependencies (unbreak macOS 10.13 with libgit2-sys-0.6.16)
Dirkjan Ochtman [Wed, 4 Oct 2017 19:37:55 +0000 (21:37 +0200)]
Update dependencies (unbreak macOS 10.13 with libgit2-sys-0.6.16)

8 years agoFix error message when Cargo.toml misses a [package] section, remove an unused import
Matthias Devlamynck [Wed, 4 Oct 2017 19:24:26 +0000 (21:24 +0200)]
Fix error message when Cargo.toml misses a [package] section, remove an unused import

8 years agoAuto merge of #4571 - raytung:remove-root-from-cargo-lock, r=matklad
bors [Wed, 4 Oct 2017 18:30:20 +0000 (18:30 +0000)]
Auto merge of #4571 - raytung:remove-root-from-cargo-lock, r=matklad

Remove root from cargo lock

Removing [root] section from Cargo.lock for #4563

Tests of interest has been updated accordingly, especially [tests/lockfile-compat.rs#oldest_lockfile_still_works](https://github.com/rust-lang/cargo/compare/master...raytung:remove-root-from-cargo-lock?expand=1#diff-48866d1891f97cb799dd0ca7148d1eefR10)

8 years agoRemove cells where now unnecessary.
Richard Dodd [Wed, 4 Oct 2017 18:11:34 +0000 (19:11 +0100)]
Remove cells where now unnecessary.

8 years agoRefactor Config::configure to take &mut.
Richard Dodd [Wed, 4 Oct 2017 17:03:08 +0000 (18:03 +0100)]
Refactor Config::configure to take &mut.

8 years agoAuto merge of #4556 - lukaslueg:patch-1, r=carols10cents
bors [Wed, 4 Oct 2017 13:50:45 +0000 (13:50 +0000)]
Auto merge of #4556 - lukaslueg:patch-1, r=carols10cents

Update README.md

Table is outdated and of little use anyway

8 years agoAuto merge of #4558 - lukaslueg:issue4504, r=alexcrichton
bors [Wed, 4 Oct 2017 09:13:29 +0000 (09:13 +0000)]
Auto merge of #4558 - lukaslueg:issue4504, r=alexcrichton

Allow multiple arguments in `cargo bench`

It seems the docopt DSL was simply lacking.

8 years agoAlternate registries.
Without Boats [Wed, 30 Aug 2017 05:55:31 +0000 (22:55 -0700)]
Alternate registries.

Allow users to add dependencies which are in alternate registries.
The alternate registries are listed in the .cargo/config, and must
there have a link to a conforming crate index.