bors [Mon, 12 Feb 2018 22:32:11 +0000 (22:32 +0000)]
Auto merge of #5033 - alexcrichton:update-deps, r=matklad
Update dependencies
Just a few major updates here and there
Alex Crichton [Mon, 12 Feb 2018 20:42:31 +0000 (12:42 -0800)]
Update dependencies
Just a few major updates here and there
bors [Mon, 12 Feb 2018 22:02:00 +0000 (22:02 +0000)]
Auto merge of #5032 - matklad:lazycell, r=alexcrichton
Switch to lazycell from crate.io
This switches from a home-grown implementation of `lazycell` to the one from crates.io.
There are no particularly large improvements here, but our own lazy cell is definitely unsafe in theory, because of potential reentrancy in `get_or_try_init`, and the one from crates.io does not have at least this hole :-)
Note that `rustc` already has `lazycell` in its Cargo.lock (because of clippy I guess?), albeit with a lower version, 0.5.
bors [Mon, 12 Feb 2018 20:53:27 +0000 (20:53 +0000)]
Auto merge of #5031 - matthiaskrgr:readme_docs, r=alexcrichton
readme: add link to the cargo documentation on docs.rs
[Rendered](https://github.com/matthiaskrgr/cargo/blob/readme_docs/README.md)
Background: I was searching for cargo source code doc a while back, found the cargo book and crates.io doc relatively quickly but not the actual source code doc which I only found (after way to much time had passed) when I looked up the cargo crate on crates.io and found the "Documentation" link :/
Hope this improves the situation a bit in the future.
Matthias Krüger [Mon, 12 Feb 2018 18:27:45 +0000 (19:27 +0100)]
readme: add link to the cargo documentation on docs.rs
Aleksey Kladov [Mon, 12 Feb 2018 18:33:31 +0000 (21:33 +0300)]
Switch to lazycell from crate.io
bors [Mon, 12 Feb 2018 17:53:00 +0000 (17:53 +0000)]
Auto merge of #5030 - alexcrichton:better-poll, r=matklad
Don't spin on empty fds in `read2` on Unix
This commit fixes what I think is some pathological behavior in Cargo where if
one stdio stream is closed before another then Cargo can accidentally spin in a
tight loop and not block appropriately. Previously, for example, if stderr
closed before stdout then Cargo would spin in a `poll` loop continuously getting
notified that stderr is closed.
The behavior is now changed so after a file descriptor is done we stop passing
it to `poll` and instead only pass the one remaining readable file descriptor.
Alex Crichton [Mon, 12 Feb 2018 17:27:11 +0000 (09:27 -0800)]
Don't spin on empty fds in `read2` on Unix
This commit fixes what I think is some pathological behavior in Cargo where if
one stdio stream is closed before another then Cargo can accidentally spin in a
tight loop and not block appropriately. Previously, for example, if stderr
closed before stdout then Cargo would spin in a `poll` loop continuously getting
notified that stderr is closed.
The behavior is now changed so after a file descriptor is done we stop passing
it to `poll` and instead only pass the one remaining readable file descriptor.
bors [Fri, 9 Feb 2018 18:50:24 +0000 (18:50 +0000)]
Auto merge of #5025 - Eh2406:error_mesges, r=alexcrichton
better resolver error messages
This is a start on beter resolver error messages. This is mostly trying to copy the `links` messages. In the process I found that we wor not testing the common case of having found candidates and still not resolving.
Any advice?
Eh2406 [Wed, 7 Feb 2018 16:51:40 +0000 (11:51 -0500)]
better error messages
bors [Fri, 9 Feb 2018 00:22:00 +0000 (00:22 +0000)]
Auto merge of #5024 - debris:helpful_message, r=alexcrichton
Add helpful message when running cargo doc --open
Add helpful message when running cargo doc --open in the root of the workspace.
closes #4962
old output:
```
Documenting foo v0.1.0 (file:///Users/marek/projects/ethcore/tmp/dupa/foo)
Documenting bar v0.1.0 (file:///Users/marek/projects/ethcore/tmp/dupa/bar)
Finished dev [unoptimized + debuginfo] target(s) in 0.78 secs
error: Passing multiple packages and `open` is not supported
```
new output:
```
Documenting foo v0.1.0 (file:///Users/marek/projects/ethcore/tmp/dupa/foo)
Documenting bar v0.1.0 (file:///Users/marek/projects/ethcore/tmp/dupa/bar)
Finished dev [unoptimized + debuginfo] target(s) in 0.81 secs
error: Passing multiple packages and `open` is not supported.
Please re-run this command with `-p <spec>` where `<spec>` is one of the following:
foo
bar
```
debris [Thu, 8 Feb 2018 21:50:35 +0000 (22:50 +0100)]
Add helpful message when running cargo doc --open in the root of the workspace, fixes #4962
Eh2406 [Wed, 7 Feb 2018 22:50:03 +0000 (17:50 -0500)]
generalize the path_to_top from the links errors
Eh2406 [Wed, 7 Feb 2018 22:45:02 +0000 (17:45 -0500)]
test for the most common cargo resolver error
bors [Wed, 7 Feb 2018 23:11:35 +0000 (23:11 +0000)]
Auto merge of #5020 - stefanbirkner:linkfix, r=alexcrichton
Fix link to documentation
Stefan Birkner [Sat, 3 Feb 2018 21:48:24 +0000 (22:48 +0100)]
Fix link to documentation
bors [Wed, 7 Feb 2018 02:06:13 +0000 (02:06 +0000)]
Auto merge of #5018 - brotzeit:clippy, r=alexcrichton
apply clippy suggestions
I want to try if this actually works =)
There are many other clippy suggestions. I wonder if I can take them for granted or if some of them would be refused.
For example:
```
warning: Constants have by default a `'static` lifetime
--> src/cargo/lib.rs:53:23
|
53 | pub const CARGO_ENV: &'static str = "CARGO";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= note: #[warn(const_static_lifetime)] on by default
= help: for further information visit https://rust-lang-nursery.github.io/rust-clippy/v0.0.185/index.html#const_static_lifetime
```
brotzeit [Tue, 6 Feb 2018 21:49:50 +0000 (22:49 +0100)]
apply clippy suggestions
bors [Tue, 6 Feb 2018 18:27:28 +0000 (18:27 +0000)]
Auto merge of #5011 - Manishearth:stealing-chickens-off-the-internet, r=alexcrichton
Implement RFC 2052: Epoches
Todo:
- Make epoches affect the fingerprint
- Tests
cc https://github.com/rust-lang/rust/issues/44581
Rust PR: https://github.com/rust-lang/rust/pull/48014
r? @acrichto
Manish Goregaokar [Tue, 6 Feb 2018 17:33:30 +0000 (09:33 -0800)]
epoch -> rust
bors [Tue, 6 Feb 2018 17:33:20 +0000 (17:33 +0000)]
Auto merge of #5017 - matthiaskrgr:manifest_cgu_lto, r=alexcrichton
manifest reference: correct statement: codegen-units=x is not ignored if lto=true.
Also fix typo along the way.
bors [Tue, 6 Feb 2018 17:05:37 +0000 (17:05 +0000)]
Auto merge of #4834 - aidanhs:aphs-better-backtrack, r=alexcrichton
Make resolution backtracking smarter
There's no need to try every candidate for every dependency when backtracking - instead, only try candidates if they *could* change the eventual failure that caused backtracking in the first place, i.e.
1. if we've backtracked past the parent of the dep that failed
2. the number of activations for the dep has changed (activations are only ever added during resolution I believe)
The two new tests before:
```
$ /usr/bin/time cargo test --test resolve -- --test-threads 1 --nocapture resolving_with_constrained_sibling_
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running target/debug/deps/resolve-
19b2a13e5a19eed8
38.45user 2.16system 0:42.00elapsed 96%CPU (0avgtext+0avgdata 47672maxresident)k
0inputs+1664096outputs (0major+10921minor)pagefaults 0swaps
```
After:
```
$ /usr/bin/time cargo test --test resolve -- --test-threads 1 --nocapture resolving_with_constrained_sibling_
Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
Running target/debug/deps/resolve-
19b2a13e5a19eed8
[...]
0.36user 0.01system 0:00.49elapsed 76%CPU (0avgtext+0avgdata 47464maxresident)k
0inputs+32outputs (0major+11602minor)pagefaults 0swaps
```
You observe the issue yourself with the following (it should fail, but hangs for a while instead - I didn't bother timing it and waiting for it to finish. With this PR it terminates almost instantly):
```
$ cargo new --bin x
Created binary (application) `x` project
$ /bin/echo -e 'serde = "=1.0.9"\nrust-s3 = "0.8"' >> x/Cargo.toml
$ cd x && cargo build
Updating registry `https://github.com/rust-lang/crates.io-index`
Resolving dependency graph...
```
Matthias Krüger [Tue, 6 Feb 2018 12:27:56 +0000 (13:27 +0100)]
manifest reference: correct statement: codegen-units=x is not ignored if lto=true.
Also fix typo along the way.
bors [Tue, 6 Feb 2018 06:08:23 +0000 (06:08 +0000)]
Auto merge of #5013 - withoutboats:no-rust-rename, r=matklad
Do not rename packages on `cargo new`.
Prior to this commit, packages beginning with `rust` or ending with
`rs` were renamed automatically when created, unless they were
binaries. The ostensible purpose of this code was to avoid people
uploading "redundant" names to crates.io, which is a repository of
Rust packages.
This behavior was overly opinionated. It is not cargo's
responsibility to discourage users from naming their packages any
particular way. Without a sound technical reasons why packages
cannot be named a certain way, cargo should not be intervening in
users' package naming decisions.
It also did this by automatically renaming the package for the
user, as opposed to erroring. Though it printed a message about
the behavior, it did not give the user a choice to abort the
process; to overrule cargo they had to delete the new project
and start again using the `--name` argument.
`cargo new` is many users' first entrypoint to the Rust ecosystem.
This behavior teaches a user that Rust is opinionated and magical,
both of which are divisive attributes for a tool, and attributes
which do not generally describe Rust's attitude toward things like
names and formatting.
If crates.io wishes to enforce that users not upload packages with
names like this, it should be enforced by crates.io at publish
time.
Manish Goregaokar [Mon, 5 Feb 2018 21:42:42 +0000 (16:42 -0500)]
Add tests for epoch
Manish Goregaokar [Mon, 5 Feb 2018 21:21:40 +0000 (16:21 -0500)]
Include the epoch in the fingerprint
Manish Goregaokar [Mon, 5 Feb 2018 16:29:31 +0000 (11:29 -0500)]
Pass -Zepoch flag when epoch feature exists
Manish Goregaokar [Mon, 5 Feb 2018 15:28:17 +0000 (10:28 -0500)]
Feature gate epoches
Manish Goregaokar [Mon, 5 Feb 2018 15:23:07 +0000 (10:23 -0500)]
Add epoch key to [package]
Aidan Hobson Sayers [Tue, 6 Feb 2018 02:15:17 +0000 (02:15 +0000)]
Add reference to clarifying comment
boats [Mon, 5 Feb 2018 23:49:49 +0000 (15:49 -0800)]
Remove tests related to stripping names.
boats [Mon, 5 Feb 2018 23:04:17 +0000 (15:04 -0800)]
Do not rename packages on `cargo new`.
Prior to this commit, packages beginning with `rust` or ending with
`rs` were renamed automatically when created, unless they were
binaries. The ostensible purpose of this code was to avoid people
uploading "redundant" names to crates.io, which is a repository of
Rust packages.
This behavior was overly opinionated. It is not cargo's
responsibility to discourage users from naming their packages any
particular way. Without a sound technical reasons why packages
cannot be named a certain way, cargo should not be intervening in
users' package naming decisions.
It also did this by automatically renaming the package for the
user, as opposed to erroring. Though it printed a message about
the behavior, it did not give the user a choice to abort the
process; to overrule cargo they had to delete the new project
and start again using the `--name` argument.
`cargo new` is many users' first entrypoint to the Rust ecosystem.
This behavior teaches a user that Rust is opinionated and magical,
both of which are divisive attributes for a tool, and attributes
which do not generally describe Rust's attitude toward things like
names and formatting.
If crates.io wishes to enforce that users not upload packages with
names like this, it should be enforced by crates.io at publish
time.
bors [Mon, 5 Feb 2018 21:22:16 +0000 (21:22 +0000)]
Auto merge of #4976 - mbrubeck:doc-check, r=alexcrichton
cargo doc: Generate rmeta files for dependencies instead of compiling rlibs
This makes `cargo doc` require only metadata (`.rmeta` files) instead of compiled libraries (`.rlib` files) for dependencies. This makes `cargo doc` faster in cases where rlibs are not already built and/or metadata is already available.
Unfortunately, this is not a win for every workflow. In the case where the user has already compiled but has not generated metadata, it makes `cargo doc` do extra work. This is probably a common case, though tools like RLS and `cargo check` mean that many developers *will* have up-to-date metadata available.
It would become an unequivocal win if `cargo build` and `cargo check` re-used shared metadata (#3501). For now, starting from a clean working directory, the following sequences of commands will become:
* `cargo doc`: faster
* `cargo build; cargo doc`: slower
* `cargo check; cargo doc`: faster
* `cargo build --release; cargo doc`: faster
* `cargo check; cargo build; cargo doc`: no change
Matt Brubeck [Mon, 5 Feb 2018 18:31:22 +0000 (10:31 -0800)]
Clean up lib_or_check_profile code
Matt Brubeck [Wed, 24 Jan 2018 20:37:19 +0000 (12:37 -0800)]
cargo doc: Generate metadata instead of compiling dependencies
bors [Mon, 5 Feb 2018 05:11:39 +0000 (05:11 +0000)]
Auto merge of #5008 - matthiaskrgr:codespell, r=alexcrichton
fix a bunch of typos found by codespell
https://github.com/lucasdemarchi/codespell/
Matthias Krüger [Sun, 4 Feb 2018 21:30:22 +0000 (22:30 +0100)]
fix a bunch of typos found by codespell
bors [Sun, 4 Feb 2018 13:21:01 +0000 (13:21 +0000)]
Auto merge of #5004 - BurNiinTRee:pijul-config-key, r=matklad
Added "pijul" as a config key for cargo-new.vcs in .cargo/config
Currently Pijul can only be set as a version control from the command-line but not from the cargo-new.vcs key in .cargo/config
Lars Mühmel [Sun, 4 Feb 2018 13:06:03 +0000 (14:06 +0100)]
Added "pijul" as a config key for cargo-new.vcs in .cargo/config
Aidan Hobson Sayers [Sat, 3 Feb 2018 21:49:42 +0000 (21:49 +0000)]
Elaborate on test configuration, add a new test
Aidan Hobson Sayers [Sat, 3 Feb 2018 21:24:22 +0000 (21:24 +0000)]
Clearer desired behaviour with an assertion
Aidan Hobson Sayers [Mon, 18 Dec 2017 17:06:45 +0000 (17:06 +0000)]
Make resolution backtracking smarter
There's no need to try every candidate for every dependency - instead,
only try alternative candidates if they *could* change the eventual
failure that caused backtracking in the first place.
bors [Thu, 1 Feb 2018 19:12:19 +0000 (19:12 +0000)]
Auto merge of #4995 - alexcrichton:relative-env, r=matklad
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.
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.
bors [Wed, 31 Jan 2018 22:14:53 +0000 (22:14 +0000)]
Auto merge of #4990 - Eh2406:Zno-index-update, r=alexcrichton
add a -Z no-index-update for crater and benchmarking
This is a fix for #3479
Eh2406 [Wed, 31 Jan 2018 21:12:19 +0000 (16:12 -0500)]
add a test
bors [Wed, 31 Jan 2018 20:33:03 +0000 (20:33 +0000)]
Auto merge of #4996 - alexcrichton:document-lto, r=matklad
Document string values for LTO
Alex Crichton [Wed, 31 Jan 2018 19:45:26 +0000 (11:45 -0800)]
Document string values for LTO
bors [Wed, 31 Jan 2018 18:55:53 +0000 (18:55 +0000)]
Auto merge of #4984 - alexcrichton:configure-lto, r=matklad
Allow configuration of LTO in [profile]
This should help give access to ThinLTO when desired!
bors [Wed, 31 Jan 2018 09:20:32 +0000 (09:20 +0000)]
Auto merge of #4991 - bennofs:master, r=matklad
Require at least version 0.1.9 of jobserver crate
There are some important fixes in jobserver >=0.1.8. With earlier
versions, it's possible for cargo to panic with a "failed to acquire
jobserver token" error, which can be very hard to track down.
Requiring the latest version of jobserver makes sure that no such error
can make it into downstream distributions.
Benno Fünfstück [Wed, 31 Jan 2018 09:16:01 +0000 (10:16 +0100)]
Require at least version 0.1.9 of jobserver crate
There are some important fixes in jobserver >=0.1.8. With earlier
versions, it's possible for cargo to panic with a "failed to acquire
jobserver token" error, which can be very hard to track down.
Requiring the latest version of jobserver makes sure that no such error
can make it into downstream distributions.
Eh2406 [Wed, 31 Jan 2018 04:09:13 +0000 (23:09 -0500)]
add a -Z no-index-update for crater and benchmarking
Alex Crichton [Fri, 26 Jan 2018 22:26:13 +0000 (14:26 -0800)]
Allow configuration of LTO in [profile]
This should help give access to ThinLTO when desired!
bors [Fri, 26 Jan 2018 16:45:42 +0000 (16:45 +0000)]
Auto merge of #4980 - Gilnaa:master, r=matklad
Fixed relaxed libtest tests
This fixes tests regarding the upcoming behaviour of libtest's benchmarks.
The previous PR was wrongly tested, this one fixes the problems.
Gilad Naaman [Fri, 26 Jan 2018 16:23:44 +0000 (18:23 +0200)]
Fixed relaxed libtest tests
bors [Thu, 25 Jan 2018 00:37:01 +0000 (00:37 +0000)]
Auto merge of #4957 - sfackler:registry-elaboration, r=alexcrichton
Elaborate registry names to index URLs when publishing
This avoids introducing a dependency on the publisher's name for the
registry.
Closes #4880
bors [Wed, 24 Jan 2018 23:43:20 +0000 (23:43 +0000)]
Auto merge of #4974 - alexcrichton:less-vendor-verify, r=matklad
Be less strict about loading directory sources
Historically Cargo has been pretty strict about loading directory sources by
ensuring that everything inside was a crate. This was intended to protect
against accidental misconfiguration by failing loudly rather than silently
returning fewer crates.
This has caused a number of issues, however:
* #4969
* #4811
* #3899
so it seems like this is too aspirational of Cargo
Closes #4811
Closes #4969
Alex Crichton [Wed, 24 Jan 2018 18:04:47 +0000 (10:04 -0800)]
Be less strict about loading directory sources
Historically Cargo has been pretty strict about loading directory sources by
ensuring that everything inside was a crate. This was intended to protect
against accidental misconfiguration by failing loudly rather than silently
returning fewer crates.
This has caused a number of issues, however:
* #4969
* #4811
* #3899
so it seems like this is too aspirational of Cargo
Closes #4811
Closes #4969
bors [Wed, 24 Jan 2018 22:17:55 +0000 (22:17 +0000)]
Auto merge of #4973 - alexcrichton:dont-require-emscripten, r=matklad
Remove test that requires Emscripten
This seems relatively unlikely to regress in the future and otherwise arranging
Cargo to have a rustc that has Emscripten support will become difficult in the
near future in the Rust repo. All in all it seems like the course of action to
take is to delete this test for now.
Steven Fackler [Wed, 24 Jan 2018 20:54:17 +0000 (12:54 -0800)]
Forbid credentials from registry URLs
Steven Fackler [Thu, 18 Jan 2018 19:53:12 +0000 (11:53 -0800)]
Fixes for feedback
Steven Fackler [Thu, 18 Jan 2018 19:33:26 +0000 (11:33 -0800)]
Elaborate registry names to index URLs when publishing
This avoids introducing a dependency on the publisher's name for the
registry.
Closes #4880
Alex Crichton [Wed, 24 Jan 2018 17:45:01 +0000 (09:45 -0800)]
Remove test that requires Emscripten
This seems relatively unlikely to regress in the future and otherwise arranging
Cargo to have a rustc that has Emscripten support will become difficult in the
near future in the Rust repo. All in all it seems like the course of action to
take is to delete this test for now.
bors [Wed, 24 Jan 2018 15:05:11 +0000 (15:05 +0000)]
Auto merge of #4972 - varkor:lazy-cell-unused-unsafe, r=alexcrichton
Allow unused_unsafe in LazyCell in preparation for lib change
https://github.com/rust-lang/rust/pull/47204 makes `UnsafeCell::into_inner` safe, which means `LazyCell::into_inner` will no longer need an `unsafe` block. `LazyCell` is a blocker for the change in Rust: this fix should allow the change to take place.
varkor [Wed, 24 Jan 2018 09:46:54 +0000 (09:46 +0000)]
Allow unused_unsafe in LazyCell in preparation for lib change
https://github.com/rust-lang/rust/pull/47204 makes `UnsafeCell::into_inner` safe, which means `LazyCell::into_inner` will no longer need an `unsafe` block. `LazyCell` is a blocker for the change in Rust: this fix should allow the change to take place.
bors [Wed, 24 Jan 2018 02:36:53 +0000 (02:36 +0000)]
Auto merge of #4971 - ehuss:overflow-checks-doc, r=alexcrichton
Add overflow-checks to reference documentation.
Fixes #4925.
Eric Huss [Wed, 24 Jan 2018 02:23:58 +0000 (18:23 -0800)]
Add overflow-checks to reference documentation.
Fixes #4925.
bors [Tue, 23 Jan 2018 22:10:46 +0000 (22:10 +0000)]
Auto merge of #4724 - pornel:sortpaths, r=alexcrichton
Sort native library paths for deterministic builds
Fixes #3800 by using a `BTreeSet`, which guarantees a deterministic iteration order.
Since the order was previously arbitrary, a sorted order is just as good. The list is so small, that any performance difference between `BTreeSet` and `HashSet` is negligible.
Kornel [Sat, 20 Jan 2018 17:57:17 +0000 (17:57 +0000)]
Test sorting of native library paths
bors [Mon, 22 Jan 2018 20:55:15 +0000 (20:55 +0000)]
Auto merge of #4970 - Gilnaa:master, r=alexcrichton
Relaxed testing of libtest outputs.
This PR relaxes some checks on libtest due to upcoming changes by this PR:
https://github.com/rust-lang/rust/pull/46450
Summary of expected changes:
- Crashing benchmarks are now caught and handled just like in tests, and should not crash the harness. The old cargo test checked that the panic text was printed in stderr. In the patched behaviour, the text is printed to stdout.
With the advice of @alexcrichton, I changed test to check for the text in either stream in order to account of the transition period.
Gilad Naaman [Mon, 22 Jan 2018 20:27:50 +0000 (22:27 +0200)]
Relaxed testing of libtest outputs.
bors [Mon, 22 Jan 2018 15:33:14 +0000 (15:33 +0000)]
Auto merge of #4968 - edunham:patch-1, r=alexcrichton
Link to crate type docs
This page (served at https://doc.rust-lang.org/cargo/reference/manifest.html) is the first hit I get when searching "cargo crate-type". The doc which actually explains `crate-type`, https://doc.rust-lang.org/reference/linkage.html, does not appear in the first page of results. I hope that linking the reference doc here will make it easier for others to find instead of having to dig into closed GitHub issues like I did to find it.
E. Dunham [Mon, 22 Jan 2018 05:39:27 +0000 (21:39 -0800)]
Link to crate type docs
This page (served at https://doc.rust-lang.org/cargo/reference/manifest.html) is the first hit I get when searching "cargo crate-type". The doc which actually explains `crate-type`, https://doc.rust-lang.org/reference/linkage.html, does not appear in the first page of results. I hope that linking the reference doc here will make it easier for others to find instead of having to dig into closed GitHub issues like I did to find it.
bors [Sun, 21 Jan 2018 18:09:41 +0000 (18:09 +0000)]
Auto merge of #4965 - sfackler:patch-2, r=alexcrichton
Remove outdated stability note
Closes #4964
Steven Fackler [Sun, 21 Jan 2018 06:16:49 +0000 (22:16 -0800)]
Remove outdated stability note
Closes #4964
bors [Sat, 20 Jan 2018 07:17:37 +0000 (07:17 +0000)]
Auto merge of #4844 - sfackler:path-registry-okay, r=alexcrichton
Allow path + registry dependencies
Closes #4843
Do we have any infrastructure for testing what metadata a publish actually sends to the registry?
r? @withoutboats
Steven Fackler [Sat, 20 Jan 2018 06:31:11 +0000 (22:31 -0800)]
Allow path + registry dependencies
Closes #4843
bors [Thu, 18 Jan 2018 19:54:51 +0000 (19:54 +0000)]
Auto merge of #4958 - luser:fix-book-link, r=alexcrichton
Add a missing link in the book for `jobserver`
I don't know what the original intended link destination was, so I chose to link to the GNU Make documentation.
Ted Mielczarek [Thu, 18 Jan 2018 19:51:40 +0000 (14:51 -0500)]
Add a missing link in the book for `jobserver`. I don't know what the original
intended link destination was, so I chose to link to the GNU Make documentation.
bors [Thu, 18 Jan 2018 19:02:11 +0000 (19:02 +0000)]
Auto merge of #4955 - sfackler:allow-package, r=alexcrichton
Allow packaging of crates with unstable features
We don't want them to land on crates.io, but it's fine to make a .crate
file.
Closes #4954
Steven Fackler [Thu, 18 Jan 2018 18:35:40 +0000 (10:35 -0800)]
Allow packaging of crates with unstable features
We don't want them to land on crates.io, but it's fine to make a .crate
file.
Closes #4954
bors [Thu, 18 Jan 2018 06:19:55 +0000 (06:19 +0000)]
Auto merge of #4951 - sfackler:log-bump, r=alexcrichton
Upgrade env_logger
0.4 depends on log 0.3 and so misses out on module names.
Steven Fackler [Tue, 16 Jan 2018 20:43:04 +0000 (12:43 -0800)]
Upgrade env_logger
0.4 depends on log 0.3 and so misses out on module names.
bors [Wed, 17 Jan 2018 16:22:07 +0000 (16:22 +0000)]
Auto merge of #4950 - alexcrichton:rustflags-orderd, r=matklad
Ensure `[target]` rustflags are deterministically passed
The usage of `HashMap` in the `Config` tables introduced some nondeterminism, so
reverse that with a sort right before we pass it down to rustc. One day we'll
probably want to sort by the position where these keys were defined, but for now
a blanket sort should do the trick.
Closes #4935
bors [Wed, 17 Jan 2018 15:39:58 +0000 (15:39 +0000)]
Auto merge of #4949 - alexcrichton:fix-patch-network, r=matklad
Fix `[patch]` sections depending on one another
This commit fixes a bug in `[patch]` where the original source is updated too
often (for example `Updating ...` being printed too much). This bug occurred
when patches depended on each other (for example the dependencies of a resolved
`[patch]` would actually resolve to a `[patch]` that hadn't been resolved yet).
The ordering of resolution/locking wasn't happening correctly and wasn't ready
to break these cycles!
The process of adding `[patch]` sections to a registry has been updated to
account for this bug. Instead of add-and-lock all in one go this commit instead
splits the addition of `[patch]` into two phases. In the first we collect a
bunch of unlocked patch summaries but record all the `PackageId` instances for
each url we've scraped. After all `[patch]` sections have been processed in this
manner we go back and lock all the summaries that were previously unlocked. The
`lock` function was updated to *only* need the map of patches from URL to
`PackageId` as it doesn't actually have access to the full `Summary` of patches
during the `lock_patches` method.
All in all this should correctly resolve dependencies here which means that
processing of patches should proceed as usual, avoiding updating the registry
too much!
Closes #4941
bors [Wed, 17 Jan 2018 15:04:54 +0000 (15:04 +0000)]
Auto merge of #4952 - rust-lang:matklad-patch-1, r=alexcrichton
Fix link in a doc comment
Aleksey Kladov [Wed, 17 Jan 2018 07:27:37 +0000 (10:27 +0300)]
Fix link in a doc comment
Alex Crichton [Tue, 16 Jan 2018 19:22:40 +0000 (11:22 -0800)]
Ensure `[target]` rustflags are deterministically passed
The usage of `HashMap` in the `Config` tables introduced some nondeterminism, so
reverse that with a sort right before we pass it down to rustc. One day we'll
probably want to sort by the position where these keys were defined, but for now
a blanket sort should do the trick.
Closes #4935
Alex Crichton [Tue, 16 Jan 2018 15:33:59 +0000 (07:33 -0800)]
Fix `[patch]` sections depending on one another
This commit fixes a bug in `[patch]` where the original source is updated too
often (for example `Updating ...` being printed too much). This bug occurred
when patches depended on each other (for example the dependencies of a resolved
`[patch]` would actually resolve to a `[patch]` that hadn't been resolved yet).
The ordering of resolution/locking wasn't happening correctly and wasn't ready
to break these cycles!
The process of adding `[patch]` sections to a registry has been updated to
account for this bug. Instead of add-and-lock all in one go this commit instead
splits the addition of `[patch]` into two phases. In the first we collect a
bunch of unlocked patch summaries but record all the `PackageId` instances for
each url we've scraped. After all `[patch]` sections have been processed in this
manner we go back and lock all the summaries that were previously unlocked. The
`lock` function was updated to *only* need the map of patches from URL to
`PackageId` as it doesn't actually have access to the full `Summary` of patches
during the `lock_patches` method.
All in all this should correctly resolve dependencies here which means that
processing of patches should proceed as usual, avoiding updating the registry
too much!
Closes #4941
bors [Tue, 16 Jan 2018 06:11:46 +0000 (06:11 +0000)]
Auto merge of #4944 - mathstuf:better-gitignore-template, r=alexcrichton
cargo_new: drop the trailing slash for target exclusion in Git
When `target` is a symlink (e.g., to keep build outputs on a separate
partition), Git will not match the `/target/` ignore to the symlink
since it is not a directory. Drop the trailing slash to support ignoring
`target` as a symlink.
bors [Tue, 16 Jan 2018 05:37:39 +0000 (05:37 +0000)]
Auto merge of #4945 - mathstuf:avoid-unused-import, r=alexcrichton
tests/git: avoid an unused import
bors [Tue, 16 Jan 2018 00:18:10 +0000 (00:18 +0000)]
Auto merge of #4946 - segevfiner:patch-1, r=Mark-Simulacrum
Remove a stray character from the Zsh completion script
That's not a command that people normally use, found it by accident...
Segev Finer [Mon, 15 Jan 2018 23:47:40 +0000 (01:47 +0200)]
Remove a stray character from the Zsh completion script
That's not a command that people normally use, found it by accident...
Ben Boeckel [Mon, 15 Jan 2018 22:06:38 +0000 (17:06 -0500)]
tests/git: avoid an unused import
Ben Boeckel [Mon, 15 Jan 2018 22:07:56 +0000 (17:07 -0500)]
cargo_new: drop the trailing slash for target exclusion in Git
When `target` is a symlink (e.g., to keep build outputs on a separate
partition), Git will not match the `/target/` ignore to the symlink
since it is not a directory. Drop the trailing slash to support ignoring
`target` as a symlink.
bors [Sat, 13 Jan 2018 23:59:50 +0000 (23:59 +0000)]
Auto merge of #4938 - ehuss:ws-meta, r=alexcrichton
Add workspace root to metadata command.
Fixes #4933
@alexcrichton, you mentioned using `"workspace_manifest"`, but the `Workspace.root` function already strips off `Cargo.toml`. It would be easy to append it back, though I'm uncertain if that's really necessary since I think for most use cases it will just need to be stripped off again. Also, I feel like it might be confusing for non-workspace packages since `workspace_manifest` would be the same as the package `manifest_path` (and in that case it isn't really a workspace manifest). I can easily change it, just let me know.
bors [Sat, 13 Jan 2018 23:31:57 +0000 (23:31 +0000)]
Auto merge of #4939 - ignatenkobrain:license, r=alexcrichton
crates-io: include LICENSE-*
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Igor Gnatenko [Sat, 13 Jan 2018 21:07:44 +0000 (22:07 +0100)]
crates-io: include LICENSE-*
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Eric Huss [Sat, 13 Jan 2018 19:51:36 +0000 (11:51 -0800)]
Add workspace root to metadata command.
Fixes #4933
bors [Thu, 11 Jan 2018 09:18:22 +0000 (09:18 +0000)]
Auto merge of #4931 - Manishearth:testname, r=matklad
Explicitly mention testname argument for cargo test/bench
The fact that `cargo test foo` works is totally non obvious. I suspect that 99% of the time
folks running `cargo help test` are looking for a way to only run a specific test, and
the current help message makes it seem like the way to do that is `cargo test --test foo`,
which is incorrect (it runs a specific test target).
This PR mentions it explicitly in the help message, first and foremost.