]> git.proxmox.com Git - cargo.git/log
cargo.git
7 years agoClarify error for repo-based dependencies when publishing.
Bryant Mairs [Fri, 27 Jan 2017 17:54:43 +0000 (09:54 -0800)]
Clarify error for repo-based dependencies when publishing.

Specifically add a description of how to resolve the error.

7 years agoAuto merge of #3600 - onur:fix-link, r=alexcrichton
bors [Fri, 27 Jan 2017 05:50:12 +0000 (05:50 +0000)]
Auto merge of #3600 - onur:fix-link, r=alexcrichton

Fix crates.io link under specifying dependencies

I just realized when I was replying to #2947, second crates.io link under "Specifying path dependencies" is not working.

And TBH the phrase in parentheses is unclear for me.

cc @carols10cents

7 years agoAuto merge of #3598 - pornel:proxyconf, r=alexcrichton
bors [Fri, 27 Jan 2017 03:56:09 +0000 (03:56 +0000)]
Auto merge of #3598 - pornel:proxyconf, r=alexcrichton

Example proxy config

#3596

7 years agoAuto merge of #3601 - alexcrichton:bump-openssl, r=brson
bors [Fri, 27 Jan 2017 01:42:39 +0000 (01:42 +0000)]
Auto merge of #3601 - alexcrichton:bump-openssl, r=brson

Update OpenSSL to 1.0.2k

Updates in accordance with the security advisory issued today.

7 years agoUpdate OpenSSL to 1.0.2k
Alex Crichton [Fri, 27 Jan 2017 00:07:14 +0000 (16:07 -0800)]
Update OpenSSL to 1.0.2k

Updates in accordance with the security advisory issued today.

7 years agoFix crates.io link under specifying dependencies
Onur Aslan [Thu, 26 Jan 2017 23:35:50 +0000 (01:35 +0200)]
Fix crates.io link under specifying dependencies

7 years agoExample proxy config
Kornel Lesiński [Thu, 26 Jan 2017 23:28:56 +0000 (23:28 +0000)]
Example proxy config

#3596

7 years agoAuto merge of #3597 - Susurrus:badge_docs, r=alexcrichton
bors [Thu, 26 Jan 2017 22:27:33 +0000 (22:27 +0000)]
Auto merge of #3597 - Susurrus:badge_docs, r=alexcrichton

Add gitlab to the supported services for AppVeyor badges.

This is undocumented but supported behavior for AppVeyor. I have already done this with a crate I own and the badge works on both the AppVeyor and crates.io end.

7 years agoAdd gitlab to the supported services for AppVeyor badges.
Bryant Mairs [Thu, 26 Jan 2017 22:12:58 +0000 (14:12 -0800)]
Add gitlab to the supported services for AppVeyor badges.

This is undocumented but supported behavior for AppVeyor.

7 years agoAuto merge of #3588 - birkenfeld:issue3587, r=alexcrichton
bors [Wed, 25 Jan 2017 23:05:13 +0000 (23:05 +0000)]
Auto merge of #3588 - birkenfeld:issue3587, r=alexcrichton

Show new version of package on overwrite error

Fixes #3587

7 years agoShow version of package to be installed (before potential overwrite errors)
Georg Brandl [Tue, 24 Jan 2017 06:49:50 +0000 (07:49 +0100)]
Show version of package to be installed (before potential overwrite errors)

Fixes #3587

7 years agoAuto merge of #3582 - KalitaAlexey:add-info-about-examples-as-libraries, r=alexcrichton
bors [Wed, 25 Jan 2017 19:04:30 +0000 (19:04 +0000)]
Auto merge of #3582 - KalitaAlexey:add-info-about-examples-as-libraries, r=alexcrichton

Added information about examples as libraries to the documentation

[Allow examples to be library](https://github.com/rust-lang/cargo/pull/3556) has been committed.
The PR adds information to the documentation.

7 years agoFixed error
Kalita Alexey [Wed, 25 Jan 2017 06:52:59 +0000 (09:52 +0300)]
Fixed error

7 years agoAuto merge of #3589 - mathstuf:repository-docs-clarify, r=alexcrichton
bors [Tue, 24 Jan 2017 18:20:29 +0000 (18:20 +0000)]
Auto merge of #3589 - mathstuf:repository-docs-clarify, r=alexcrichton

doc/manifest: clarify the meaning of the URLs

7 years agoFixed comments
Kalita Alexey [Tue, 24 Jan 2017 16:40:20 +0000 (19:40 +0300)]
Fixed comments
[ci skip]

7 years agodoc/manifest: clarify the meaning of the URLs
Ben Boeckel [Tue, 24 Jan 2017 16:23:02 +0000 (11:23 -0500)]
doc/manifest: clarify the meaning of the URLs

7 years agoAdded information about examples as libraries to the documentation
Kalita Alexey [Mon, 23 Jan 2017 08:45:11 +0000 (11:45 +0300)]
Added information about examples as libraries to the documentation

7 years agoAuto merge of #3570 - integer32llc:fix-slug-link, r=alexcrichton
bors [Sat, 21 Jan 2017 00:59:01 +0000 (00:59 +0000)]
Auto merge of #3570 - integer32llc:fix-slug-link, r=alexcrichton

Link to the category slugs page from the docs instead

Oops, just noticed that I didn't change this link in the docs when we changed to specifying slugs for categories in `Cargo.toml` :-/

7 years agoAuto merge of #3569 - malept:manifest-example-typo-fix, r=alexcrichton
bors [Fri, 20 Jan 2017 23:02:02 +0000 (23:02 +0000)]
Auto merge of #3569 - malept:manifest-example-typo-fix, r=alexcrichton

Fix typo in badges section of example manifest

Extremely small typo I saw when I was looking at the new badges feature.

7 years agoLink to the category slugs page from the docs instead
Carol (Nichols || Goulding) [Fri, 20 Jan 2017 21:19:30 +0000 (16:19 -0500)]
Link to the category slugs page from the docs instead

7 years agoAuto merge of #3556 - KalitaAlexey:allow-examples-to-be-library, r=alexcrichton
bors [Fri, 20 Jan 2017 20:57:21 +0000 (20:57 +0000)]
Auto merge of #3556 - KalitaAlexey:allow-examples-to-be-library, r=alexcrichton

Allow examples to be library

This PR allows to specify **crate-type** to an example in **Cargo.toml**.
After this PR an example's **crate-type** can be:

* lib
* rlib
* dylib
* proc-macro

Please look at src/cargo/core/manifest.rs:116 because I am not sure whether I done it right.

I haven't added any tests.
I'd like to add them if someone says me how to do that.

Fixes #2358.

7 years agoFix typo in badges section of example manifest
Mark Lee [Fri, 20 Jan 2017 19:09:11 +0000 (11:09 -0800)]
Fix typo in badges section of example manifest

7 years agoAuto merge of #3554 - bmwiedemann:patch-1, r=alexcrichton
bors [Fri, 20 Jan 2017 18:48:12 +0000 (18:48 +0000)]
Auto merge of #3554 - bmwiedemann:patch-1, r=alexcrichton

make build reproducible

see https://reproducible-builds.org/ for why this is good
and https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Bash_.2F_POSIX_shell for variants that also work on BSD

7 years agoMerge branch 'master' into allow-examples-to-be-library
Alexey [Fri, 20 Jan 2017 17:27:25 +0000 (21:27 +0400)]
Merge branch 'master' into allow-examples-to-be-library

7 years agoAuto merge of #3568 - alexcrichton:fix-small, r=alexcrichton
bors [Fri, 20 Jan 2017 16:51:03 +0000 (16:51 +0000)]
Auto merge of #3568 - alexcrichton:fix-small, r=alexcrichton

Update travis token and fix warning

7 years agoUpdate travis token and fix warning
Alex Crichton [Fri, 20 Jan 2017 16:49:30 +0000 (08:49 -0800)]
Update travis token and fix warning

7 years agomake build reproducible
Bernhard M. Wiedemann [Tue, 17 Jan 2017 14:53:45 +0000 (14:53 +0000)]
make build reproducible

by allowing build systems to use a constant date instead of the current one
see https://reproducible-builds.org/ for why this is good

This call is designed to work with both GNU date and BSD date implementations

7 years agoFixed the test
Kalita Alexey [Fri, 20 Jan 2017 06:50:13 +0000 (09:50 +0300)]
Fixed the test

7 years agoFixed tests and removed the unnecessary comment
Kalita Alexey [Fri, 20 Jan 2017 05:12:12 +0000 (08:12 +0300)]
Fixed tests and removed the unnecessary comment

7 years agoAuto merge of #3565 - integer32llc:fix-gh-pages, r=alexcrichton
bors [Thu, 19 Jan 2017 23:43:24 +0000 (23:43 +0000)]
Auto merge of #3565 - integer32llc:fix-gh-pages, r=alexcrichton

Fix doc publishing: Remove $USER from the --user argument from pip install

[This looks to be the cause of why docs aren't publishing to gh-pages](https://travis-ci.org/rust-lang/cargo/jobs/193507734#L1059). I was able to publish the docs to [my repo's gh-pages](https://integer32llc.github.io/cargo/) with this change (and setting my own secure gh-token).

It looks like this problem got introduced [in this commit](https://github.com/rust-lang/cargo/commit/dc15ca5d202d6d10f6be45f388759a902723de6c). I don't really know python/pip, but `$USER` wasn't there before and [Travis' docs just say `--user`](https://docs.travis-ci.com/user/languages/python/#pip).

7 years agoRemove $USER from the --user argument from pip install
Carol (Nichols || Goulding) [Thu, 19 Jan 2017 21:11:41 +0000 (16:11 -0500)]
Remove $USER from the --user argument from pip install

7 years agoFixed tests
Kalita Alexey [Thu, 19 Jan 2017 20:43:56 +0000 (23:43 +0300)]
Fixed tests

7 years agoAuto merge of #3563 - alexcrichton:upload-docs-again, r=alexcrichton
bors [Thu, 19 Jan 2017 19:03:13 +0000 (19:03 +0000)]
Auto merge of #3563 - alexcrichton:upload-docs-again, r=alexcrichton

Run full Travis builds on all non-PR branches

This'll result in duplicate work when merging, but otherwise we're not uploading
docs.

7 years agoRun full Travis builds on all non-PR branches
Alex Crichton [Thu, 19 Jan 2017 17:02:19 +0000 (09:02 -0800)]
Run full Travis builds on all non-PR branches

This'll result in duplicate work when merging, but otherwise we're not uploading
docs.

7 years agoAuto merge of #3560 - KalitaAlexey:make-doc-subcommand-print-duration, r=alexcrichton
bors [Wed, 18 Jan 2017 23:01:03 +0000 (23:01 +0000)]
Auto merge of #3560 - KalitaAlexey:make-doc-subcommand-print-duration, r=alexcrichton

Made doc subcommand print duration

This PR makes `cargo doc` print duration.
Fixes #3016.

7 years agoMade doc subcommand print duration
Kalita Alexey [Wed, 18 Jan 2017 19:37:52 +0000 (22:37 +0300)]
Made doc subcommand print duration

7 years agoAuto merge of #3558 - matklad:fix-test, r=alexcrichton
bors [Wed, 18 Jan 2017 18:12:21 +0000 (18:12 +0000)]
Auto merge of #3558 - matklad:fix-test, r=alexcrichton

Fix a test.

That's the test we've discussed in #3443

7 years agoAdded tests for building an example as a library
Kalita Alexey [Wed, 18 Jan 2017 07:56:22 +0000 (10:56 +0300)]
Added tests for building an example as a library

7 years agoFixed style issues
Kalita Alexey [Wed, 18 Jan 2017 07:56:11 +0000 (10:56 +0300)]
Fixed style issues

7 years agoFix a test.
Aleksey Kladov [Mon, 16 Jan 2017 23:05:32 +0000 (02:05 +0300)]
Fix a test.

Presumably, it should failed when it was first written, but Cargo does not do such validation yet.

7 years agoAuto merge of #3552 - keeperofdakeys:proc-macro-doc-test, r=alexcrichton
bors [Wed, 18 Jan 2017 02:45:13 +0000 (02:45 +0000)]
Auto merge of #3552 - keeperofdakeys:proc-macro-doc-test, r=alexcrichton

Allow doc tests to run on proc macro crates

Fixes https://github.com/rust-lang/cargo/issues/3545

Since `--test` works for rustc, doctests should also work. Currently cargo isn't setup to run doctests for proc macro crates, this PR adds them to the list.

Currently rustdoc can run doctests for proc-macro crates, but the `phase_2_configure_and_expand` call` triggers the following warning:

```
the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type
```

So perhaps this PR should wait until I've finished creating/testing the PR for rustc.

7 years agoAuto merge of #3443 - matklad:path-dep-non-ws, r=alexcrichton
bors [Wed, 18 Jan 2017 00:22:59 +0000 (00:22 +0000)]
Auto merge of #3443 - matklad:path-dep-non-ws, r=alexcrichton

Path deps outside workspace are not members

closes #3192

This implements @Boscop suggestion: path dependencies pointing outside the workspace are never members.

Not sure that it handled #3192 fully: you can't exclude a path dependency within workspace. Not sure this is super useful though...

7 years agoAdd tests for doc testing proc macro crates
Josh [Tue, 17 Jan 2017 23:48:35 +0000 (10:48 +1100)]
Add tests for doc testing proc macro crates

7 years agoAuto merge of #3546 - integer32llc:badgers, r=alexcrichton
bors [Tue, 17 Jan 2017 22:40:07 +0000 (22:40 +0000)]
Auto merge of #3546 - integer32llc:badgers, r=alexcrichton

Upload Travis CI and Appveyor badge metadata specified in the manifest

This goes with rust-lang/crates.io#504. This has cargo upload badge metadata to crates.io on publish, and will print any warnings it gets back from crates.io about unknown badges or missing required badge attributes!

This will definitely cause some merge conflicts with #3301, I'll watch and fix whichever one gets merged 2nd :)

7 years agoUpload badge metadata specified in the manifest
Jake Goulding [Sun, 1 Jan 2017 20:14:34 +0000 (15:14 -0500)]
Upload badge metadata specified in the manifest

7 years agoMerge branch 'master' of https://github.com/rust-lang/cargo into allow-examples-to...
Kalita Alexey [Tue, 17 Jan 2017 19:25:07 +0000 (22:25 +0300)]
Merge branch 'master' of https://github.com/rust-lang/cargo into allow-examples-to-be-library

7 years agoAllow examples to be libraries
Kalita Alexey [Tue, 17 Jan 2017 19:23:48 +0000 (22:23 +0300)]
Allow examples to be libraries

7 years agoAuto merge of #3301 - integer32llc:categories, r=alexcrichton
bors [Tue, 17 Jan 2017 18:57:20 +0000 (18:57 +0000)]
Auto merge of #3301 - integer32llc:categories, r=alexcrichton

Upload categories specified in the manifest

This adds support for uploading categories to crates.io, if they are specified in the manifest.

This goes with rust-lang/crates.io#473. It should be fine to merge this PR either before or after that one; crates.io master doesn't care if the categories are in the metadata or not. With that PR, I was able to use this patch with cargo to add categories to a crate!

7 years agoAllow doc tests to run on proc macro crates
Josh [Tue, 17 Jan 2017 11:28:59 +0000 (22:28 +1100)]
Allow doc tests to run on proc macro crates

7 years agoAuto merge of #3542 - creativcoder:check-digit-name, r=alexcrichton
bors [Tue, 17 Jan 2017 02:48:37 +0000 (02:48 +0000)]
Auto merge of #3542 - creativcoder:check-digit-name, r=alexcrichton

Add a check for names starting with a digit

According to Rust grammer https://doc.rust-lang.org/grammar.html#extern-crate-declarations for extern crate declarations, a crate name cannot start with a digit.

But, currently this rule is not upheld by `cargo new` as creating a project like:

`cargo new 2048` would create a project named 2048 which obviously won't compile with crate declaration like `extern crate 2048` by a consumer.

This obviously is a rare case in practice, but its always good to check i guess.

This PR adds a check to the `new` method and `bail`s out with a message for any names starting with a digit.

PS: I noticed it while making a 2048 puzzle game as a library so thought it would be nice to add this check :)

7 years agoAdd a check for names starting with a digit
Rahul Sharma [Sun, 15 Jan 2017 02:16:24 +0000 (07:46 +0530)]
Add a check for names starting with a digit

7 years agoMore test for workspaces \w path dependencies
Aleksey Kladov [Sat, 14 Jan 2017 22:14:47 +0000 (01:14 +0300)]
More test for workspaces \w path dependencies

7 years agoDocument new rules about path deps in workspace
Aleksey Kladov [Mon, 2 Jan 2017 18:00:05 +0000 (21:00 +0300)]
Document new rules about path deps in workspace

7 years agoPath deps outside workspace are not members
Aleksey Kladov [Thu, 22 Dec 2016 17:56:40 +0000 (20:56 +0300)]
Path deps outside workspace are not members

closes #3192

7 years agoAuto merge of #3534 - sfackler:opt-level, r=alexcrichton
bors [Fri, 13 Jan 2017 18:06:42 +0000 (18:06 +0000)]
Auto merge of #3534 - sfackler:opt-level, r=alexcrichton

Allow debuginfo level to be specified

`true` is mapped to `2`, which matches current behavior.

r? @alexcrichton

7 years agoAllow debuginfo level to be specified
Steven Fackler [Thu, 12 Jan 2017 05:35:17 +0000 (21:35 -0800)]
Allow debuginfo level to be specified

`true` is mapped to `2`, which matches current behavior.

7 years agoAuto merge of #3533 - jtgeibel:3519-dev-target, r=alexcrichton
bors [Thu, 12 Jan 2017 07:56:39 +0000 (07:56 +0000)]
Auto merge of #3533 - jtgeibel:3519-dev-target, r=alexcrichton

Rename debug target to dev in build output

This renames the debug target to dev in the build output for non-release
builds.  This includes the output of commands such as `cargo build`,
`cargo test`, and `cargo doc`.

Closes #3519

7 years agoAuto merge of #3532 - alexcrichton:ignore, r=brson
bors [Thu, 12 Jan 2017 05:56:12 +0000 (05:56 +0000)]
Auto merge of #3532 - alexcrichton:ignore, r=brson

Ignore spuriously failing Windows test

I really have no clue why this test is failing on Windows, and after months of
being unable to diagnose I'm tired of retrying PRs due to this failure. Let's
just ignore it on Windows.

Closes #3466

7 years agoAuto merge of #3490 - alexcrichton:dev-dep-doc-test, r=brson
bors [Thu, 12 Jan 2017 04:03:27 +0000 (04:03 +0000)]
Auto merge of #3490 - alexcrichton:dev-dep-doc-test, r=brson

Fix cargo test --doc with dev-deps

Previously Cargo accidentally didn't pull in dev-dependencies due to the way
`cargo test --doc` was interpreted in terms of top-level targets. This PR
special cases this situation by ensuring that the doctest intention makes its
way all to the backend and the dependencies can be correctly calculated.

Closes #3422

7 years agoRename debug target to dev in build output
Justin Geibel [Thu, 12 Jan 2017 01:03:36 +0000 (20:03 -0500)]
Rename debug target to dev in build output

This renames the debug target to dev in the build output for non-release
builds.  This includes the output of commands such as `cargo build`,
`cargo test`, and `cargo doc`.

Closes #3519

7 years agoAuto merge of #3478 - alexcrichton:lift, r=brson
bors [Thu, 12 Jan 2017 02:03:34 +0000 (02:03 +0000)]
Auto merge of #3478 - alexcrichton:lift, r=brson

Lift up workspace rlibs while building

I think the condition here was slightly off from before, so invert it subtly to
get what we want, lifting up anything in a workspace or binaries otherwise.

Closes #3432

7 years agoIgnore spuriously failing Windows test
Alex Crichton [Thu, 12 Jan 2017 00:45:29 +0000 (16:45 -0800)]
Ignore spuriously failing Windows test

I really have no clue why this test is failing on Windows, and after months of
being unable to diagnose I'm tired of retrying PRs due to this failure. Let's
just ignore it on Windows.

Closes #3466

7 years agoAuto merge of #3527 - nikomatsakis:master, r=alexcrichton
bors [Thu, 12 Jan 2017 00:45:23 +0000 (00:45 +0000)]
Auto merge of #3527 - nikomatsakis:master, r=alexcrichton

check for `CARGO_INCREMENTAL` and pass `-Zincremental` if present

Per the discussion on IRC, this adds a very simple way for cargo users to opt into incremental compilation by setting the `CARGO_INCREMENTAL` environment variable (i.e., `CARGO_INCREMENTAL=1 cargo build`). This will result in incremental data being stored into the `target/incremental` directory. Since it supplies `-Z`, this option is only intended for use on nightly compilers, though cargo makes no effort to check.

The plan is to keep incremental compilation optional until we are feeling more confident it's not going to cause problems for people. At that point, it should become part of the compilation profile. It will be the default when building in debug builds, and opt-in for release builds.

7 years agoaddress suggestions from acrichto
Niko Matsakis [Wed, 11 Jan 2017 18:47:54 +0000 (13:47 -0500)]
address suggestions from acrichto

7 years agocheck `cargo test` too`
Niko Matsakis [Wed, 11 Jan 2017 16:30:12 +0000 (11:30 -0500)]
check `cargo test` too`

7 years agocheck for `CARGO_INCREMENTAL` and pass `-Zincremental` if present
Niko Matsakis [Wed, 11 Jan 2017 16:20:36 +0000 (11:20 -0500)]
check for `CARGO_INCREMENTAL` and pass `-Zincremental` if present

7 years agoAuto merge of #3524 - sdroege:test-build-doc-test-check-status, r=alexcrichton
bors [Tue, 10 Jan 2017 19:34:36 +0000 (19:34 +0000)]
Auto merge of #3524 - sdroege:test-build-doc-test-check-status, r=alexcrichton

Check the exit code of all processes started in the build/test tests

By not checking the exit codes, a failure in the build::crate_env_vars()
test was ignored.

As suggested by @alexcrichton in https://github.com/rust-lang/cargo/pull/3515#discussion_r95253461

7 years agoCheck the exit code of all processes started in the build/test tests
Sebastian Dröge [Tue, 10 Jan 2017 12:02:08 +0000 (14:02 +0200)]
Check the exit code of all processes started in the build/test tests

By not checking the exit codes, a failure in the build::crate_env_vars()
test was ignored.

7 years agoAuto merge of #3489 - matklad:rel-ws, r=alexcrichton
bors [Tue, 10 Jan 2017 07:45:10 +0000 (07:45 +0000)]
Auto merge of #3489 - matklad:rel-ws, r=alexcrichton

Use canonical paths for checking equality

7 years agoAuto merge of #3515 - sdroege:doc-all, r=alexcrichton
bors [Mon, 9 Jan 2017 21:46:23 +0000 (21:46 +0000)]
Auto merge of #3515 - sdroege:doc-all, r=alexcrichton

 Add support for documenting all members of the workspace with "doc --all"

https://github.com/rust-lang/cargo/issues/3491

7 years agoAuto merge of #3518 - Manishearth:static-mut, r=alexcrichton
bors [Mon, 9 Jan 2017 19:46:09 +0000 (19:46 +0000)]
Auto merge of #3518 - Manishearth:static-mut, r=alexcrichton

Replace static mut bool with atomicbool

unsafe in tests is fine, but it can be trivially avoided in this case.

r? @alexcrichton

cc @froydnj

7 years agoReplace static mut bool with atomicbool
Manish Goregaokar [Mon, 9 Jan 2017 14:51:37 +0000 (06:51 -0800)]
Replace static mut bool with atomicbool

7 years agoCollect library/binary names when documenting even if a spec was given
Sebastian Dröge [Mon, 9 Jan 2017 10:52:56 +0000 (12:52 +0200)]
Collect library/binary names when documenting even if a spec was given

This seems more consistent and generally should work better.

7 years agoCheck if the "doc --all" tests exit with exit code 0
Sebastian Dröge [Mon, 9 Jan 2017 10:49:13 +0000 (12:49 +0200)]
Check if the "doc --all" tests exit with exit code 0

7 years agoAuto merge of #3511 - sdroege:build-all, r=alexcrichton
bors [Mon, 9 Jan 2017 05:31:31 +0000 (05:31 +0000)]
Auto merge of #3511 - sdroege:build-all, r=alexcrichton

Add support for building all members of the workspace with "build --all"

https://github.com/rust-lang/cargo/issues/3491

7 years agoAuto merge of #3510 - froydnj:cross-compilation-test-checking, r=alexcrichton
bors [Mon, 9 Jan 2017 04:20:40 +0000 (04:20 +0000)]
Auto merge of #3510 - froydnj:cross-compilation-test-checking, r=alexcrichton

handle cross-compilation test failure more gracefully

The current cross-compilation test module fails every test if an appropriate cross standard library is not found.  This behavior is unhelpful, because the failures are verbose, unexpected, and there's no
obvious way to make them go away.

Instead, it would be better to check once before all the tests that an appropriate cross-compilation setup is available.  Once that check has been done, a single test can fail with an appropriate `panic!` message while the other tests silently pass.  The `panic!` message can inform the user about their options, either setting an appropriate environment variable, or using rustup to install the necessary cross standard library.

Assuming the user has rustup installed, the single failure now looks
something like:

```
thread 'plugin_deps' panicked at 'Cannot cross compile to i686-unknown-linux-gnu.

This failure can be safely ignored. If you would prefer to not see this
failure, you can set the environment variable CFG_DISABLE_CROSS_TESTS to "1".

Alternatively, you can install the necessary libraries for cross-compilation with

    rustup toolchain install stable-i686-unknown-linux-gnu
', tests/cross-compile.rs:87
note: Run with `RUST_BACKTRACE=1` for a backtrace.
```

The code is admittedly gnarly, with synchronization and `unsafe` sections, but I wasn't sure how to make it any better. Suggestions welcome!

Fixes #3086.

7 years agoAdd tests for "build --all"
Sebastian Dröge [Sat, 7 Jan 2017 11:01:39 +0000 (13:01 +0200)]
Add tests for "build --all"

These are basically the same as the ones from "test --all"

7 years agoAdd tests for "doc --all"
Sebastian Dröge [Sun, 8 Jan 2017 11:59:02 +0000 (13:59 +0200)]
Add tests for "doc --all"

These are basically the same as the ones from "test --all" and "build --all"

7 years agoAdd support for documenting all members of the workspace with "doc --all"
Sebastian Dröge [Fri, 6 Jan 2017 19:57:13 +0000 (21:57 +0200)]
Add support for documenting all members of the workspace with "doc --all"

https://github.com/rust-lang/cargo/issues/3491

7 years agoNormalize paths before checking for equality
Aleksey Kladov [Tue, 3 Jan 2017 11:11:57 +0000 (14:11 +0300)]
Normalize paths before checking for equality

7 years agohandle cross-compilation test failure more gracefully
Nathan Froyd [Fri, 6 Jan 2017 19:30:38 +0000 (14:30 -0500)]
handle cross-compilation test failure more gracefully

The current cross-compilation test module fails every test if an
appropriate cross standard library is not found.  This behavior is
unhelpful, because the failures are verbose, unexpected, and there's no
obvious way to make them go away.

Instead, it would be better to check once before all the tests that an
appropriate cross-compilation setup is available.  Once that check has
been done, a single test can fail with an appropriate `panic!` message
while the other tests silently pass.  The `panic!` message can inform
the user about their options, either setting an appropriate environment
variable, or using rustup to install the necessary cross standard
library.

Assuming the user has rustup installed, the single failure now looks
something like:

```
thread 'plugin_deps' panicked at 'Cannot cross compile to i686-unknown-linux-gnu.

This failure can be safely ignored. If you would prefer to not see this
failure, you can set the environment variable CFG_DISABLE_CROSS_TESTS to "1".

Alternatively, you can install the necessary libraries for cross-compilation with

    rustup toolchain install stable-i686-unknown-linux-gnu

You may need to install runtime libraries for your Linux distribution as well.
', tests/cross-compile.rs:87
note: Run with `RUST_BACKTRACE=1` for a backtrace.
```

Fixes #3086.

7 years agoAuto merge of #3509 - froydnj:colored-shell-tests, r=alexcrichton
bors [Fri, 6 Jan 2017 20:57:04 +0000 (20:57 +0000)]
Auto merge of #3509 - froydnj:colored-shell-tests, r=alexcrichton

disable color shell tests for terminals that don't support color

Some terminals (e.g. running a shell inside Emacs's shell-mode) don't
support color, and running tests that assume the terminal supports color
don't work so well.  Instead, if color is expected, check the terminal
for whether it supports color or not, and act accordingly.

7 years agoAdd support for building all members of the workspace with "build --all"
Sebastian Dröge [Fri, 6 Jan 2017 19:52:57 +0000 (21:52 +0200)]
Add support for building all members of the workspace with "build --all"

https://github.com/rust-lang/cargo/issues/3491

7 years agoAuto merge of #3508 - petrochenkov:bsover, r=alexcrichton
bors [Fri, 6 Jan 2017 18:46:47 +0000 (18:46 +0000)]
Auto merge of #3508 - petrochenkov:bsover, r=alexcrichton

Do not treat `warning` and `rerun-if-changed` as user-defined metadata in build script overrides

Fixes https://github.com/rust-lang/cargo/pull/3438#discussion_r94018355
r? @alexcrichton

7 years agodisable color shell tests for terminals that don't support color
Nathan Froyd [Fri, 6 Jan 2017 17:46:56 +0000 (12:46 -0500)]
disable color shell tests for terminals that don't support color

Some terminals (e.g. running a shell inside Emacs's shell-mode) don't
support color, and running tests that assume the terminal supports color
don't work so well.  Instead, if color is expected, check the terminal
for whether it supports color or not, and act accordingly.

7 years agoAuto merge of #3504 - froydnj:win32-dependencies, r=alexcrichton
bors [Fri, 6 Jan 2017 17:16:47 +0000 (17:16 +0000)]
Auto merge of #3504 - froydnj:win32-dependencies, r=alexcrichton

make certain dependencies Windows-only

Inspired by servo/heapsize#71, we make certain dependencies only required under Windows.

7 years agoDo not treat `warning` and `rerun-if-changed` as user-defined metadata in build scrip...
Vadim Petrochenkov [Fri, 6 Jan 2017 13:28:53 +0000 (16:28 +0300)]
Do not treat `warning` and `rerun-if-changed` as user-defined metadata in build script overrides

7 years agomake certain dependencies Windows-only
Nathan Froyd [Thu, 5 Jan 2017 21:09:36 +0000 (16:09 -0500)]
make certain dependencies Windows-only

Inspired by servo/heapsize#71, we make certain dependencies only
required under Windows.

7 years agoAuto merge of #3427 - nrc:api-check-2, r=alexcrichton
bors [Fri, 6 Jan 2017 06:15:35 +0000 (06:15 +0000)]
Auto merge of #3427 - nrc:api-check-2, r=alexcrichton

Make some aspects of check/build available as an API.

There are two key parts to this commit:
* let API clients run `cargo check` with minimal fuss (ops/cargo_check.rs),
* let API clients intercept and customise Cargo's calls to rustc (all the Executor stuff).

r? @alexcrichton

7 years agoAuto merge of #3505 - froydnj:read2-delete-try, r=alexcrichton
bors [Fri, 6 Jan 2017 01:39:26 +0000 (01:39 +0000)]
Auto merge of #3505 - froydnj:read2-delete-try, r=alexcrichton

delete unused try macro from read2.rs

AFAICS, this is unused.

7 years agoAuto merge of #3507 - alexcrichton:appveyor-new-deploy, r=alexcrichton
bors [Thu, 5 Jan 2017 23:44:25 +0000 (23:44 +0000)]
Auto merge of #3507 - alexcrichton:appveyor-new-deploy, r=alexcrichton

Remove extraneous .BaseName from AppVeyor

Apparently this isn't necessary

7 years agoRemove extraneous .BaseName from AppVeyor
Alex Crichton [Thu, 5 Jan 2017 23:41:04 +0000 (15:41 -0800)]
Remove extraneous .BaseName from AppVeyor

Apparently this isn't necessary

7 years agoAdd `--profile check` to `cargo rustc`
Nick Cameron [Thu, 5 Jan 2017 02:21:12 +0000 (15:21 +1300)]
Add `--profile check` to `cargo rustc`

7 years agodelete unused try macro from read2.rs
Nathan Froyd [Thu, 5 Jan 2017 21:26:48 +0000 (16:26 -0500)]
delete unused try macro from read2.rs

7 years agoAuto merge of #3495 - sfackler:bump-shell-escape, r=alexcrichton
bors [Thu, 5 Jan 2017 20:52:28 +0000 (20:52 +0000)]
Auto merge of #3495 - sfackler:bump-shell-escape, r=alexcrichton

Update shell-escape

r? @alexcrichton

7 years agoAuto merge of #3500 - alexcrichton:appveyor-new-deploy, r=alexcrichton
bors [Thu, 5 Jan 2017 18:43:42 +0000 (18:43 +0000)]
Auto merge of #3500 - alexcrichton:appveyor-new-deploy, r=alexcrichton

Try using before_deploy on AppVeyor

7 years agoTry using before_deploy on AppVeyor
Alex Crichton [Thu, 5 Jan 2017 18:04:12 +0000 (10:04 -0800)]
Try using before_deploy on AppVeyor

7 years agoFix cargo test --doc with dev-deps
Alex Crichton [Tue, 20 Dec 2016 00:28:06 +0000 (16:28 -0800)]
Fix cargo test --doc with dev-deps

Previously Cargo accidentally didn't pull in dev-dependencies due to the way
`cargo test --doc` was interpreted in terms of top-level targets. This PR
special cases this situation by ensuring that the doctest intention makes its
way all to the backend and the dependencies can be correctly calculated.

Closes #3422

7 years agoLift up workspace rlibs while building
Alex Crichton [Fri, 30 Dec 2016 18:50:39 +0000 (10:50 -0800)]
Lift up workspace rlibs while building

I think the condition here was slightly off from before, so invert it subtly to
get what we want, lifting up anything in a workspace or binaries otherwise.

Closes #3432

7 years agoUpdate shell-escape
Steven Fackler [Thu, 5 Jan 2017 04:06:53 +0000 (20:06 -0800)]
Update shell-escape