Vasudev Kamath [Thu, 22 Mar 2018 14:38:17 +0000 (20:08 +0530)]
Make fast forward from 0.25.0-1
[dgit --quilt=gbp]
Ximin Luo [Thu, 22 Mar 2018 14:38:17 +0000 (20:08 +0530)]
Avoid installing dev-dependencies
Applied-Upstream: https://github.com/rust-lang/cargo/pull/5012
Applied-Upstream: https://github.com/rust-lang/cargo/pull/5186
Gbp-Pq: Name 1001_PR5012.patch
Vasudev Kamath [Thu, 22 Mar 2018 14:38:17 +0000 (20:08 +0530)]
Disable wasm32_final_outputs test
This test depends on emscripten built using fastcomp
a fork of LLVM and is not available in Debian.
Last-Update: 2017-12-05
Gbp-Pq: Name 2006_disable_wasm32_tests.patch
Vasudev Kamath [Thu, 22 Mar 2018 14:38:17 +0000 (20:08 +0530)]
Don't run mdBook for book preview
Upstream script tries to show preview of generated document
the tool needed is missing and step is not needed during
package build.
Last-Update: 2017-12-03
Gbp-Pq: Name 2005_dont_run_mdbook.patch
Vasudev Kamath [Thu, 22 Mar 2018 14:38:17 +0000 (20:08 +0530)]
Fix typo in cargo search subcommand.
Since the search subcommand where typo happened is
also used in test fix the typo in test also.
Last-Update: 2017-10-29
Gbp-Pq: Name 1002_fix_typo_cargo_search.patch
Ximin Luo [Thu, 22 Mar 2018 14:38:17 +0000 (20:08 +0530)]
Disable network tests
Forwarded: TODO
Gbp-Pq: Name 2002_disable-net-tests.patch
Ximin Luo [Thu, 22 Mar 2018 14:38:17 +0000 (20:08 +0530)]
Always use system libgit2
Forwarded: not-needed
Gbp-Pq: Name 2001_use-system-libgit2.patch
Luca Bruno [Thu, 22 Mar 2018 14:38:17 +0000 (20:08 +0530)]
_local-jquery
Gbp-Pq: Name 2003_local-jquery.patch
Ximin Luo [Thu, 22 Mar 2018 14:38:17 +0000 (20:08 +0530)]
_clean-cargo-deps
Gbp-Pq: Name 2004_clean-cargo-deps.patch
Vasudev Kamath [Thu, 22 Mar 2018 14:38:36 +0000 (20:08 +0530)]
Prepare upload to unstable.
Ximin Luo [Wed, 21 Mar 2018 11:02:29 +0000 (12:02 +0100)]
Remove Cargo.lock when cleaning, fixes build when checking out new versions
Ximin Luo [Tue, 6 Feb 2018 00:43:10 +0000 (01:43 +0100)]
Don't require dev-dependencies when not needed in certain cases
Ximin Luo [Mon, 19 Mar 2018 16:49:13 +0000 (17:49 +0100)]
Depend on rustc 1.24 or later
Vasudev Kamath [Fri, 9 Mar 2018 15:47:59 +0000 (21:17 +0530)]
Prepare upload to unstable.
Vasudev Kamath [Fri, 9 Mar 2018 15:39:38 +0000 (21:09 +0530)]
Declare fast forward from 0.24.0-1
[dgit --quilt=gbp --overwrite=0.24.0-1]
Vasudev Kamath [Fri, 9 Mar 2018 15:39:38 +0000 (21:09 +0530)]
Disable wasm32_final_outputs test
This test depends on emscripten built using fastcomp
a fork of LLVM and is not available in Debian.
Last-Update: 2017-12-05
Gbp-Pq: Name 2006_disable_wasm32_tests.patch
Vasudev Kamath [Fri, 9 Mar 2018 15:39:38 +0000 (21:09 +0530)]
Don't run mdBook for book preview
Upstream script tries to show preview of generated document
the tool needed is missing and step is not needed during
package build.
Last-Update: 2017-12-03
Gbp-Pq: Name 2005_dont_run_mdbook.patch
Vasudev Kamath [Fri, 9 Mar 2018 15:39:38 +0000 (21:09 +0530)]
Fix typo in cargo search subcommand.
Since the search subcommand where typo happened is
also used in test fix the typo in test also.
Last-Update: 2017-10-29
Gbp-Pq: Name 1002_fix_typo_cargo_search.patch
Ximin Luo [Fri, 9 Mar 2018 15:39:38 +0000 (21:09 +0530)]
Disable network tests
Forwarded: TODO
Gbp-Pq: Name 2002_disable-net-tests.patch
Ximin Luo [Fri, 9 Mar 2018 15:39:38 +0000 (21:09 +0530)]
Always use system libgit2
Forwarded: not-needed
Gbp-Pq: Name 2001_use-system-libgit2.patch
Luca Bruno [Fri, 9 Mar 2018 15:39:38 +0000 (21:09 +0530)]
_local-jquery
Gbp-Pq: Name 2003_local-jquery.patch
Ximin Luo [Fri, 9 Mar 2018 15:39:38 +0000 (21:09 +0530)]
_clean-cargo-deps
Gbp-Pq: Name 2004_clean-cargo-deps.patch
Vasudev Kamath [Sun, 25 Feb 2018 06:49:01 +0000 (12:19 +0530)]
Prepare release
Vasudev Kamath [Sun, 25 Feb 2018 06:48:45 +0000 (12:18 +0530)]
Disable tests on powerpc and powerpcspe
Vasudev Kamath [Sat, 24 Feb 2018 09:13:52 +0000 (14:43 +0530)]
Prepare new release for experimental
Vasudev Kamath [Sat, 24 Feb 2018 09:12:31 +0000 (14:42 +0530)]
Update copyright for 0.25.0
Vasudev Kamath [Sat, 24 Feb 2018 08:50:37 +0000 (14:20 +0530)]
Drop unused lintian override for README as patch.
Request to not consider README under patches as a patch file has been
implemented in lintian upstream.
Vasudev Kamath [Sat, 24 Feb 2018 08:50:08 +0000 (14:20 +0530)]
Fix typo in 2006 patch description.
Vasudev Kamath [Sat, 24 Feb 2018 07:32:46 +0000 (13:02 +0530)]
Drop patch 0001 as its merged upstream.
Vasudev Kamath [Sat, 24 Feb 2018 07:22:56 +0000 (12:52 +0530)]
Update upstream source from tag 'upstream/0.25.0'
Update to upstream version '0.25.0'
with Debian dir
44c2a43b3d0c56627bb5fb049db7430d3382d218
Vasudev Kamath [Sat, 24 Feb 2018 07:22:01 +0000 (12:52 +0530)]
New upstream version 0.25.0
Vasudev Kamath [Sat, 24 Feb 2018 07:19:49 +0000 (12:49 +0530)]
Make sure we take filter and unsuspiciaus texts from debian folder
This was added because these files will be present under .git/dgit/unpack if we
use dgit to push source.
Vasudev Kamath [Sat, 24 Feb 2018 07:19:20 +0000 (12:49 +0530)]
Audit unsuspicious files for 0.25.0 release.
Vasudev Kamath [Sat, 24 Feb 2018 07:19:01 +0000 (12:49 +0530)]
Filter out git test data from libgit2-sys.
bors [Thu, 1 Feb 2018 21:15:01 +0000 (21:15 +0000)]
Auto merge of #4999 - alexcrichton:beta-next, r=alexcrichton
[beta] Fix `RUSTC=./relative-path` when building
This is a backport of https://github.com/rust-lang/cargo/pull/4995
Alex Crichton [Wed, 31 Jan 2018 18:30:01 +0000 (10:30 -0800)]
Fix `RUSTC=./relative-path` when building
This commit adjusts the compiler location logic to resolve `./relative-path`
before invoking rustc to ensure it's no longer cwd-relative. This is how many
other variables like `CARGO_HOME` work, so it's applying similar logic.
Ximin Luo [Sat, 27 Jan 2018 09:41:08 +0000 (10:41 +0100)]
Release 0.24.0-1 to Debian unstable.
Vasudev Kamath [Sat, 27 Jan 2018 09:41:06 +0000 (15:11 +0530)]
Make error message bad_git_dependency test less strict
Bug: https://github.com/rust-lang/cargo/issues/4908
Last-Update: 2018-01-24
Gbp-Pq: Name 0001-fix_bad_git_dependency.patch
Vasudev Kamath [Sat, 27 Jan 2018 09:41:06 +0000 (15:11 +0530)]
Disable wasm32_final_outputs test
This test depends on emscripten built using fastcomp
a fork of LLVM and is not avaialble in Debian.
Last-Update: 2017-12-05
Gbp-Pq: Name 2006_disable_wasm32_tests.patch
Vasudev Kamath [Sat, 27 Jan 2018 09:41:06 +0000 (15:11 +0530)]
Don't run mdBook for book preview
Upstream script tries to show preview of generated document
the tool needed is missing and step is not needed during
package build.
Last-Update: 2017-12-03
Gbp-Pq: Name 2005_dont_run_mdbook.patch
Vasudev Kamath [Sat, 27 Jan 2018 09:41:06 +0000 (15:11 +0530)]
Fix typo in cargo search subcommand.
Since the search subcommand where typo happened is
also used in test fix the typo in test also.
Last-Update: 2017-10-29
Gbp-Pq: Name 1002_fix_typo_cargo_search.patch
Ximin Luo [Sat, 27 Jan 2018 09:41:06 +0000 (15:11 +0530)]
Disable network tests
Forwarded: TODO
Gbp-Pq: Name 2002_disable-net-tests.patch
Ximin Luo [Sat, 27 Jan 2018 09:41:06 +0000 (15:11 +0530)]
Always use system libgit2
Forwarded: not-needed
Gbp-Pq: Name 2001_use-system-libgit2.patch
Luca Bruno [Sat, 27 Jan 2018 09:41:06 +0000 (15:11 +0530)]
_local-jquery
Gbp-Pq: Name 2003_local-jquery.patch
Ximin Luo [Sat, 27 Jan 2018 09:41:06 +0000 (15:11 +0530)]
_clean-cargo-deps
Gbp-Pq: Name 2004_clean-cargo-deps.patch
Ximin Luo [Sat, 27 Jan 2018 09:41:06 +0000 (15:11 +0530)]
cargo (0.24.0-1) unstable; urgency=medium
* Upload to unstable.
[dgit import unpatched cargo 0.24.0-1]
Ximin Luo [Sat, 27 Jan 2018 09:41:06 +0000 (15:11 +0530)]
Import cargo_0.24.0-1.debian.tar.xz
[dgit import tarball cargo 0.24.0-1 cargo_0.24.0-1.debian.tar.xz]
Vasudev Kamath [Thu, 25 Jan 2018 09:27:52 +0000 (14:57 +0530)]
Prepare 0.24.0 for experimental.
Vasudev Kamath [Thu, 25 Jan 2018 09:27:43 +0000 (14:57 +0530)]
Import cargo_0.24.0.orig.tar.gz
[dgit import orig cargo_0.24.0.orig.tar.gz]
Vasudev Kamath [Thu, 25 Jan 2018 09:27:43 +0000 (14:57 +0530)]
Import cargo_0.24.0.orig-vendor.tar.gz
[dgit import orig cargo_0.24.0.orig-vendor.tar.gz]
Vasudev Kamath [Thu, 25 Jan 2018 09:25:58 +0000 (14:55 +0530)]
Add lintian-override to ignore false positive from lintian.
Vasudev Kamath [Thu, 25 Jan 2018 09:11:18 +0000 (14:41 +0530)]
Track rustfmt.toml on top level copyright section.
Vasudev Kamath [Thu, 25 Jan 2018 08:16:17 +0000 (13:46 +0530)]
Update copyright file for 0.24.0 release.
Vasudev Kamath [Thu, 25 Jan 2018 06:32:36 +0000 (12:02 +0530)]
Fix the bad_git_dependency test failure.
bors [Sun, 14 Jan 2018 19:45:05 +0000 (19:45 +0000)]
Auto merge of #4940 - ehuss:ws-meta-beta, r=alexcrichton
Add workspace root to metadata command.
Fixes #4933
Merge of #4938 for rust 1.24 beta.
@alexcrichton I'm uncertain about the process for merging in beta. I'm guessing after this I just need to open a PR on the rust beta branch to update the cargo submodule?
Eric Huss [Sat, 13 Jan 2018 19:51:36 +0000 (11:51 -0800)]
Add workspace root to metadata command.
Fixes #4933
Vasudev Kamath [Sat, 13 Jan 2018 16:08:44 +0000 (21:38 +0530)]
Update changelog
Vasudev Kamath [Sat, 13 Jan 2018 16:08:20 +0000 (21:38 +0530)]
Comment out copying out Cargo.lock its no longer shipped by upstream.
Vasudev Kamath [Tue, 9 Jan 2018 16:52:44 +0000 (22:22 +0530)]
Mark package as compliant with Debian Policy 4.1.3
Vasudev Kamath [Tue, 9 Jan 2018 15:28:31 +0000 (20:58 +0530)]
Drop url specific hunk from 1002 its merged upstream.
Vasudev Kamath [Tue, 9 Jan 2018 15:28:18 +0000 (20:58 +0530)]
Refresh 2001 for new version of libgit2-sys.
Vasudev Kamath [Tue, 9 Jan 2018 15:03:13 +0000 (20:33 +0530)]
Update upstream source from tag 'upstream/0.24.0'
Update to upstream version '0.24.0'
with Debian dir
902794871ac6926951d065a9f060aedd4bdb04cd
Vasudev Kamath [Tue, 9 Jan 2018 15:02:20 +0000 (20:32 +0530)]
New upstream version 0.24.0
Vasudev Kamath [Tue, 9 Jan 2018 14:59:52 +0000 (20:29 +0530)]
Add files from new vendor to unsuspicious list.
Vasudev Kamath [Tue, 9 Jan 2018 14:59:38 +0000 (20:29 +0530)]
filter out windows related .a files.
bors [Fri, 29 Dec 2017 22:13:32 +0000 (22:13 +0000)]
Auto merge of #4876 - MaloJaffre:flate2, r=alexcrichton
Upgrade flate2 crate to 1.0 in cargotest
I've missed this part in my previous PR, sorry.
Unblocks rust#46278.
Malo Jaffré [Fri, 29 Dec 2017 22:01:27 +0000 (23:01 +0100)]
Upgrade flate2 crate to 1.0 in cargotest
I've missed this part in my previous PR, sorry.
Unblocks rust#46278.
bors [Fri, 29 Dec 2017 16:18:31 +0000 (16:18 +0000)]
Auto merge of #4872 - MaloJaffre:flate-1.0, r=alexcrichton
Upgrade flate2 crate to 1.0
Unblocks rust-lang/rust#46278.
Malo Jaffré [Fri, 29 Dec 2017 14:37:22 +0000 (15:37 +0100)]
Upgrade flate2 crate to 1.0
Unblocks rust#46278.
bors [Fri, 29 Dec 2017 12:19:53 +0000 (12:19 +0000)]
Auto merge of #4871 - fschutt:master, r=matklad
Update cargo tests for https://github.com/rust-lang/rust/pull/47052
This test message currently breaks the build. The old error message was:
```
error: could not exec the linker `cc`: No such file or directory (os error 2)
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/felix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "hello.hello0.rcgu.o" "hello.hello1.rcgu.o" "-o" "hello" "hello.crate.allocator.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "-L" "/home/felix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/felix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-
d3700976135c3f09.rlib" "/home/felix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-
8a207564cfc9f224.rlib" "/home/felix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-
4712d699ce2d50e5.rlib" "/home/felix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-
7224935811a361fe.rlib" "/home/felix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_system-
3343c92f30e63266.rlib" "/home/felix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-
6e8aafa8bd1a67de.rlib" "/home/felix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-
a8b7c0565b6366c3.rlib" "/home/felix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_unicode-
512049fc390dec2e.rlib" "/home/felix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-
ba1f12eb6cef9a1a.rlib" "/home/felix/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-
53aab67ab6317c59.rlib" "-Wl,-Bdynamic" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util" "-l" "util"
error: aborting due to previous error
```
The new error message is:
```
error: linker `cc` not found
|
= note: No such file or directory (os error 2)
error: aborting due to previous error
```
This currently breaks https://github.com/rust-lang/rust/pull/47052.
**NOTE:** I don't know if I handled the "ticks" around the linker name correctly (if cargo test is smart enough to see that the ticks are part of the omitted part). My reasoning was that in the rustc code the ticks are in the source and not part of the linkers name - so if rustc changes, this will probably break again.
EDIT: fixed error message
Felix Schütt [Fri, 29 Dec 2017 10:46:07 +0000 (11:46 +0100)]
Update cargo tests for https://github.com/rust-lang/rust/pull/47052
bors [Sun, 24 Dec 2017 03:46:44 +0000 (03:46 +0000)]
Auto merge of #4859 - alexcrichton:better-test-fail, r=alexcrichton
Write invalid data when cloning to force an abort
Otherwise it seems libgit2 isn't ready to handle premature eof? Unclear...
Alex Crichton [Sun, 24 Dec 2017 03:45:37 +0000 (19:45 -0800)]
Write invalid data when cloning to force an abort
Otherwise it seems libgit2 isn't ready to handle premature eof? Unclear...
bors [Sat, 23 Dec 2017 15:43:50 +0000 (15:43 +0000)]
Auto merge of #4857 - alexcrichton:better-test-fail, r=alexcrichton
Make the `failed_submodule_checkout` test more robust
Hopefully should help diagnose deadlocks in rust-lang/rust
Alex Crichton [Sat, 23 Dec 2017 15:43:08 +0000 (07:43 -0800)]
Make the `failed_submodule_checkout` test more robust
Hopefully should help diagnose deadlocks in rust-lang/rust
bors [Fri, 22 Dec 2017 16:55:35 +0000 (16:55 +0000)]
Auto merge of #4852 - jtgeibel:cargo-install-target-dir, r=alexcrichton
Always respect `CARGO_TARGET_DIR` during `cargo install`
This aligns the behavior of crates.io and `--git` sources with that of `--path`
regarding the `CARGO_TARGET_DIR` and `CARGO_BUILD_TARGET_DIR` environment
variables. If neither environment variable is set, then a temporary directory
is still used when installing from crates.io or `--git`.
As discussed in #4725, this can be used to enable caching of artifacts between
continuous integration builds.
/cc @alexcrichton, @ishanjain28
bors [Fri, 22 Dec 2017 16:08:01 +0000 (16:08 +0000)]
Auto merge of #4856 - alexcrichton:no-revoke, r=alexcrichton
Forcibly remove CARGO_HTTP_CHECK_REVOKE when testing
This'll tweak error messages and cause tests to fail
Alex Crichton [Fri, 22 Dec 2017 16:07:20 +0000 (08:07 -0800)]
Forcibly remove CARGO_HTTP_CHECK_REVOKE when testing
This'll tweak error messages and cause tests to fail
Justin Geibel [Fri, 22 Dec 2017 01:14:12 +0000 (20:14 -0500)]
Always respect `CARGO_TARGET_DIR` during `cargo install`
This aligns the behavior of crates.io and `--git` sources with that of `--path`
regarding the `CARGO_TARGET_DIR` and `CARGO_BUILD_TARGET_DIR` environment
variables. If neither environment variable is set, then a temporary directory
is still used when installing from crates.io or `--git`.
As discussed in #4725, this can be used to enable caching of artifacts between
continuous integration builds.
bors [Thu, 21 Dec 2017 23:38:31 +0000 (23:38 +0000)]
Auto merge of #4851 - sfackler:verify-in-target, r=alexcrichton
Untar into the right dir when verifying
We'd previously dump it in the package's directory which is wrong when
working in a workspace.
Closes #4304
r? @alexcrichton
Steven Fackler [Thu, 21 Dec 2017 21:58:49 +0000 (13:58 -0800)]
Untar into the right dir when verifying
We'd previously dump it in the package's directory which is wrong when
working in a workspace.
Closes #4304
bors [Thu, 21 Dec 2017 18:57:07 +0000 (18:57 +0000)]
Auto merge of #4817 - alexcrichton:incremental-by-default, r=matklad
Enable incremental by default
This commit enables incremental compilation by default in Cargo for all
dev-related profiles (aka anything without `--release` or `bench`. A
number of new configuration options were also added to tweak how
incremental compilation is exposed and/or used:
* A `profile.dev.incremental` field is added to `Cargo.toml` to disable
it on a per-project basis (in case of bugs).
* A `build.incremental` field was added in `.cargo/config` to disable
globally (or enable if we flip this default back off).
Otherwise `CARGO_INCREMENTAL` can still be used to configure one
particular compilation. The global `build.incremental` configuration
cannot currently be used to enable it for the release profile.
Alex Crichton [Wed, 13 Dec 2017 22:08:16 +0000 (14:08 -0800)]
Enable incremental by default
This commit enables incremental compilation by default in Cargo for all
dev-related profiles (aka anything without `--release` or `bench`. A
number of new configuration options were also added to tweak how
incremental compilation is exposed and/or used:
* A `profile.dev.incremental` field is added to `Cargo.toml` to disable
it on a per-project basis (in case of bugs).
* A `build.incremental` field was added in `.cargo/config` to disable
globally (or enable if we flip this default back off).
Otherwise `CARGO_INCREMENTAL` can still be used to configure one
particular compilation. The global `build.incremental` configuration
cannot currently be used to enable it for the release profile.
bors [Wed, 20 Dec 2017 15:01:01 +0000 (15:01 +0000)]
Auto merge of #4837 - alexcrichton:failed-submodule-checkout, r=matklad
Fix updating submodules past failures
If a submodule-of-a-submodule failed to update then Cargo the next time
around wouldn't automatically retry updating the next submodule. This commit
fixes that by ensuring that if a parent git repository looks updated we still
recurse into its own submodules to ensure they're all updated.
cc #4071
Alex Crichton [Tue, 19 Dec 2017 15:34:14 +0000 (07:34 -0800)]
Fix updating submodules past failures
If a submodule-of-a-submodule failed to update then Cargo the next time
around wouldn't automatically retry updating the next submodule. This commit
fixes that by ensuring that if a parent git repository looks updated we still
recurse into its own submodules to ensure they're all updated.
cc #4071
bors [Tue, 19 Dec 2017 22:14:25 +0000 (22:14 +0000)]
Auto merge of #4838 - Manishearth:die-qquote, r=alexcrichton
Remove usage of quasi-quoting in tests
Only clippy and cargo use the old quasi quoting stuff, and we should be
removing it.
r? @alexcrichton
Manish Goregaokar [Tue, 19 Dec 2017 20:27:51 +0000 (12:27 -0800)]
Remove usage of quasi-quoting in tests
Only clippy and cargo use the old quasi quoting stuff, and we should be
removing it.
bors [Tue, 19 Dec 2017 03:33:36 +0000 (03:33 +0000)]
Auto merge of #4791 - nox:dupe-flags, r=alexcrichton
Don't accumulate feature and rustdoc flags twice (fixes #4790)
bors [Tue, 19 Dec 2017 02:48:27 +0000 (02:48 +0000)]
Auto merge of #4795 - alexcrichton:failure, r=withoutboats
Start migration to the `failure` crate
This commit is the initial steps to migrate Cargo's error handling from the
`error-chain` crate to the `failure` crate. This is intended to be a low-cost
(in terms of diff) transition where possible so it's note "purely idiomatic
`failure` crate" just yet.
The `error-chain` dependency is dropped in this commit and Cargo now canonically
uses the `Error` type from the `failure` crate. The main last remnant of
`error-chain` is a custom local extension trait to use `chain_err` instead of
`with_context`. I'll try to follow up with a commit that renames this later but
I wanted to make sure everything worked first! (and `chain_err` is used
practically everywhere).
Some minor tweaks happened in the tests as I touched up a few error messages
here and there but overall the UI of Cargo should be exactly the same before and
after this commit.
bors [Tue, 19 Dec 2017 01:48:52 +0000 (01:48 +0000)]
Auto merge of #4836 - sfackler:dl-template, r=withoutboats
Template a registry's dl field
Previously, crate files were always downloaded from
`/{crate}/{version}/download`. However, if the backing crate store for a
custom registry is a raw file server rather than an API endpoint that
requires every file to be named `download` which is a bit weird. Now a
registry's dl URL can be templated with `{crate}` and `{version}` to
have more control over the resulting path.
For backwards compatibility, we append the default template suffix onto
the dl URL if neither of the template parameters are present for
backwards compatibility.
r? @alexcrichton
cc @withoutboats
Alex Crichton [Fri, 8 Dec 2017 19:31:17 +0000 (11:31 -0800)]
Start migration to the `failure` crate
This commit is the initial steps to migrate Cargo's error handling from the
`error-chain` crate to the `failure` crate. This is intended to be a low-cost
(in terms of diff) transition where possible so it's note "purely idiomatic
`failure` crate" just yet.
The `error-chain` dependency is dropped in this commit and Cargo now canonically
uses the `Error` type from the `failure` crate. The main last remnant of
`error-chain` is a custom local extension trait to use `chain_err` instead of
`with_context`. I'll try to follow up with a commit that renames this later but
I wanted to make sure everything worked first! (and `chain_err` is used
practically everywhere).
Some minor tweaks happened in the tests as I touched up a few error messages
here and there but overall the UI of Cargo should be exactly the same before and
after this commit.
Steven Fackler [Tue, 19 Dec 2017 00:47:35 +0000 (16:47 -0800)]
Avoid an intermediate allocation
Steven Fackler [Tue, 19 Dec 2017 00:45:24 +0000 (16:45 -0800)]
Fix test for Windows
bors [Tue, 19 Dec 2017 00:41:01 +0000 (00:41 +0000)]
Auto merge of #4832 - andreastt:dumb_terminal_progress, r=alexcrichton
util/progress: no progress reporting in dumb terminals
cargo should not assume that all terminals have direct access to
the terminal. Dumb terminals are those that can interpret only a
limited number of control codes (CR, LF, &c.) and the escape codes
used by the progress bar breaks output in these by asserting control
over the cursor position to draw a bar.
A dumb terminal is identified by the TERM output variable being set to
"dumb". This adds a direct check for this in src/cargo/util/progress.rs
because TERM=dumb does not imply the same as the -q flag.
Steven Fackler [Mon, 18 Dec 2017 23:22:04 +0000 (15:22 -0800)]
Template a registry's dl field
Previously, crate files were always downloaded from
`/{crate}/{version}/download`. However, if the backing crate store for a
custom registry is a raw file server rather than an API endpoint that
requires every file to be named `download` which is a bit weird. Now a
registry's dl URL can be templated with `{crate}` and `{version}` to
have more control over the resulting path.
For backwards compatibility, we append the default template suffix onto
the dl URL if neither of the template parameters are present for
backwards compatibility.
bors [Mon, 18 Dec 2017 19:30:28 +0000 (19:30 +0000)]
Auto merge of #4818 - alexcrichton:rename-link-paths, r=matklad
Fix renaming a project using build scripts
This commit fixes an issue in Cargo where if a project's folder was
renamed but it also contained a build script the project could break.
Cargo would continue to use the previous `rustc-link-search` arguments
to configure env vars like `LD_LIBRARY_PATH` but the literal values from
the previous compilation would be stale as the directories would no
longer be there.
To fix this when parsing the build script output we now retain a log of
the previous output directory of a build script invocation as well as
the current output, tweaking paths as appropriate if they were contained
in the output folder.
Closes #4053
Alex Crichton [Thu, 14 Dec 2017 04:54:01 +0000 (20:54 -0800)]
Fix renaming a project using build scripts
This commit fixes an issue in Cargo where if a project's folder was
renamed but it also contained a build script the project could break.
Cargo would continue to use the previous `rustc-link-search` arguments
to configure env vars like `LD_LIBRARY_PATH` but the literal values from
the previous compilation would be stale as the directories would no
longer be there.
To fix this when parsing the build script output we now retain a log of
the previous output directory of a build script invocation as well as
the current output, tweaking paths as appropriate if they were contained
in the output folder.
Closes #4053
Andreas Tolfsen [Mon, 18 Dec 2017 16:01:30 +0000 (16:01 +0000)]
util/progress: no progress reporting in dumb terminals
cargo should not assume that all terminals have direct access to
the terminal. Dumb terminals are those that can interpret only a
limited number of control codes (CR, LF, &c.) and the escape codes
used by the progress bar breaks output in these by asserting control
over the cursor position to draw a bar.
A dumb terminal is identified by the TERM output variable being set to
"dumb". This adds a direct check for this in src/cargo/util/progress.rs
because TERM=dumb does not imply the same as the -q flag.
bors [Mon, 18 Dec 2017 15:13:48 +0000 (15:13 +0000)]
Auto merge of #4828 - SimonSapin:virtual-err, r=alexcrichton
Don’t swallow virtual manifest parsing errors
Before this change, `cargo::util::toml::do_read_manifest` ended like this:
```rust
return match TomlManifest::to_real_manifest(/* … */) {
Ok(/* … */) => /* … */,
Err(e) => match TomlManifest::to_virtual_manifest(/* … */) {
Ok(/* … */) => /* … */,
Err(..) => Err(e),
}
};
```
Errors returned by `to_virtual_manifest` were always ignored. As a result, when something was wrong in a virtual manifest, Cargo would unhelpfully exit with no more output than:
```
error: failed to parse manifest at `/tmp/a/Cargo.toml`
Caused by:
no `package` section found.
```
http://doc.crates.io/manifest.html#virtual-manifest defines a virtual manifest as “the `package` table is not present”, so let’s first determine if a manifest is virtual based on that criteria, and then only call one of the two methods.
Although it is not mentioned in the documentation, `[project]` seems to be in the code an alias for `[package]`. So let’s preserve that here too.
Simon Sapin [Sun, 17 Dec 2017 21:58:51 +0000 (22:58 +0100)]
Don’t swallow virtual manifest parsing errors
Before this change, `cargo::util::toml::do_read_manifest` ended like this:
```rust
return match TomlManifest::to_real_manifest(/* … */) {
Ok(/* … */) => /* … */,
Err(e) => match TomlManifest::to_virtual_manifest(/* … */) {
Ok(/* … */) => /* … */,
Err(..) => Err(e),
}
};
```
Errors returned by `to_virtual_manifest` were always ignored.
As a result, when something was wrong in a virtual manifest,
Cargo would unhelpfully exit with no more output than:
```
error: failed to parse manifest at `/tmp/a/Cargo.toml`
Caused by:
no `package` section found.
```
http://doc.crates.io/manifest.html#virtual-manifest defines
a virtual manifest as “the `package` table is not present”,
so let’s first determine if a manifest is virtual based
on that criteria, and then only call one of the two methods.
Although it is not mentioned in the documentation,
`[project]` seems to be in the code an alias for `[package]`.
So let’s preserve that here too.