Commit graph

4358 commits

Author SHA1 Message Date
bors 03efb7fc8b Auto merge of #3942 - aidanhs:aphs-no-interactive, r=alexcrichton
Remove docker flags that can cause issues

See rust-lang/rust#39036
2017-04-23 16:45:47 +00:00
Aidan Hobson Sayers 80d39ca5dd Remove docker flags that can cause issues (rust-lang/rust#39036) 2017-04-23 17:10:17 +01:00
bors 8326a3683a Auto merge of #3887 - luser:rustc-wrapper, r=alexcrichton
Add support for wrapping cargo's rustc invocations by setting RUSTC_WRAPPER

To use sccache for cargo builds we need a simple way to get sccache into the rustc commandline when cargo invokes rustc. Currently this is only possible by hard-linking or copying the `sccache` binary to be named `rustc` and then either setting `RUSTC` to its path or putting it first in `$PATH`, both of which are sort of clunky and require manual steps even if installing sccache via `cargo install`.

This patch adds support for a `RUSTC_WRAPPER` environment variable which, if set, will simply be inserted as the actual binary for all rustc process execution, with rustc and all other rustc arguments following.

I didn't add any tests for this, I couldn't figure out the right place to put them, and presumably we'd need to build a helper binary of some sort to use as the wrapper. If you've got suggestions for how to do that properly I'd be happy to write tests.

This works well in my local testing:
```
luser@eye7:/build/read-process-memory$ /build/cargo/target/release/cargo clean; time RUSTC_WRAPPER=/build/sccache2/target/release/sccache RUSTC=/home/luser/.rustup/toolchains/beta-x86_64-unknown-linux-gnu/bin/rustc /build/cargo/target/release/cargo build
   Compiling getopts v0.2.14
   Compiling log v0.3.6
   Compiling libc v0.2.16
   Compiling rand v0.3.14
   Compiling pulldown-cmark v0.0.3
   Compiling tempdir v0.3.5
   Compiling skeptic v0.5.0
   Compiling read-process-memory v0.1.2-pre (file:///build/read-process-memory)
    Finished dev [unoptimized + debuginfo] target(s) in 7.31 secs

real	0m7.733s
user	0m0.060s
sys	0m0.036s
luser@eye7:/build/read-process-memory$ /build/cargo/target/release/cargo clean; time RUSTC_WRAPPER=/build/sccache2/target/release/sccache RUSTC=/home/luser/.rustup/toolchains/beta-x86_64-unknown-linux-gnu/bin/rustc /build/cargo/target/release/cargo build
   Compiling getopts v0.2.14
   Compiling libc v0.2.16
   Compiling log v0.3.6
   Compiling pulldown-cmark v0.0.3
   Compiling rand v0.3.14
   Compiling tempdir v0.3.5
   Compiling skeptic v0.5.0
   Compiling read-process-memory v0.1.2-pre (file:///build/read-process-memory)
    Finished dev [unoptimized + debuginfo] target(s) in 0.97 secs

real	0m1.049s
user	0m0.060s
sys	0m0.036s
```

The use of beta rustc is just to pick up the fix for making `--emit=dep-info` faster (which should ship in 1.17). If this patch ships in cargo then in the future developers should simply be able to `cargo install sccache; export RUSTC_WRAPPER=sccache` and `cargo build` as normal, but benefit from local sccache caching.
2017-04-19 02:19:25 +00:00
bors 89ca25e1c0 Auto merge of #3926 - froydnj:reenable-nightly-tests, r=alexcrichton
re-enable previously nightly-only tests

These tests all play nicely with Rust 1.16.
2017-04-18 13:54:28 +00:00
Nathan Froyd 799515eb8e re-enable previously nightly-only tests
These tests all play nicely with Rust 1.16.
2017-04-18 09:42:47 -04:00
Ted Mielczarek 20f23d9074 Add support for wrapping cargo's rustc invocations by setting RUSTC_WRAPPER 2017-04-18 08:12:04 -04:00
bors 770512b08f Auto merge of #3928 - andwur:version-not-found-error-msgs, r=alexcrichton
Better error message when a package version is not found

This changes the error message when a package *is* found but there's no
matching version to be a little more helpful.

Old: "no matching package named `<dep name>`"
New: "no matching version `<version>` found for package `<dep name>`"

Fixes #2997
2017-04-18 06:12:37 +00:00
bors 01d403f34d Auto merge of #3924 - koivunej:issue_3922, r=alexcrichton
Adjust submodule updating failure reporting

This PR changes output of cargo when updating a dependency fails because of it's submodules cannot be loaded. In my original example this was caused by submodule pointing to a revision which was deleted by force pushing. Fixes #3922.

Before:

```
$ cargo check
    Updating git repository `<foo-url>`
error: failed to load source for a dependency on `foo`
Caused by:
  Unable to update <foo-url>?rev=hash
To learn more, run the command again with --verbose.
```

After:

```
$ cargo check
    Updating git repository `<foo-url>`
error: failed to load source for a dependency on `foo`
Caused by:
  Unable to update <foo-url>?rev=hash
Caused by:
  Failed to update submodule `submodule`
To learn more, run the command again with --verbose.
```

`--verbose` showing an additional `[9/-3] object not found - no match for id (hash)` has not been changed.

@alexcrichton since we have this nice timezone difference there was no chance of mentoring so far but any comments/suggestions are highly welcome. I'll likely check back on this next week.
2017-04-18 04:26:49 +00:00
bors 434e7a822c Auto merge of #3908 - froydnj:overflow-checks, r=alexcrichton
add `overflow-checks` field to profiles

...and pass `-C overflow-checks` to the compiler when necessary.

Fixes #2262.
2017-04-18 02:52:17 +00:00
bors 752172c71b Auto merge of #3930 - alexcrichton:more-clean, r=alexcrichton
Clean some more env vars during tests

Will be required to run tests as part of rust-lang/rust
2017-04-18 01:16:05 +00:00
Alex Crichton 63947f714b Clean some more env vars during tests
Will be required to run tests as part of rust-lang/rust
2017-04-17 17:55:59 -07:00
Andrew Watts f2b7fd73a9
Fix #2997: error message when version not found could be improved
This changes the error message when a package *is* found but there's no
matching version to be a little more helpful.

Old: "no matching package named `...`"
New: "no matching version `...` found for package `...`"
2017-04-17 22:11:11 +09:30
Joonas Koivunen c9f86804ef git: use lower case in error message 2017-04-17 15:08:51 +03:00
Nathan Froyd 803d748ac2 add overflow-checks field to profiles
...and pass `-C overflow-checks` to the compiler when necessary.

Fixes #2262.
2017-04-14 16:44:45 -04:00
Joonas Koivunen e9908c71e2 style fixes 2017-04-14 10:55:26 +03:00
Joonas Koivunen d31f24bdbb git: adjust error on submodule update failure
Now instead of reporting single generic "submodule update failed" a
dependency specific submodule update failed error message will be
reported and shown without --verbose.
2017-04-14 09:31:12 +03:00
Joonas Koivunen 072d89ecb4 git: refactor update_submodule out of loop 2017-04-14 08:38:36 +03:00
Joonas Koivunen d804b03afb reproduce error msg in test case 2017-04-14 06:58:02 +03:00
bors 0ba36c1c61 Auto merge of #3919 - malbarbo:openssl-probe, r=alexcrichton
Update openssl-probe to 0.1.1

This helps find ssl certificates on termux (android).
2017-04-12 22:28:57 +00:00
bors a3191554dd Auto merge of #3885 - malbarbo:android-build, r=alexcrichton
Add android build support

This add android build support, including openssl.
2017-04-12 20:24:43 +00:00
Marco A L Barbosa d5da19129b Update openssl-probe to 0.1.1 2017-04-12 16:50:30 -03:00
bors ec8e824895 Auto merge of #3847 - SergioBenitez:master, r=alexcrichton
Always emit build script warnings for crates that fail to build

Resolves #3777.

r? @alexcrichton
2017-04-12 19:03:16 +00:00
Marco A L Barbosa f723268c89 Remove android build for aarch64, arm and i686 2017-04-11 17:31:20 -03:00
Marco A L Barbosa 1f7ebd1e60 Add android build to travis 2017-04-11 17:22:12 -03:00
Marco A L Barbosa 2150518227 Add android Dockerfile 2017-04-11 17:22:12 -03:00
Marco A L Barbosa 62e47fefdc Add openssl build support for android 2017-04-11 17:22:12 -03:00
bors 28d218c4bf Auto merge of #3914 - jwilm:specifying-dependencies-replace-note, r=alexcrichton
Add note about Cargo.lock behavior with [replace]

The Cargo.lock behavior when using [replace] can be misleading if one
does not expect multiple versions of the crate to be included. This note
is intended to assure users that this behavior is expected, and it
suggests a way to verify their `[replace]` override is preferred.

I ran into this issue and ended up bugging @alexcrichton about it. Hopefully including this will reduce the support burden on cargo devs 😄.
2017-04-10 20:40:50 +00:00
Joe Wilm 1c4c4289f9 Add note about Cargo.lock behavior with [replace]
The Cargo.lock behavior when using [replace] can be misleading if one
does not expect multiple versions of the crate to be included. This note
is intended to assure users that this behavior is expected, and it
suggests a way to verify their `[replace]` override is preferred.
2017-04-10 13:24:31 -07:00
Ben Wiederhake 01782fe639 AllKinds tests: interoperability with '--all' 2017-04-10 20:20:32 +02:00
Ben Wiederhake 3f2ecb4a42 AllKinds tests: cargo-test 2017-04-10 20:20:32 +02:00
Ben Wiederhake 205a50dc88 AllKinds tests: cargo-bench, cargo-build 2017-04-10 20:20:32 +02:00
Ben Wiederhake abeb39c5ad AllKinds tests: cargo-run 2017-04-10 20:20:32 +02:00
Ben Wiederhake c98b8c4ce8 Ask for filter specifity instead of 'match' 2017-04-10 20:20:32 +02:00
Ben Wiederhake fcef7e2353 Adapt binaries to new cargo_compile API
Closes #3112.
2017-04-10 20:20:32 +02:00
Ben Wiederhake 2a82378a8b Extend Compile API to handle flags like --tests and --bins 2017-04-10 20:20:32 +02:00
bors da4fadf6be Auto merge of #3909 - JanLikar:fix/3876, r=alexcrichton
Improve "dirty" error message

Improve the error message stating the working directory has dirty files (files not yet committed).

Fix #3876.
2017-04-10 14:42:41 +00:00
Jan Likar ca1acc5727 Improve "dirty" error message
Improve the error message stating the working directory has dirty
files (files not yet committed).

Fix #3876.
2017-04-09 04:48:51 +02:00
Sergio Benitez 4adae9eb95 Always emit build script warnings for crates that fail to build
Resolves #3777
2017-04-08 19:09:14 -07:00
bors 0f697facf8 Auto merge of #3907 - waywardmonkeys:show-default-new, r=alexcrichton
Indicate that --lib is default for new, init.

I often forget for a moment which is the default behavior: `--bin` or `--lib`. This makes it clear in the usage text.
2017-04-08 23:07:02 +00:00
bors e5ffc0f1aa Auto merge of #3904 - tee-too:fix-3880, r=alexcrichton
Sort tests so that unit tests are run before integration tests

Fix #3880
2017-04-08 21:29:11 +00:00
bors ad8467de63 Auto merge of #3906 - waywardmonkeys:typo-fixes, r=alexcrichton
Fix typos.
2017-04-08 19:53:03 +00:00
Bruce Mitchener aead0291c8 Indicate that --lib is default for new, init. 2017-04-07 16:37:34 +07:00
Bruce Mitchener 18293f4a38 Fix typos. 2017-04-07 16:32:11 +07:00
tee-too cdaeb44ee7 Sort tests so that unit tests are run before integration tests
Fix #3880
2017-04-07 09:06:37 +02:00
bors c416fb60b1 Auto merge of #3898 - jmatraszek:fix_rust_40955, r=alexcrichton
Fix rust-lang/rust 40955

Proposed fix for rust-lang/rust#40955.

I could also work on adding some additional tests, so we have all cases covered and automatically tested.
2017-04-05 23:36:04 +00:00
Alex Crichton 2c9184d047 Touch up line lengths 2017-04-05 16:35:39 -07:00
Alex Crichton c6fb465628 Support vendor dirs with "empty" directories
Looks like when vendor directories are checked into a VCS there's been instances
where deleting a folder in the VCS doesn't fully delete the folder from the
filesystem. This can lead to [spurious errors][moz] that are difficult to debug.

To help handle this tweak directory sources to ignore empty directories or
directories with only dotfiles by default.

[moz]: https://bugzilla.mozilla.org/show_bug.cgi?id=1342292
2017-04-04 16:28:42 -07:00
Jakub Matraszek 277e08962d Fix rust 40955 2017-04-04 23:58:31 +02:00
bors f5348cc321 Auto merge of #3854 - tee-too:fix-3499, r=alexcrichton
Add `[target.'cfg(...)']` syntax for rustc(doc)flags in .cargo/config

Allow to use the Rust `cfg(...)` syntax to configure rust(doc)flags.
The flags are concatenated when a build matches several `cfg`, or
several `cfg` and a $triple.

Fix #3499.
2017-04-04 18:01:01 +00:00
tee-too e6e6f10e95 Add [target.'cfg(...)'] syntax for rustc(doc)flags in .cargo/config
Allow to use the Rust `cfg(...)` syntax to configure rust(doc)flags.
The flags are concatenated when a build matches several `cfg`, or
several `cfg` and a $triple.

Fix #3499.
2017-04-04 17:02:41 +02:00