Commit graph

4199 commits

Author SHA1 Message Date
Fabien Antoine 2b416a0ddb Refactorized code 2017-05-06 12:41:26 +02:00
Fabien Antoine 3d6de41774 Ignore malformed manifests on git dependencies 2017-05-05 11:53:56 +02:00
bors bc6fda5574 Auto merge of #3994 - matklad:blacklist, r=alexcrichton
Blacklist some binary names in `cargo new`

r? @alexcrichton

closes #3990
2017-05-04 14:10:01 +00:00
Aleksey Kladov 6633e2902f Blacklist some binary names in cargo new 2017-05-04 15:23:38 +03:00
bors 9fe7f07579 Auto merge of #3991 - alexcrichton:better-errors, r=matklad
Improve configuration load errors

Add some more context information on the backtrace
2017-05-03 19:38:36 +00:00
Alex Crichton 1db53b78fe Improve configuration load errors
Add some more context information on the backtrace
2017-05-03 10:00:30 -07:00
bors de52ccd535 Auto merge of #3951 - alexcrichton:lift-cdylib, r=alexcrichton
Don't use `-C metadata` cdylibs like we do with dylibs

Dylibs don't get any metadata/extra filename info applied to them as "final
targets" because it can mess with system-specific information (e.g. on OSX) so
this just applies the same logic to cdylibs which need similar treatment on more
platforms (like Windows).

Closes #3934
2017-05-02 18:35:07 +00:00
Alex Crichton fccaffb158 Don't use -C metadata cdylibs like we do with dylibs
Dylibs don't get any metadata/extra filename info applied to them as "final
targets" because it can mess with system-specific information (e.g. on OSX) so
this just applies the same logic to cdylibs which need similar treatment on more
platforms (like Windows).

Closes #3934
2017-05-02 08:52:07 -07:00
bors 8cc22d2c9d Auto merge of #3988 - sdroege:bench-all, r=alexcrichton
Add support for benchmarking all members of a workspace with "bench --all"

Same behaviour as "build --all" and others.

See https://github.com/rust-lang/cargo/issues/2878#issuecomment-298302043
2017-05-02 14:12:33 +00:00
Sebastian Dröge 952f3b584d Add tests for "bench --all"
These are basically the same as the ones from "test --all" and "doc --all"
2017-05-02 16:50:14 +03:00
Sebastian Dröge c8f08b13a4 Add support for benchmarking all members of a workspace with "bench --all"
Same behaviour as "build --all" and others.
2017-05-02 16:46:01 +03:00
bors 7cfeec1aaa Auto merge of #3980 - Keruspe:master, r=alexcrichton
update libgit2-sys for libressl compat
2017-04-30 08:23:23 +00:00
Marc-Antoine Perennou 5d76dd233e fix build-auth test
libgit2 somehow reverted the version back to 0.25.0 after the 0.25.1 release

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-04-30 08:51:19 +02:00
Marc-Antoine Perennou f8d2883618 update libgit2-sys for libressl compat
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-04-30 08:08:23 +02:00
bors 6b6dc8e10a Auto merge of #3977 - rap2hpoutre:patch-1, r=alexcrichton
Added a base font size

See https://github.com/rust-lang/crates.io/pull/689 (ping @carols10cents)

A base font size was added to crates.io, here is the same addition for docs.crate.io
2017-04-29 17:42:46 +00:00
Raphaël Huchet fd19163c9e Added a base font size 2017-04-29 12:42:56 +02:00
bors bb970dc0da Auto merge of #3970 - golddranks:master, r=alexcrichton
exec (replace the current process) external subcommands instead of running them as child processes.

This fixes https://github.com/rust-lang/cargo/issues/3959 (tested to be working with my yet-to-be-published subcommand, and tested not to break things with `cargo tree` and `cargo outdated`).
2017-04-28 16:26:07 +00:00
Pyry Kontio ca0fc8dc08 exec (replace the current process) external subommands instead of running them as child processes. 2017-04-28 14:09:27 +09:00
bors 04574f0d18 Auto merge of #3963 - alexcrichton:bump, r=alexcrichton
Bump to 0.20.0
2017-04-28 03:12:07 +00:00
Alex Crichton 2dd168c14e Bump to 0.20.0 2017-04-27 20:11:52 -07:00
bors 67cb898b86 Auto merge of #3964 - alexcrichton:update-deps, r=alexcrichton
Update dependencies Cargo uses

Namely update to serde 1.0.0!
2017-04-27 19:22:49 +00:00
Alex Crichton 0b59f17d63 Update dependencies Cargo uses
Namely update to serde 1.0.0!
2017-04-27 12:06:34 -07:00
bors a8b8b9fd88 Auto merge of #3961 - malbarbo:android-x86_64, r=alexcrichton
Bump time (0.1.37) and libc (0.2.22)
2017-04-27 14:48:32 +00:00
Marco A L Barbosa f125e4d7c5 Bump time (0.1.37) and libc (0.2.22) 2017-04-27 11:46:45 -03:00
bors fa7584c149 Auto merge of #3921 - alexcrichton:less-asserts, r=matklad
Relax overly strict asserts in dependency queue

Don't actually need to assert that these are unique, it works both ways and we
can have flavorful dependency graphs which otherwise trigger the assertions.

Closes #3902
2017-04-26 20:42:15 +00:00
bors 06708ffa44 Auto merge of #3899 - alexcrichton:vendor-empty-ok, r=matklad
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-26 15:10:04 +00:00
Alex Crichton 2511141450 Relax overly strict asserts in dependency queue
Don't actually need to assert that these are unique, it works both ways and we
can have flavorful dependency graphs which otherwise trigger the assertions.

Closes #3902
2017-04-26 07:09:14 -07:00
bors 80e653b511 Auto merge of #3955 - RReverser:update-override-docs, r=alexcrichton
Update documentation on overrides

 - `target.linker` does not seem to be supported anymore, only `target.$triple.linker` works, so merged these sections.
 - Added note about supported `target.$triple.ar`
2017-04-26 07:25:16 +00:00
bors 0f27ca344d Auto merge of #3947 - matklad:bench-bench, r=alexcrichton
Allow test named `test`

Looks like `srt/test.rs` and `src/bench.rs` used to be default
integraion test and benchmark, but they no longer are.

closes #3932
2017-04-26 05:48:11 +00:00
bors f41cb68694 Auto merge of #3956 - jessicah:update-num-cpus-dep, r=alexcrichton
Update num_cpus to 1.4.0 (adds support for Haiku)

This will bring it inline with rustc: https://github.com/rust-lang/rust/pull/41552
2017-04-26 03:32:21 +00:00
Jessica Hamilton f463e3c747 Update num_cpus to 1.4.0 (adds support for Haiku) 2017-04-26 15:29:44 +12:00
Ingvar Stepanyan 841fd82114 Update documentation on overrides
- target.linker does not seem to be supported anymore, only target.$triple.linker works, so merged these sections.
 - Added note about supported target.$triple.ar
2017-04-26 01:33:16 +01:00
bors 6c510b0631 Auto merge of #3953 - jessicah:haiku-renaming-fix, r=alexcrichton
Haiku: skip renaming if filenames are the same
2017-04-25 15:59:59 +00:00
Jessica Hamilton 54b968e598 Haiku: skip renaming if filenames are the same 2017-04-25 23:15:41 +00:00
Jessica Hamilton 3aaed3871c Haiku: doesn't have SIG_SYS 2017-04-25 16:50:44 +00:00
Jessica Hamilton 0fe69452ce Haiku: use LIBRARY_PATH in configure 2017-04-25 16:50:41 +00:00
bors 994e552f1f Auto merge of #3952 - jessicah:haiku-support, r=alexcrichton
Haiku support
2017-04-25 05:36:08 +00:00
bors 2064245e6a Auto merge of #3948 - alexcrichton:update-deps, r=alexcrichton
Update dependencies in Cargo.lock

This also fixes a few CVEs reported with libcurl and libgit2, so pulling in those updates.
2017-04-24 19:11:49 +00:00
bors b987ce4f26 Auto merge of #3901 - BenWiederhake:all-kinds, r=alexcrichton
Implementation and CLI-support for `--all-$KIND` flags

This implements #3112.

This means all of the following commands are now possible and meaningful:
```
cargo build --all-bins
cargo build --all-tests
cargo test --all-tests
cargo test --all-bins
cargo check --all-bins --all-examples --all-tests --all-benches
```

The commits try to represent the incremental "propagation" of the new feature:
- core functionality (`cargo check --lib` passes)
- CLI suport (`cargo build` passes)
- additional tests (`cargo test` covers new functionality)

Note that `--all` is already reserved to mean "all packages of the workspace", so it can't be used to mean `--all-bins --all-examples --all-tests --all-benches`.

I intend to follow this up by some other PRs, so please do tell me where I could improve.
2017-04-24 17:11:58 +00:00
Alex Crichton f881e863b1 Update dependencies in Cargo.lock 2017-04-24 07:32:53 -07:00
Aleksey Kladov 74deb6e065 Allow test named test
Looks like `srt/test.rs` and `src/bench.rs` used to be default
integraion test and benchmark, but they no longer are.
2017-04-24 15:37:37 +03:00
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