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.
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...
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.
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".
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.
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.
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.
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).
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).
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).
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!
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!
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.
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.
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.
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.
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.
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.
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.
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.
* 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`...
bors [Sat, 5 May 2018 19:04:30 +0000 (19:04 +0000)]
Auto merge of #5488 - alexcrichton:Retry, r=matklad
Cop out on fixing a spurious test failure
This commit cops out trying to fix `rename_with_link_search_path` by simply
adding a loop on Windows to retry the operation that looks to need retrying.
Alex Crichton [Sat, 5 May 2018 18:47:41 +0000 (11:47 -0700)]
Cop out on fixing a spurious test failure
This commit cops out trying to fix `rename_with_link_search_path` by simply
adding a loop on Windows to retry the operation that looks to need retrying.
bors [Sat, 5 May 2018 17:19:01 +0000 (17:19 +0000)]
Auto merge of #5487 - matklad:mixed-deps, r=alexcrhiton
FIx false positive warning
We warn if a feature was specified corresponding to a dependency which
is not optional. However, a dependency can be both optional and
required, and we shouldn't warn in that case.
Aleksey Kladov [Sat, 5 May 2018 16:04:54 +0000 (19:04 +0300)]
FIx false positive warning
We warn if a feature was specified corresponding to a dependency which
is not optional. However, a dependency can be both optional and
required, and we shouldn't warn in that case.
bors [Sat, 5 May 2018 14:24:55 +0000 (14:24 +0000)]
Auto merge of #5485 - patriksvensson:feature/GH-5474, r=matklad
Do not allow running library examples.
This is my first contribution to anything Rust related that I haven't written myself, and I'm not a very proficient Rust programmer (yet), so would love some feedback on improvements.
bors [Fri, 4 May 2018 21:07:15 +0000 (21:07 +0000)]
Auto merge of #5480 - alexcrichton:fix-regr, r=matklad
Fix optional deps in multiple sections
This commit fixes an issue where an optional dependency was listed multiple
times in a manifest (multiple sections). This regression was introduced by #5415
and happened because in the resolver we didn't record a `Dependency` as it was
accidentally deduplicated too soon.
The fix here was to ensure that all `Dependency` annotations make their way into
`Resolve` now that we rely on the listed `Dependency` values for correctness.
Alex Crichton [Fri, 4 May 2018 16:19:30 +0000 (09:19 -0700)]
Fix optional deps in multiple sections
This commit fixes an issue where an optional dependency was listed multiple
times in a manifest (multiple sections). This regression was introduced by #5415
and happened because in the resolver we didn't record a `Dependency` as it was
accidentally deduplicated too soon.
The fix here was to ensure that all `Dependency` annotations make their way into
`Resolve` now that we rely on the listed `Dependency` values for correctness.
bors [Fri, 4 May 2018 14:37:41 +0000 (14:37 +0000)]
Auto merge of #5476 - dwijnand:Registry-vs-Source-confusion, r=matklad
Try & simplify Registry vs Source confusion
Refs #3006.
I tried to go further and replace references of `Registry` with `PackageRegistry`, but I ran into lifetime issue in `ops::resolve_with_previous` which I think has to do with no longer passing `PackageRegistry` as a `Registry` trait object (with a new and distinct lifetime).