Kornel [Sat, 28 Oct 2017 22:03:15 +0000 (23:03 +0100)]
List available binary names
bors [Tue, 31 Oct 2017 14:14:46 +0000 (14:14 +0000)]
Auto merge of #4684 - matklad:lazy-update, r=alexcrichton
Don't update lockfiles from previous Cargo versions if `--locked` is passed
Recently, we've stopped outputting `[root]` section to Cargo.lock files. The problem with this is that somebody might want to have a Cargo.lock file with a `[root]` section for compatibility with older Cargos, but at the same time use newer Cargo to build the crate. In this case, newer Cargo would remove `[root]` from the lockfile. Such updating of the lockfiles to the latest versions is a reasonable behavior, but it might be useful to be able to override it with `--locked` flag.
Context: https://github.com/rust-lang/cargo/issues/4563#issuecomment-
340238773
r? @alexcrichton
Aleksey Kladov [Mon, 30 Oct 2017 19:56:46 +0000 (22:56 +0300)]
Don't update lockfiles from previous Cargo versions if `--locked` is passed
bors [Tue, 31 Oct 2017 00:48:46 +0000 (00:48 +0000)]
Auto merge of #4676 - mgeisler:ci-caching, r=alexcrichton
Explain why caching is only done on $HOME/.cargo/bin/ in Travis
After having experimented with the Travis and AppVeyor caches, I concluded that they don't really help here: they're large and take a very long time to both download when the build starts and upload after it is finished.
Martin Geisler [Mon, 30 Oct 2017 22:29:28 +0000 (23:29 +0100)]
Explain why we are not using 'cache: cargo' with Travis
bors [Mon, 30 Oct 2017 21:48:18 +0000 (21:48 +0000)]
Auto merge of #4685 - ehuss:all-targets-no-lib, r=alexcrichton
Fix --all-targets in a crate without a lib.
Fixes #4615.
Eric Huss [Mon, 30 Oct 2017 21:42:47 +0000 (14:42 -0700)]
Fix --all-targets in a crate without a lib.
Fixes #4615.
bors [Mon, 30 Oct 2017 19:58:01 +0000 (19:58 +0000)]
Auto merge of #4561 - nossralf:uninstall-many, r=matklad
Support uninstallation of multiple packages
This is a WIP pull request with support for uninstalling multiple packages. It mirrors the logic used for `cargo install`.
Fixes #4560
bors [Mon, 30 Oct 2017 18:09:49 +0000 (18:09 +0000)]
Auto merge of #4607 - sunjay:patcherror, r=alexcrichton
Improving the error message for when a patched dependency does not resolve to anything
Hi,
I just spent a long time debugging what this error message means and so I thought I would try to help improve it. Could someone who knows the codebase well look at this and see if this error message even makes sense here. I know this is the information I would have needed, but the error may occur in other cases where this message doesn't make sense. I'm open to any suggestions that would help make it more clear and maybe point people to where they should look for more information.
The specific problem that I ran into occurred when I was trying to upgrade the `rustfmt` submodule in the rust codebase. The `rustfmt-nightly` dependency changed version numbers and this conflicted with what was in the `Cargo.lock` file. After some detective work I was able to find the [documentation on `[patch]`](http://doc.crates.io/manifest.html#the-patch-section) which I had never read before and the following relevant paragraphs from [some other documentation](http://doc.crates.io/specifying-dependencies.html#testing-a-bugfix):
> Next up we need to ensure that our lock file is updated to use this new version of uuid so our project uses the locally checked out copy instead of one from crates.io. The way [patch] works is that it'll load the dependency at ../path/to/uuid and then whenever crates.io is queried for versions of uuid it'll also return the local version.
>
> This means that the version number of the local checkout is significant and will affect whether the patch is used. Our manifest declared uuid = "1.0" which means we'll only resolve to >= 1.0.0, < 2.0.0, and Cargo's greedy resolution algorithm also means that we'll resolve to the maximum version within that range. Typically this doesn't matter as the version of the git repository will already be greater or match the maximum version published on crates.io, but it's important to keep this in mind!
If it was not for the person who wrote those docs, I would not have known what to do here!
Sunjay Varma [Mon, 30 Oct 2017 17:18:55 +0000 (13:18 -0400)]
New error message with issue link
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
bors [Mon, 30 Oct 2017 16:50:15 +0000 (16:50 +0000)]
Auto merge of #4592 - ehuss:check_test, r=alexcrichton
Add unit test checking to `cargo check`
This is an extension of PR #4039, fixing #3431, #4003, #4059, #4330. The fixes for #4059 can potentially be separated into a separate PR, though there may be some overlap.
The general gist of the changes:
- Add `--profile test` flag to `cargo check` that will enable checking of unit tests.
- `--tests` will implicitly enable checking of unit tests within the lib (checks the same targets as `cargo test`). This affects the `check`, `test`, and `build` commands.
- `--benches` behaves similarly by using the same targets as `cargo bench`.
- Fix erroneously linking tests when run with `--test`.
There is one thing I did not do because I wanted more feedback on what others think the expected behavior should be. What should the behavior of `--all-targets` be? This patch does not (yet) make any changes to its behavior. My initial thinking is that it should *add* a target of `--lib --bins --profile test`, but that essentially means the lib and bin targets will be checked twice (and thus any errors/warnings outside of `#[cfg(test)]` will appear twice, which may be confusing, and generally take twice as long to run). I can add that, but I think it would require adding a new `All` variant to `CompileFilter` so that the code in `generate_targets` can detect this scenario. I wanted feedback before making a more extensive change like that. The downside of not adding it is that `--all-targets` will ignore unit tests (if you don't specify `--profile test`).
Summary of the profiles used with this patch:
Command | Lib | Bin foo | Test t1 | Example e1 | Bench b1 |
------- | --- | ------- | ------- | ---------- | -------- |
`check` | check | check | - | - | - |
`check --profile test` | check_test† | check_test† | - | - | - |
`check --lib` | check | - | - | - | - |
`check --lib --profile test` | check_test† | - | - | - | - |
`check --bin foo` | check | check | - | - | - |
`check -–bin foo –profile test` | check_test† | check_test† | - | - | - |
`check --bins` | check | check | - | - | - |
`check --test t1` | check | check | check_test | - | - |
`check --tests` | check, check_test† | check, check_test† | check_test | check†, check_test† | - |
`check --all-targets` | check, check_test† | check, check_test† | check_test | check, check_test† | check_test |
† = different behavior from today
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.
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
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.
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.
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.
kennytm [Sat, 28 Oct 2017 19:47:29 +0000 (03:47 +0800)]
When uplifting directories, symlink them instead of hard-link them.
Fixes #4671.
Fredrik Larsson [Sat, 28 Oct 2017 14:36:49 +0000 (16:36 +0200)]
Test partially successful uninstallation
Fredrik Larsson [Wed, 11 Oct 2017 19:35:30 +0000 (21:35 +0200)]
Test bailout when specifying --bin during uninstall of multiple packages
Fredrik Larsson [Wed, 11 Oct 2017 19:34:44 +0000 (21:34 +0200)]
Use multiple install command in the corresponding test
Fredrik Larsson [Wed, 11 Oct 2017 18:43:29 +0000 (20:43 +0200)]
Bailout if --bin is specified when uninstalling multiple packages
Fredrik Larsson [Sun, 10 Sep 2017 18:41:12 +0000 (20:41 +0200)]
Make it possible to uninstall multiple packages
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
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
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.
main() [Thu, 26 Oct 2017 10:19:31 +0000 (12:19 +0200)]
Document that cargo test --release uses profile.bench
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`
Ashe Connor [Thu, 26 Oct 2017 07:30:50 +0000 (18:30 +1100)]
Try to replicate shell behavior more accurately
Ashe Connor [Thu, 26 Oct 2017 07:18:39 +0000 (18:18 +1100)]
Merge remote-tracking branch 'upstream/master' into cargo-env-prevails
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.
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.
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
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
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
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.
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
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
Chris Swindle [Tue, 24 Oct 2017 20:24:12 +0000 (21:24 +0100)]
Update alt-registry tests to the use the new interface.
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
Carol (Nichols || Goulding) [Tue, 24 Oct 2017 17:17:27 +0000 (13:17 -0400)]
try pinning to a nightly of two weeks ago
Without Boats [Fri, 6 Oct 2017 22:34:00 +0000 (15:34 -0700)]
Add tests of transitive dependencies.
rwakulszowa [Mon, 23 Oct 2017 09:18:12 +0000 (10:18 +0100)]
Clean up inferred* tests
Chris Swindle [Mon, 23 Oct 2017 05:54:25 +0000 (06:54 +0100)]
Adding test for alternate registry dependency, with alternate registry dependency.
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.
Chris Swindle [Sun, 22 Oct 2017 06:47:32 +0000 (07:47 +0100)]
Sorting out file permissions.
Chris Swindle [Sun, 22 Oct 2017 06:46:50 +0000 (07:46 +0100)]
Add support for other registries in dependencies.
Chris Swindle [Sat, 21 Oct 2017 19:10:25 +0000 (20:10 +0100)]
Adding some extra tests.
main() [Sat, 21 Oct 2017 15:55:32 +0000 (17:55 +0200)]
Document that cargo test --release uses profile.bench
Jonathan Giddy [Sat, 21 Oct 2017 15:15:52 +0000 (16:15 +0100)]
Add a newline before appended VCS ignore lines
Eric Huss [Fri, 20 Oct 2017 23:59:32 +0000 (16:59 -0700)]
Don't change order of tests and benches for cleaner diff.
Eric Huss [Fri, 20 Oct 2017 22:45:51 +0000 (15:45 -0700)]
Fix broken bench test for new --benches behavior.
Eric Huss [Fri, 20 Oct 2017 21:34:21 +0000 (14:34 -0700)]
Rework handling of --tests and --benches with implied targets.
Ashe Connor [Fri, 20 Oct 2017 00:51:23 +0000 (11:51 +1100)]
Comments!
Evgen Druzhynin [Thu, 19 Oct 2017 10:36:52 +0000 (13:36 +0300)]
Fix documentation for package.readme option.
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!
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.
Ashe Connor [Thu, 19 Oct 2017 05:15:16 +0000 (16:15 +1100)]
Try current_exe, then argv0 canonicalize, then PATH
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!
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.
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.
Edward Yang [Wed, 18 Oct 2017 06:39:49 +0000 (01:39 -0500)]
Update docs to use cc instead of gcc
Ashe Connor [Wed, 18 Oct 2017 06:39:11 +0000 (17:39 +1100)]
Let's not accept both, just to be safe
Ashe Connor [Wed, 18 Oct 2017 06:18:42 +0000 (17:18 +1100)]
Allow --version as well (preferred)
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.
Evgen Druzhynin [Tue, 17 Oct 2017 15:52:56 +0000 (18:52 +0300)]
Fix a documentation for package.build option.
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.
Ashe Connor [Tue, 17 Oct 2017 05:04:33 +0000 (16:04 +1100)]
transmit: send README filename as well as content
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.
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
pixelistik [Mon, 16 Oct 2017 20:11:24 +0000 (22:11 +0200)]
Fix typo in docs
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
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!
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!
Cam Jackson [Sun, 15 Oct 2017 03:30:38 +0000 (11:30 +0800)]
Document how to make `build.rs` write to the terminal
Eric Huss [Sun, 8 Oct 2017 22:23:21 +0000 (15:23 -0700)]
Fix wrong profile selection for `cargo build` and `cargo rustc`.
Eric Huss [Sun, 8 Oct 2017 01:55:00 +0000 (18:55 -0700)]
Fix broken tests due to different profile selection.
Eric Huss [Sat, 7 Oct 2017 16:28:34 +0000 (09:28 -0700)]
Add unit test checking to `cargo check`
- Add `--profile test` flag to `cargo check` that will enable checking of unit tests.
- `--tests` will implicitly enable checking of unit tests within the lib.
- Don't implicitly compile binaries when using just `--test` filters.
- Fix erroneously linking tests when run with `--test`.
Fixes #3431, #4003, #4059, #4330.
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 😝)
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
Jake Goulding [Fri, 13 Oct 2017 23:50:04 +0000 (19:50 -0400)]
Clarify that $HOME/.cargo is always checked
kennytm [Fri, 13 Oct 2017 19:13:32 +0000 (03:13 +0800)]
Uplift *.dSYM. Fix #4490.
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).
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.
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).
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.
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.
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>
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
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.
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.
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>
Eric Huss [Tue, 10 Oct 2017 00:52:51 +0000 (17:52 -0700)]
Allow test to pass if user has ~/.gitconfig on Windows.
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.
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
Andreev Alexander [Mon, 9 Oct 2017 13:38:06 +0000 (16:38 +0300)]
Fixed spelling error in manifest.md
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)
Trevor Reiff [Sun, 8 Oct 2017 00:59:39 +0000 (20:59 -0400)]
Update docs for appveyor badge.
Behnam Esfahbod [Sat, 7 Oct 2017 22:00:13 +0000 (15:00 -0700)]
[workspace] Add some docs
Plus some little codemod.
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.