bors [Wed, 16 Nov 2016 15:02:22 +0000 (07:02 -0800)]
Auto merge of #3102 - nipunn1313:attempt, r=alexcrichton
Mix feature flags into fingerprint/metadata shorthash
Since building dependencies results in different libraries
depending on the feature flags, I added the feature flags into
the short_hash.
This solves an issue when multiple crates share a target directory
or multiple targets share a common library with divergent feature
flag choice.
I'm not sure if this architecturally the best way to solve this problem, but I did confirm that this fixes the issue I was seeing. I can also add a test for this case if this code is taking the right approach (or if it would help illustrate the issue).
bors [Mon, 14 Nov 2016 21:56:07 +0000 (13:56 -0800)]
Auto merge of #3272 - cuviper:openssl-1.1.0, r=alexcrichton
Update dependencies for OpenSSL 1.1.0 compatibility
The primary targets here are openssl and openssl-sys crates 0.9,
bringing support for OpenSSL 1.1.0. This requires updating the curl
and git2 related dependencies as well.
A small change is required in cargo itself for the new Hasher API.
Results from the hasher are simply unwrapped for now, matching the
Windows behavior that already panics on error.
Josh Stone [Tue, 8 Nov 2016 09:36:44 +0000 (01:36 -0800)]
Update dependencies for OpenSSL 1.1.0 compatibility
The primary targets here are openssl and openssl-sys crates 0.9,
bringing support for OpenSSL 1.1.0. This requires updating the curl
and git2 related dependencies as well.
A small change is required in cargo itself for the new Hasher API.
Results from the hasher are simply unwrapped for now, matching the
Windows behavior that already panics on error.
bors [Fri, 11 Nov 2016 00:20:48 +0000 (16:20 -0800)]
Auto merge of #3280 - alexcrichton:test-features, r=brson
Fix passing --features when testing multiple packages
The wrong method was being passed to resolution accidentally. Features specified
via `--features` and `--no-default-features` are spec'd as only applying to the
*current* package, not all packages.
Alex Crichton [Thu, 10 Nov 2016 23:44:39 +0000 (15:44 -0800)]
Fix passing --features when testing multiple packages
The wrong method was being passed to resolution accidentally. Features specified
via `--features` and `--no-default-features` are spec'd as only applying to the
*current* package, not all packages.
The reason doc.crates.io doesn't display correctly is that travis-cargo writes its own index.html that is just a meta-redirect to the api docs, overwriting cargo's own docs.
Mix feature flags into fingerprint/metadata shorthash
Since building dependencies results in different libraries
depending on the feature flags, I added the feature flags
into the short_hash. This solves an issue when multiple crates
share a target directory or multiple targets share a common
library with divergent feature flag choice.
- Only link binaries, build scripts, and top level deps
- Handle dylibs differently (no metadata filename / linking)
- Fingerprint based on link_dst rather than file_stem.
This (sadly) limits the effects of dep caching to things
which don't produce a hard-link. Currently, this is only dependent
library crates. Stil a big win.
bors [Mon, 7 Nov 2016 06:45:50 +0000 (22:45 -0800)]
Auto merge of #3239 - alexcrichton:travis, r=brson
Continuously publish Cargo builds
This commit tweaks Cargo's automation to continuously publish builds on Travis
an AppVeyor. Once this is merged we can hopefully turn off all buildbot
automation related to Cargo and purely rely on Travis and AppVeyor for this
repository. All CI matrices are ported over to Travis and AppVeyor and a new
musl build of Cargo is even added just to test out adding that for a spin.
Currently Cargo will upload the final artifact for each target to a directory
keyed by the commit hash to a new bucket on S3, rust-lang-cargo-dev. Once we're
happy with the builds then we can change this to `rust-lang-cargo` or anything
else at that point.
Alex Crichton [Tue, 25 Oct 2016 06:48:39 +0000 (23:48 -0700)]
Continuously publish Cargo builds
This commit tweaks Cargo's automation to continuously publish builds on Travis
an AppVeyor. Once this is merged we can hopefully turn off all buildbot
automation related to Cargo and purely rely on Travis and AppVeyor for this
repository. All CI matrices are ported over to Travis and AppVeyor and a new
musl build of Cargo is even added just to test out adding that for a spin.
Currently Cargo will upload the final artifact for each target to a directory
keyed by the commit hash to a new bucket on S3, rust-lang-cargo-dev. Once we're
happy with the builds then we can change this to `rust-lang-cargo` or anything
else at that point.
bors [Fri, 4 Nov 2016 20:42:09 +0000 (13:42 -0700)]
Auto merge of #3249 - matklad:workspace-profiles, r=alexcrichton
Use a single profile set per workspace
This aims to close #3206.
I have not figured out how to do this 100% backward compatibly, that's why I want to discuss this separately, although a related PR (#3221) is already in flight.
The problem is this: suppose that you have a workspace with two members, A and B and that A includes a profiles section and B does not. Now, mentally `cd` inside B and run `cargo build`. Today, Cargo will use a default profile. We want it to use a profile from A. So here the silent behavior switch will inevitably occur :( Looks like we can't detect this situation.
So this PR just switches the behavior to always use root profiles, and to print a warning if a non-root package specifies profiles. Feel free to reuse it in any form for #3221 if that's convenient!
bors [Fri, 4 Nov 2016 18:35:23 +0000 (11:35 -0700)]
Auto merge of #3253 - nipunn1313:exe, r=alexcrichton
Add an [EXE] hamcrest substitution for file extension
This should make the testing a bit more precise as to whether
we expect targets of the form foo.exe vs foo-abc123.exe. I
was also considering adding a [/] substitution for the fwd
slash vs backslash [..], but thought I would leave that to another PR
if we thought that was a good idea.
Add an [EXE] hamcrest substitution for file extension
This should make the testing a bit more precise as to whether
we expect targets of the form foo.exe vs foo-abc123.exe. I
was also considering adding a [/] substitution for the fwd
slash vs backslash [..], but thought I would leave that to another PR
if we thought that was a good idea.
This will in turn be used to communicate features like `-C
target-feature=+crt-static` which can be used to compile objects for statically
linking against the msvcrt on MSVC.
bors [Thu, 3 Nov 2016 02:12:37 +0000 (19:12 -0700)]
Auto merge of #3220 - alexcrichton:bad, r=brson
Load [replace] sections from lock files
This commit fixes a bug in Cargo where path-based [replace] dependencies were
accidentally not loaded from lock files. This meant that even with a lock
file some compilations could accidentally become nondeterministic. The fix here
is to just look at all path dependencies, even those specified through [replace]
bors [Thu, 3 Nov 2016 00:21:23 +0000 (17:21 -0700)]
Auto merge of #3175 - alexcrichton:bench-abort, r=brson
Ignore `panic` configuration for test/bench profiles
Both of these profiles link to libtest, so it's invalid to configure them with
`panic="abort"`. To prevent confusing errors just ignore the configuration for
now.
This will in turn be used to communicate features like `-C
target-feature=+crt-static` which can be used to compile objects for statically
linking against the msvcrt on MSVC.
Alex Crichton [Thu, 6 Oct 2016 22:32:15 +0000 (15:32 -0700)]
Ignore `panic` configuration for test/bench profiles
Both of these profiles link to libtest, so it's invalid to configure them with
`panic="abort"`. To prevent confusing errors just ignore the configuration for
now.
bors [Tue, 1 Nov 2016 23:06:35 +0000 (16:06 -0700)]
Auto merge of #3242 - jhbabon:cfgs-flags-per-package, r=alexcrichton
FIX: Call rustdoc test with the correct cfg flags of a package.
There was a situation in which if you you had a lib that depends on a package with features, whenever you ran the tests for the package the `rustdoc test` call was failing because it was called with the root `cfg` flags, not the package `cfg` flags.
This fix solves the issue by keeping track of the `cfg` flags per package, so the `rustdoc` command will be generated with the correct `cfg` flags.
Juan Hernández [Tue, 1 Nov 2016 17:14:41 +0000 (18:14 +0100)]
Relax conditions in rustdoc test cfg flags tests.
In Windows the rustdoc test output sets more double quotes, so
the test doesn't pass. We need to relax the test so it pass in
*NIX and Windows environments.
Juan Hernández [Mon, 31 Oct 2016 18:15:03 +0000 (19:15 +0100)]
FIX: Call rustdoc test with the correct cfg flags of a package.
There was a situation in which if you you had a lib that depends
on a package with features, whenever you ran the tests for the
package the `rustdoc test` call was failing because rustdoc
was called with the root cfg flags, not the package cfg flags.
This fix solves the issue by keeping track of the cfg flags
per package, so the rustdoc command will be generated with
the correct cfg flags.
bors [Mon, 31 Oct 2016 04:15:00 +0000 (21:15 -0700)]
Auto merge of #3213 - matklad:simler-locks, r=alexcrichton
Append only git checkouts
Ok, so this should fix #3209 by using a full git revision as the name of the checkout path.
I don't fully understand the code here, and I haven't thought about backwards/forwards compatibility hard, but the approach should be viable, and maybe even the implementation here is OK?
bors [Wed, 26 Oct 2016 15:45:29 +0000 (08:45 -0700)]
Auto merge of #3179 - alexcrichton:fix-features-mulitple, r=matklad
Parse --features in `cargo metadata` the same
This accidentally didn't accept space-separated features passed through
`--features` as the logic for doing the splitting wasn't shared. Let's share it!
bors [Wed, 26 Oct 2016 00:00:14 +0000 (17:00 -0700)]
Auto merge of #3217 - alexcrichton:fix-regression, r=brson
Ignore summaries in downloaded crates
Unfortunately historical Cargo bugs have made it such that the index sometimes
differs from the actual crate we download. Let's respect the index, however,
which should be our source of truth.
Alex Crichton [Thu, 20 Oct 2016 22:07:18 +0000 (15:07 -0700)]
Ignore summaries in downloaded crates
Unfortunately historical Cargo bugs have made it such that the index sometimes
differs from the actual crate we download. Let's respect the index, however,
which should be our source of truth.