Alex Crichton [Wed, 23 Nov 2016 16:29:36 +0000 (08:29 -0800)]
Emit more info on --message-format=json
This adds more output on Cargo's behalf to the output of
`--message-format=json`. Cargo will now emit a message when a crate is finished
compiling with a list of all files that were just generated along with a message
when a build script finishes executing with linked libraries and linked library
paths.
bors [Fri, 2 Dec 2016 14:37:52 +0000 (14:37 +0000)]
Auto merge of #3348 - alexcrichton:fix-checksums, r=brson
Fix retrying crate downloads for network errors
Previously the `with_retry` loop was a little too tight where stale state about
the sha256 and data was kept out of the loop. Instead we need to reinitialize
these on each iteration of the loop to ensure that we correctly retry by
forgetting the data we previously downloaded for an aborted download attempt.
bors [Fri, 2 Dec 2016 12:15:18 +0000 (12:15 +0000)]
Auto merge of #3335 - alexcrichton:fix-xcomiple, r=brson
Add host dependency path via -L for cross compiles
Now that proc-macro crates can reexport from their dependencies we need to be
able to find the other crates, so ensure that we pass an appropriate -L flag.
Alex Crichton [Mon, 28 Nov 2016 15:27:14 +0000 (07:27 -0800)]
Add host dependency path via -L for cross compiles
Now that proc-macro crates can reexport from their dependencies we need to be
able to find the other crates, so ensure that we pass an appropriate -L flag.
bors [Fri, 2 Dec 2016 03:20:54 +0000 (03:20 +0000)]
Auto merge of #3336 - alexcrichton:fix-warning, r=brson
Test for bad path overrides with summaries
Bad path overrides are currently detected to issue warnings in cases where path
overrides are not suitable and have exhibited buggy behavior in the past.
Unfortunately though it looks like some false positives are being issued,
causing unnecessary confusion about `paths` overrides.
This commit fixes the detection of these "bad path overrides" by comparing
`Summary` dependencies (what's written down in `Cargo.toml`) rather than
comparing the `Cargo.toml` of the override with `Cargo.lock`. We're guaranteed
that the package we're overridding has already been resolved into `Cargo.lock`,
so we know that if the two `Cargo.toml` files are equivalent we'll continue
with the same crate graph.
I'm not actually entirely sure why I originally thought it'd be better to go
through the `Cargo.lock` comparison route. Unfortunately that doesn't take into
account optional deps which aren't in `Cargo.lock` but are in `Cargo.toml` of
the override, causing the false positive. This method, however, simply ensures
that the two dependency lists are the same.
bors [Fri, 2 Dec 2016 00:05:12 +0000 (00:05 +0000)]
Auto merge of #3310 - alexcrichton:more-metadata-hashing, r=brson
Apply new fingerprinting to build dir outputs
We now much more aggressively cache the output of the compiler based on feature
sets and profile configuration. Unfortunately we forgot to extend this caching
to build script output directories as well so this commit ensures that build
script outputs are cached the same way with a directory per configuration of
features and output settings.
bors [Thu, 1 Dec 2016 07:49:11 +0000 (07:49 +0000)]
Auto merge of #3350 - alexcrichton:more-tweaks, r=alexcrichton
Slight tweaks to CI
* Pass `--quiet` to all tests to have some quieter output
* Skip builds on the `master` branch as `auto` is already checked
* Check the right env var for repo branches on appveyor
Alex Crichton [Wed, 30 Nov 2016 19:12:49 +0000 (11:12 -0800)]
Slight tweaks to CI
* Pass `--quiet` to all tests to have some quieter output
* Skip builds on branches other than `auto-cargo` as it's already checked
* Check the right env var for repo branches on appveyor
* Only run a few builds on PRs
Alex Crichton [Wed, 30 Nov 2016 00:52:20 +0000 (16:52 -0800)]
Fix retrying crate downloads for network errors
Previously the `with_retry` loop was a little too tight where stale state about
the sha256 and data was kept out of the loop. Instead we need to reinitialize
these on each iteration of the loop to ensure that we correctly retry by
forgetting the data we previously downloaded for an aborted download attempt.
bors [Wed, 30 Nov 2016 18:16:39 +0000 (18:16 +0000)]
Auto merge of #3345 - alexcrichton:release-branches, r=alexcrichton
Add support for release branches in Cargo
Follow the same strategy as the compiler for now in basically every respect:
* Add new `--release-channel` configure option, defaulting to `dev`
* Remove old `--enable-nightly`
* Add `--enable-build-openssl` as an orthogonal option
* Hook up Travis/AppVeyor to stable/beta/master branches to do the right
channel builds.
Alex Crichton [Tue, 29 Nov 2016 14:36:31 +0000 (06:36 -0800)]
Add support for release branches in Cargo
Follow the same strategy as the compiler for now in basically every respect:
* Add new `--release-channel` configure option, defaulting to `dev`
* Remove old `--enable-nightly`
* Add `--enable-build-openssl` as an orthogonal option
* Hook up Travis/AppVeyor to stable/beta/master branches to do the right
channel builds.
Another test update for the argument order changetest update for the argument order change. Please enter the commit message for your changes. Lines starting
bors [Tue, 29 Nov 2016 01:03:38 +0000 (19:03 -0600)]
Auto merge of #3342 - alexcrichton:fix-ssl, r=alexcrichton
Bump git2 dep to fix SSL paths
This commit includes alexcrichton/git2-rs@a8f4a7faa which switches the order of
initialization of libgit2. That commit ensures that the relevant env vars which
a statically linked OpenSSL needs to function are set before libgit2 is
initialized to ensure that libgit2 uses them.
This was regressed accidentally in alexcrichton/git2-rs@071902aa when
initialization was tweaked.
Alex Crichton [Mon, 28 Nov 2016 23:48:10 +0000 (15:48 -0800)]
Bump git2 dep to fix SSL paths
This commit includes alexcrichton/git2-rs@a8f4a7faa which switches the order of
initialization of libgit2. That commit ensures that the relevant env vars which
a statically linked OpenSSL needs to function are set before libgit2 is
initialized to ensure that libgit2 uses them.
This was regressed accidentally in alexcrichton/git2-rs@071902aa when
initialization was tweaked.
Alex Crichton [Mon, 21 Nov 2016 20:32:10 +0000 (12:32 -0800)]
Apply new fingerprinting to build dir outputs
We now much more aggressively cache the output of the compiler based on feature
sets and profile configuration. Unfortunately we forgot to extend this caching
to build script output directories as well so this commit ensures that build
script outputs are cached the same way with a directory per configuration of
features and output settings.
Alex Crichton [Mon, 21 Nov 2016 18:05:55 +0000 (10:05 -0800)]
Refactor metadata generation
Remove generation all the way in manifest-parsing and defer it until we actually
need it during compilation. Additionally remove lots of weird logic that's no
longer necessary that we're hashing quite a few fields.
Alex Crichton [Mon, 28 Nov 2016 16:51:36 +0000 (08:51 -0800)]
Test for bad path overrides with summaries
Bad path overrides are currently detected to issue warnings in cases where path
overrides are not suitable and have exhibited buggy behavior in the past.
Unfortunately though it looks like some false positives are being issued,
causing unnecessary confusion about `paths` overrides.
This commit fixes the detection of these "bad path overrides" by comparing
`Summary` dependencies (what's written down in `Cargo.toml`) rather than
comparing the `Cargo.toml` of the override with `Cargo.lock`. We're guaranteed
that the package we're overridding has already been resolved into `Cargo.lock`,
so we know that if the two `Cargo.toml` files are equivalent we'll continue
with the same crate graph.
I'm not actually entirely sure why I originally thought it'd be better to go
through the `Cargo.lock` comparison route. Unfortunately that doesn't take into
account optional deps which aren't in `Cargo.lock` but are in `Cargo.toml` of
the override, causing the false positive. This method, however, simply ensures
that the two dependency lists are the same.
bors [Sat, 26 Nov 2016 23:40:40 +0000 (17:40 -0600)]
Auto merge of #3332 - alexcrichton:build-openssl, r=alexcrichton
Compile OpenSSL from source on OSX
I'm seeing a bunch of weird illegal instructions on OSX nightlies for
Cargo. My guess is that they're all related to OpenSSL linking. Right
now we're linking from Homebrew but I have a sneaking suspicion that it
compiles with `-march=native` rather than what we'd like as a portable
binary. To work around this compile OpenSSL ourselves and link it that
way.
Note that I believe this won't bring in the certificate trust store of
OpenSSL on OSX (or at least not the right one from the keychain). We
shouldn't need that, however, as OpenSSL is just used as the
cryptographic primitives in libssh2 and Cargo itself. So in that sense
we shouldn't need it for actually SSL at all.
Alex Crichton [Sat, 26 Nov 2016 22:37:27 +0000 (14:37 -0800)]
Compile OpenSSL from source on OSX
I'm seeing a bunch of weird illegal instructions on OSX nightlies for
Cargo. My guess is that they're all related to OpenSSL linking. Right
now we're linking from Homebrew but I have a sneaking suspicion that it
compiles with `-march=native` rather than what we'd like as a portable
binary. To work around this compile OpenSSL ourselves and link it that
way.
Note that I believe this won't bring in the certificate trust store of
OpenSSL on OSX (or at least not the right one from the keychain). We
shouldn't need that, however, as OpenSSL is just used as the
cryptographic primitives in libssh2 and Cargo itself. So in that sense
we shouldn't need it for actually SSL at all.
bors [Sat, 26 Nov 2016 17:12:07 +0000 (11:12 -0600)]
Auto merge of #3331 - alexcrichton:fix-segfaults, r=alexcrichton
Update git2 fixing initialization races
This updates libgit2/libssh2 bindings to fix initialization races in
OpenSSL. This should fix some of the spurious segfaults we've been
seeing on Travis OSX.
Alex Crichton [Sat, 26 Nov 2016 17:11:08 +0000 (09:11 -0800)]
Update git2 fixing initialization races
This updates libgit2/libssh2 bindings to fix initialization races in
OpenSSL. This should fix some of the spurious segfaults we've been
seeing on Travis OSX.
bors [Wed, 23 Nov 2016 05:41:52 +0000 (23:41 -0600)]
Auto merge of #3315 - alexcrichton:fix-travis, r=alexcrichton
Really fix OSX nightlies
After #3311 we're now correctly trying to link OpenSSL statically on
OSX. Unfortunately though this is failing to complete on the builders.
Turns out the way we install OpenSSL through Homebrew create "universal
archives" which is essentially an archive with both i686 and x86_64
object files, but separated. The linker takes care of this just fine but
rustc currently chokes on it, unable to include the library statically
into the compiler.
To work around this we prepare our own mini install of OpenSSL by
copying relevant bits into a local directory (like we do on Linux). As
part of this we use the `lipo` tool, which is used to manage these fat
archives, to disassemble the archive and only extract the relevant
architecture. This should make a pre-installation step which both
extracts the information and configures Cargo to use it.
This should also fix the errors we're seeing on Travis I believe.
Alex Crichton [Wed, 23 Nov 2016 05:37:26 +0000 (21:37 -0800)]
Really fix OSX nightlies
After #3311 we're now correctly trying to link OpenSSL statically on
OSX. Unfortunately though this is failing to complete on the builders.
Turns out the way we install OpenSSL through Homebrew create "universal
archives" which is essentially an archive with both i686 and x86_64
object files, but separated. The linker takes care of this just fine but
rustc currently chokes on it, unable to include the library statically
into the compiler.
To work around this we prepare our own mini install of OpenSSL by
copying relevant bits into a local directory (like we do on Linux). As
part of this we use the `lipo` tool, which is used to manage these fat
archives, to disassemble the archive and only extract the relevant
architecture. This should make a pre-installation step which both
extracts the information and configures Cargo to use it.
This should also fix the errors we're seeing on Travis I believe.
bors [Mon, 21 Nov 2016 21:18:02 +0000 (15:18 -0600)]
Auto merge of #3311 - alexcrichton:fix-nightlies, r=brson
Link OpenSSL statically on OSX
Now that Cargo requires OpenSSL >= 1.0.1 transitively through the `openssl-sys`
0.9 release the dynamic libraries for OpenSSL are no longer located on OSX by
default. This means that the support necessary for libssh2 needs to be
statically linked rather than dynamically linked.
Alex Crichton [Mon, 21 Nov 2016 20:36:30 +0000 (12:36 -0800)]
Link OpenSSL statically on OSX
Now that Cargo requires OpenSSL >= 1.0.1 transitively through the `openssl-sys`
0.9 release the dynamic libraries for OpenSSL are no longer located on OSX by
default. This means that the support necessary for libssh2 needs to be
statically linked rather than dynamically linked.
bors [Fri, 18 Nov 2016 20:32:20 +0000 (12:32 -0800)]
Auto merge of #3251 - alexcrichton:fix-regr, r=brson
Fix regression with path overrides
If an override points to a path dependency then that's not locked, so we're
missing information for that, but it's already warned about, so no need to
worry.
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).
Alex Crichton [Fri, 4 Nov 2016 00:00:13 +0000 (17:00 -0700)]
Fix regression with path overrides
If an override points to a path dependency then that's not locked, so we're
missing information for that, but it's already warned about, so no need to
worry.
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.