cargo.git
7 years agoAdd thorough tests for target/profile selection.
Eric Huss [Sat, 21 Apr 2018 20:57:54 +0000 (13:57 -0700)]
Add thorough tests for target/profile selection.

7 years agoMove profile override tests to a dedicated file.
Eric Huss [Sat, 21 Apr 2018 20:47:01 +0000 (13:47 -0700)]
Move profile override tests to a dedicated file.

7 years agorustfmt
Eric Huss [Sat, 21 Apr 2018 19:16:03 +0000 (12:16 -0700)]
rustfmt

7 years agoRemove last TODO comments.
Eric Huss [Sat, 21 Apr 2018 18:18:05 +0000 (11:18 -0700)]
Remove last TODO comments.

7 years agoSome test cleanup for profiles.
Eric Huss [Sat, 21 Apr 2018 17:41:05 +0000 (10:41 -0700)]
Some test cleanup for profiles.

7 years agoAdd more profile override validation tests.
Eric Huss [Sat, 21 Apr 2018 17:03:23 +0000 (10:03 -0700)]
Add more profile override validation tests.

7 years agoAdd test for profile override on non-dev/release.
Eric Huss [Sat, 21 Apr 2018 16:50:55 +0000 (09:50 -0700)]
Add test for profile override on non-dev/release.

7 years agoAdd warning if `panic` is set in test or bench profile.
Eric Huss [Sat, 21 Apr 2018 16:40:00 +0000 (09:40 -0700)]
Add warning if `panic` is set in test or bench profile.

7 years agoAdd warnings for unknown profile overrides.
Eric Huss [Sat, 21 Apr 2018 05:19:16 +0000 (22:19 -0700)]
Add warnings for unknown profile overrides.

7 years agoMinor tweaks on how examples are handled with tests, and some panic propagation.
Eric Huss [Sat, 21 Apr 2018 02:43:57 +0000 (19:43 -0700)]
Minor tweaks on how examples are handled with tests, and some panic propagation.

7 years agoAvoid running `build.rs` too often.
Eric Huss [Fri, 20 Apr 2018 20:20:38 +0000 (13:20 -0700)]
Avoid running `build.rs` too often.

7 years agoAdd extra rustc/rustdoc args to the fingerprint and metadata.
Eric Huss [Thu, 19 Apr 2018 02:54:01 +0000 (19:54 -0700)]
Add extra rustc/rustdoc args to the fingerprint and metadata.

7 years agoUpdate for some review comments.
Eric Huss [Thu, 19 Apr 2018 02:17:38 +0000 (19:17 -0700)]
Update for some review comments.

7 years agoFix a variety of profile bugs.
Eric Huss [Thu, 19 Apr 2018 00:21:03 +0000 (17:21 -0700)]
Fix a variety of profile bugs.

7 years agoMove `Profile` back into `Unit` as a copy.
Eric Huss [Wed, 18 Apr 2018 18:41:58 +0000 (11:41 -0700)]
Move `Profile` back into `Unit` as a copy.

The de-duplication of Units just doesn't work without it.

7 years agoMinor cleanup.
Eric Huss [Wed, 18 Apr 2018 14:03:17 +0000 (07:03 -0700)]
Minor cleanup.

7 years agoProfile Overrides (RFC #2282 Part 1)
Eric Huss [Wed, 18 Apr 2018 01:46:44 +0000 (18:46 -0700)]
Profile Overrides (RFC #2282 Part 1)

7 years agoAuto merge of #5415 - alexcrichton:rename-same-dep, r=matklad
bors [Fri, 27 Apr 2018 17:48:52 +0000 (17:48 +0000)]
Auto merge of #5415 - alexcrichton:rename-same-dep, r=matklad

Fix renaming crates as they come from 2 sources

Previously there was a verification in manifest parsing that the same dependency
must come from the same source, but this erroneously triggered an error to get
emitted when the `package` key was used to rename crates. The first change here
was to update that clause to key off the `rename` field rather than the `name`
field.

Afterwards, though, this exposed an existing bug in the implementation. During
compilation we have a `Resolve` which is a graph of crates, but we don't know
*why* each edge in the dependency graph exists. In other words we don't know,
when looking at an edge of the graph, what `Dependency` caused that edge to be
drawn. We need to know this when passing `--extern` flags because the
`Dependency` is what lists what's being renamed.

This commit then primarily refactors `Resolve::deps` from an iterator of package
ids to an iterator of a tuples. The first element is the package id from before
and the second element is a list of `Dependency` directives which caused the
edge to ber driven.

This refactoring cleaned up a few places in the backend where we had to work
around the lack of this knowledge. Namely this also fixes the extra test added
here.

Closes #5413

7 years agoFix renaming crates as they come from 2 sources
Alex Crichton [Wed, 25 Apr 2018 17:41:33 +0000 (10:41 -0700)]
Fix renaming crates as they come from 2 sources

Previously there was a verification in manifest parsing that the same dependency
must come from the same source, but this erroneously triggered an error to get
emitted when the `package` key was used to rename crates. The first change here
was to update that clause to key off the `rename` field rather than the `name`
field.

Afterwards, though, this exposed an existing bug in the implementation. During
compilation we have a `Resolve` which is a graph of crates, but we don't know
*why* each edge in the dependency graph exists. In other words we don't know,
when looking at an edge of the graph, what `Dependency` caused that edge to be
drawn. We need to know this when passing `--extern` flags because the
`Dependency` is what lists what's being renamed.

This commit then primarily refactors `Resolve::deps` from an iterator of package
ids to an iterator of a tuples. The first element is the package id from before
and the second element is a list of `Dependency` directives which caused the
edge to ber driven.

This refactoring cleaned up a few places in the backend where we had to work
around the lack of this knowledge. Namely this also fixes the extra test added
here.

Closes #5413

7 years agoAuto merge of #5349 - bmwill:fetch-by-target, r=alexcrichton
bors [Fri, 27 Apr 2018 15:36:16 +0000 (15:36 +0000)]
Auto merge of #5349 - bmwill:fetch-by-target, r=alexcrichton

cargo-fetch: add option to fetch for a target

Teach cargo-fetch how to optionally fetch dependencies based on a target
platform by specifying the target triple via `--target <TRIPLE>`.

#5216

7 years agoAuto merge of #5410 - klnusbaum:edition_5406, r=matklad
bors [Fri, 27 Apr 2018 15:14:03 +0000 (15:14 +0000)]
Auto merge of #5410 - klnusbaum:edition_5406, r=matklad

switch to using the --edition flag

Now that we have an `--edition` flag in the rust compiler, let's switch to using it.

fixes #5406

7 years agocargo-fetch: add option to fetch for a target
Brandon Williams [Mon, 9 Apr 2018 18:31:04 +0000 (11:31 -0700)]
cargo-fetch: add option to fetch for a target

Teach cargo-fetch how to optionally fetch dependencies based on a target
platform by specifying the target triple via `--target <TRIPLE>`.

Signed-off-by: Brandon Williams <bmwill@google.com>
7 years agoAuto merge of #5394 - henriklaxhuber:master, r=alexcrichton
bors [Tue, 24 Apr 2018 14:36:52 +0000 (14:36 +0000)]
Auto merge of #5394 - henriklaxhuber:master, r=alexcrichton

Pass linker path to build script

This change adds the environment variable LINKER to pass the path of the linker used by cargo to the build script. This complements the variable RUSTC (the rustc binary used) to give the build script full knowledge of its environment.

A specific usage example would be automatically generating bindings to system headers in cross compilation, e.g. by locating jni.h for android targets.

7 years agoAuto merge of #5393 - smithsps:master, r=matklad
bors [Tue, 24 Apr 2018 14:12:10 +0000 (14:12 +0000)]
Auto merge of #5393 - smithsps:master, r=matklad

Add target directory parameter --target-dir

Implements: https://github.com/rust-lang/cargo/issues/5308

Adds a target directory parameter, that acts in the same manner as the environment variable `CARGO_TARGET_DIR`, to the following subcommands:
- `bench`
- `build`
- `check`
- `clean`
- `doc`
- `package`
- `publish`
- `run`
- `rustc`
- `rustdoc`
- `test`

7 years agoAuto merge of #5398 - dwijnand:drop-legacy-paths, r=matklad
bors [Tue, 24 Apr 2018 09:07:18 +0000 (09:07 +0000)]
Auto merge of #5398 - dwijnand:drop-legacy-paths, r=matklad

Drop legacy path support under Rust edition 2018 (or later)

builds on #5335

submitted for early feedback: wdyt @matklad? is this what you had in mind? what should change? what should be added? how should we test this? is the current (2015) messaging enough to drop it in 2018?

r? @matklad

<!--{"baseBranch":"rust-lang:cargo:target-autodiscovery"}-->

7 years agoAdd target directory parameter: address suggestions
Simon Smith [Tue, 24 Apr 2018 06:15:55 +0000 (02:15 -0400)]
Add target directory parameter: address suggestions

7 years agoMoved RUSTC_LINKER test into its own fn
Henrik Laxhuber [Tue, 24 Apr 2018 06:18:33 +0000 (08:18 +0200)]
Moved RUSTC_LINKER test into its own fn

7 years agoAdd target directory parameter --target-dir
Simon Smith [Mon, 16 Apr 2018 23:50:30 +0000 (19:50 -0400)]
Add target directory parameter --target-dir

7 years agoFixed RUSTC_LINKER test for Windows hosts
Henrik Laxhuber [Mon, 23 Apr 2018 16:28:38 +0000 (18:28 +0200)]
Fixed RUSTC_LINKER test for Windows hosts

7 years agoFixed build script env var test
Henrik Laxhuber [Mon, 23 Apr 2018 15:45:17 +0000 (17:45 +0200)]
Fixed build script env var test

7 years agoAdded tests for RUSTC_LINKER buils script env var
Henrik Laxhuber [Mon, 23 Apr 2018 15:11:10 +0000 (17:11 +0200)]
Added tests for RUSTC_LINKER buils script env var

Added tests for the environment variable RUSTC_LINKER that is
passed to the build script.
Also slightly improved readability of the code responsible for
passing the env var.

7 years agoswitch to using the --edition flag
Kurtis Nusbaum [Sun, 22 Apr 2018 19:14:21 +0000 (12:14 -0700)]
switch to using the --edition flag

7 years agoAuto merge of #5407 - klausi:fixed-minimal-versions, r=matklad
bors [Sun, 22 Apr 2018 19:11:37 +0000 (19:11 +0000)]
Auto merge of #5407 - klausi:fixed-minimal-versions, r=matklad

fix(dependendies): Bump minimal dependency versions so that cargo successfully builds with those

Spin-off from #5275 .

Just bump the minimum dependency versions here, we are developing CI testing in #5275 .

7 years agofix(dependendies): Bump minimal dependency versions so that cargo successfully builds...
Klaus Purer [Sun, 22 Apr 2018 18:55:53 +0000 (20:55 +0200)]
fix(dependendies): Bump minimal dependency versions so that cargo successfully builds with those

7 years agoAuto merge of #5405 - dwijnand:contributing-lint-overrides, r=matklad
bors [Sun, 22 Apr 2018 16:38:01 +0000 (16:38 +0000)]
Auto merge of #5405 - dwijnand:contributing-lint-overrides, r=matklad

Detail how to override lint warnings when compiling tests

alternative to #5403

7 years agoDetail how to override lint warnings when compiling tests
Dale Wijnand [Sun, 22 Apr 2018 16:35:47 +0000 (17:35 +0100)]
Detail how to override lint warnings when compiling tests

7 years agoAuto merge of #5404 - matklad:remove-useless-nightly, r=matklad
bors [Sun, 22 Apr 2018 15:26:44 +0000 (15:26 +0000)]
Auto merge of #5404 - matklad:remove-useless-nightly, r=matklad

Remove some `is_nightly` checks from tests

7 years agoRemove some `is_nightly` checks from tests
Aleksey Kladov [Sun, 22 Apr 2018 15:06:21 +0000 (18:06 +0300)]
Remove some `is_nightly` checks from tests

7 years agoAuto merge of #5400 - kornelski:master, r=alexcrichton
bors [Sat, 21 Apr 2018 19:57:10 +0000 (19:57 +0000)]
Auto merge of #5400 - kornelski:master, r=alexcrichton

Docs: rename gcc-rs → cc-rs

7 years agoDocs: rename gcc-rs → cc-rs
Kornel [Sat, 21 Apr 2018 19:40:59 +0000 (20:40 +0100)]
Docs: rename gcc-rs → cc-rs

7 years agoDrop legacy path support under Rust edition 2018 (or later)
Dale Wijnand [Sat, 21 Apr 2018 14:08:40 +0000 (15:08 +0100)]
Drop legacy path support under Rust edition 2018 (or later)

7 years agoAdded missing file extension
Henrik Laxhuber [Sat, 21 Apr 2018 16:43:03 +0000 (18:43 +0200)]
Added missing file extension

7 years agoChanged LINKER env var to RUSTC_LINKER, improved docs
Henrik Laxhuber [Sat, 21 Apr 2018 16:41:41 +0000 (18:41 +0200)]
Changed LINKER env var to RUSTC_LINKER, improved docs

7 years agoAuto merge of #5335 - dwijnand:target-autodiscovery, r=alexcrichton
bors [Sat, 21 Apr 2018 16:10:13 +0000 (16:10 +0000)]
Auto merge of #5335 - dwijnand:target-autodiscovery, r=alexcrichton

Introduce autoXXX keys for target auto-discovery

In Rust 2015 absence of the configuration makes it default to not
include auto-discovered targets (i.e false), with a warnings message.

In Rust 2018 absence makes it default to include auto-discovered
targets (i.e true).

Fixes #5330

---

_original_

Fixes #5330

submitted for early review. feedback very welcome, I'm happy to iterate (and learn).

in particular I require assistance with the borrowing of `warnings` in `clean_benches`.

7 years agoAuto merge of #5399 - dwijnand:cleanup/drop-an-old-visible-doc-todo, r=matklad
bors [Sat, 21 Apr 2018 14:51:24 +0000 (14:51 +0000)]
Auto merge of #5399 - dwijnand:cleanup/drop-an-old-visible-doc-todo, r=matklad

Drop an old visible doc TODO

Looks like this originates from
https://github.com/istankovic/cargo-book/commit/418611304daac22e3590aee9322355ae159802fe

But it's even visible in the render docs:
https://doc.rust-lang.org/cargo/reference/manifest.html#package-selection
:-O

7 years agoDrop an old visible doc TODO
Dale Wijnand [Sat, 21 Apr 2018 14:17:24 +0000 (15:17 +0100)]
Drop an old visible doc TODO

Looks like this originates from
https://github.com/istankovic/cargo-book/commit/418611304daac22e3590aee9322355ae159802fe

But it's even visible in the render docs:
https://doc.rust-lang.org/cargo/reference/manifest.html#package-selection
:-O

7 years agoAdded documentation for LINKER environment variable
Henrik Laxhuber [Sat, 21 Apr 2018 07:24:31 +0000 (09:24 +0200)]
Added documentation for LINKER environment variable

This commit amends the documentation on environment variables to
reflect the proposed LINKER variable.

7 years agobacktick auto-discovery key usage advice
Dale Wijnand [Fri, 20 Apr 2018 21:23:08 +0000 (22:23 +0100)]
backtick auto-discovery key usage advice

7 years agomanually line wrap warnings at 80 characters
Dale Wijnand [Fri, 20 Apr 2018 21:22:41 +0000 (22:22 +0100)]
manually line wrap warnings at 80 characters

7 years agoprefer PathBuf::display over {:?}
Dale Wijnand [Fri, 20 Apr 2018 21:21:33 +0000 (22:21 +0100)]
prefer PathBuf::display over {:?}

7 years agoavoid windows path assertion bug
Dale Wijnand [Fri, 20 Apr 2018 21:20:31 +0000 (22:20 +0100)]
avoid windows path assertion bug

7 years agoAuto merge of #5396 - dwijnand:arg_targets_all-typos, r=matklad
bors [Fri, 20 Apr 2018 20:33:06 +0000 (20:33 +0000)]
Auto merge of #5396 - dwijnand:arg_targets_all-typos, r=matklad

fix typos in arg_targets_all

None

7 years agofix typos in arg_targets_all
Dale Wijnand [Fri, 20 Apr 2018 19:00:57 +0000 (20:00 +0100)]
fix typos in arg_targets_all

7 years agoIntroduce autoXXX keys for target auto-discovery
Dale Wijnand [Mon, 16 Apr 2018 22:19:42 +0000 (00:19 +0200)]
Introduce autoXXX keys for target auto-discovery

In Rust 2015 absence of the configuration makes it default to not
include auto-discovered targets (i.e false), with a warnings message.

In Rust 2018 absence makes it default to include auto-discovered
targets (i.e true).

Fixes #5330

7 years agoExtract toml_targets_and_inferred & inferred_to_toml_targets
Dale Wijnand [Mon, 16 Apr 2018 22:13:14 +0000 (00:13 +0200)]
Extract toml_targets_and_inferred & inferred_to_toml_targets

7 years agoIncrease scope nesting to borrow
Dale Wijnand [Mon, 16 Apr 2018 22:17:57 +0000 (00:17 +0200)]
Increase scope nesting to borrow

7 years agoMove edition earlier in TomlManifest::to_real_manifest
Dale Wijnand [Tue, 10 Apr 2018 07:22:29 +0000 (08:22 +0100)]
Move edition earlier in TomlManifest::to_real_manifest

and fix a typo in the error message

7 years agoAuto merge of #5395 - dwijnand:contributing-setup-cross-tests, r=alexcrichton
bors [Fri, 20 Apr 2018 18:43:05 +0000 (18:43 +0000)]
Auto merge of #5395 - dwijnand:contributing-setup-cross-tests, r=alexcrichton

add contributing notes for cross compile test setup

adding notes from @alexcrichton's help in https://gitter.im/rust-lang/cargo?at=5ada2eae2b9dfdbc3ab01f29.

7 years agoadd contributing notes for cross compile test setup
Dale Wijnand [Fri, 20 Apr 2018 18:29:42 +0000 (19:29 +0100)]
add contributing notes for cross compile test setup

7 years agoPass linker path to build script
Henrik Laxhuber [Fri, 20 Apr 2018 15:04:14 +0000 (17:04 +0200)]
Pass linker path to build script

This change adds the environment variable LINKER to pass the path
of the linker used by cargo to the build script. This ammends the
variable RUSTC (the rustc binary used) to give the build script
full knowledge of its environment.

A specific usage example would be automatically generating bindings
to system headers in cross compilation, e.g. by locating jni.h for
android targets.

7 years agoAuto merge of #5391 - varkor:check-message, r=alexcrichton
bors [Thu, 19 Apr 2018 22:21:08 +0000 (22:21 +0000)]
Auto merge of #5391 - varkor:check-message, r=alexcrichton

Print "Checking" for cargo check

I often alternate between `check` and `build` and I'd like to be able to tell which is currently happening (short-term memory being what it is, and "compiling" implying to me that codegen is occurring). Changing the message to "Checking" seemed to be reasonable (and there was precedent for `doc` with "Documenting").

7 years agoUpdate tests to check for Checking
varkor [Thu, 19 Apr 2018 18:19:11 +0000 (19:19 +0100)]
Update tests to check for Checking

7 years agoAuto merge of #5390 - matklad:new-feature-behavior, r=alexcrichton
bors [Thu, 19 Apr 2018 14:30:48 +0000 (14:30 +0000)]
Auto merge of #5390 - matklad:new-feature-behavior, r=alexcrichton

Enable new behavior of `--feature`

So far, the feedback on https://internals.rust-lang.org/t/help-us-test-the-breaking-bug-fix-to-cargo-features/7317 has been positive, so here's a PR to try this in nightly.

Note that the logic is slightly tweak for the case `cargo build -p not-a-workspace-member`: we want not only to resolve all ws members in this case, but to enable all of their features as well!

As a sanity check, this seems to be forward compatible with further improvements to features:

1) when we solve the grand bug of features being unified across the whole workspace, `cargo build -p not-a-member` would hopefully just work without additional contortions.
2) we might add a way to specify features per package, like `cargo build -p foo -p bar --features "foo/serde bar/serde"`

7 years agoAuto merge of #5392 - ehuss:test-does-not-contain, r=alexcrichton
bors [Thu, 19 Apr 2018 14:08:29 +0000 (14:08 +0000)]
Auto merge of #5392 - ehuss:test-does-not-contain, r=alexcrichton

cargotest: Fix `with_*_does_not_contain` to support `[..]` and macro matching.

I changed it so that it is essentially the opposite of `with_*_contains` to keep it symmetric.

Any in-flight PRs using the old style will need to be updated (else they will incorrectly silently pass).  Alternatively, we could rename the method to avoid that.

The following tests contained brackets, so they were not checking what they thought they were checking.  I did a cursory look at them, but perhaps someone else could double-check that they make sense.  Asserting what *doesn't* happen can be tricky since there is an infinite number of things that won't happen.  Preferably a test would assert that it appears in one scenario and not another (like `incremental_profile` does), but some of them don't or can't.

```
build::incremental_profile
build::incremental_config
build::cargo_compile_with_workspace_excluded
build::build_all_exclude
build::targets_selected_default
check::targets_selected_default
check::check_filters
rustc::targets_selected_default
rustc_info_cache::rustc_info_cache
warn_on_failure::no_warning_on_bin_failure
warn_on_failure::warning_on_lib_failure
```

BTW, would you be interested in a PR that adds some documentation to `cargotest`?
I've discovered things I didn't know where there.  I think some docstrings on some of the methods, and a short guide for new contributors would be helpful.

7 years agoFix `with_*_does_not_contain` to support `[..]` and macro matching.
Eric Huss [Thu, 19 Apr 2018 05:13:30 +0000 (22:13 -0700)]
Fix `with_*_does_not_contain` to support `[..]` and macro matching.

7 years agoPrint "Checking" for cargo check
varkor [Thu, 19 Apr 2018 00:08:35 +0000 (01:08 +0100)]
Print "Checking" for cargo check

7 years agoEnable new behavior of `--feature`
Aleksey Kladov [Wed, 18 Apr 2018 20:36:59 +0000 (23:36 +0300)]
Enable new behavior of `--feature`

7 years agoAuto merge of #5389 - matklad:one-hard-cs-problem, r=alexcrichton
bors [Wed, 18 Apr 2018 15:09:00 +0000 (15:09 +0000)]
Auto merge of #5389 - matklad:one-hard-cs-problem, r=alexcrichton

One hard cs problem

Closes https://github.com/rust-lang/cargo/issues/5313

r? @alexcrichton

Note that, due to the first commit, this still gives us all the benefits of #5249: if RUSTFLAGS is empty, we will run only a single rustc process, even if we can't cache it across different cargo invocations.

7 years agoDon't try to use the same info if target == host
Aleksey Kladov [Wed, 18 Apr 2018 15:00:21 +0000 (18:00 +0300)]
Don't try to use the same info if target == host

The info might be different due to RUSTFLAGS, which, in general,
are applied only to target.

7 years agorustfmt
Aleksey Kladov [Wed, 18 Apr 2018 14:56:26 +0000 (17:56 +0300)]
rustfmt

7 years agoImprove rustc cache
Aleksey Kladov [Wed, 18 Apr 2018 14:44:23 +0000 (17:44 +0300)]
Improve rustc cache

Even if we've failed to calculate fingerprint and thus can't persist
cache to disk, it is still valid to cache rustc output within single
process.

7 years agoAuto merge of #5386 - ysimonson:new-metadata, r=matklad
bors [Wed, 18 Apr 2018 09:55:27 +0000 (09:55 +0000)]
Auto merge of #5386 - ysimonson:new-metadata, r=matklad

Added new metadata fields

Addresses #5373.

`cargo metadata` should now include all of the non-optional suggested fields in the [API guidelines](https://rust-lang-nursery.github.io/api-guidelines/documentation.html#cargotoml-includes-all-common-metadata-c-metadata).

7 years agoExplicitly test for new package metadata fields
Yusuf Simonson [Wed, 18 Apr 2018 08:16:50 +0000 (15:16 +0700)]
Explicitly test for new package metadata fields

7 years agoAdded new metadata fields.
Yusuf Simonson [Wed, 18 Apr 2018 08:08:18 +0000 (15:08 +0700)]
Added new metadata fields.

`cargo metadata` should now include all of the non-optional suggested fields in the API guidelines (see section C-METADATA.)

7 years agoAuto merge of #5379 - alexcrichton:bump-fieltime, r=matklad
bors [Wed, 18 Apr 2018 06:15:55 +0000 (06:15 +0000)]
Auto merge of #5379 - alexcrichton:bump-fieltime, r=matklad

Bump version of `filetime` dependency

7 years agoAuto merge of #5383 - dwijnand:contributing-custom-build, r=alexcrichton
bors [Wed, 18 Apr 2018 02:28:35 +0000 (02:28 +0000)]
Auto merge of #5383 - dwijnand:contributing-custom-build, r=alexcrichton

add build-from-source info to Tests architecture docs

it's mentioned in the README, but it's worth mentioning again in the
Tests section of the architecture doc.

7 years agoAuto merge of #5381 - dwijnand:github-casing, r=alexcrichton
bors [Wed, 18 Apr 2018 01:47:40 +0000 (01:47 +0000)]
Auto merge of #5381 - dwijnand:github-casing, r=alexcrichton

Fix how GitHub is written

just a silly PR - I noticed it in the README, and applied it repo-wide.

7 years agoAuto merge of #5380 - dwijnand:typo, r=alexcrichton
bors [Wed, 18 Apr 2018 00:39:00 +0000 (00:39 +0000)]
Auto merge of #5380 - dwijnand:typo, r=alexcrichton

typo

None

7 years agoadd build-from-source info to Tests architecture docs
Dale Wijnand [Wed, 18 Apr 2018 00:27:44 +0000 (01:27 +0100)]
add build-from-source info to Tests architecture docs

it's mentioned in the README, but it's worth mentioning again in the
Tests section of the architecture doc.

7 years agoBump version of `filetime` dependency
Alex Crichton [Tue, 17 Apr 2018 22:08:04 +0000 (15:08 -0700)]
Bump version of `filetime` dependency

7 years agoAuto merge of #5372 - alexcrichton:bump, r=matklad
bors [Tue, 17 Apr 2018 20:49:43 +0000 (20:49 +0000)]
Auto merge of #5372 - alexcrichton:bump, r=matklad

Bump to 0.28.0

Looks like we've forgotten to do this so far on nightly!

7 years agotypo
Dale Wijnand [Tue, 17 Apr 2018 20:10:28 +0000 (22:10 +0200)]
typo

7 years agoFix how GitHub is written
Dale Wijnand [Tue, 17 Apr 2018 20:14:41 +0000 (22:14 +0200)]
Fix how GitHub is written

7 years agoAuto merge of #5374 - matklad:simplify, r=alexcrichton
bors [Tue, 17 Apr 2018 16:00:32 +0000 (16:00 +0000)]
Auto merge of #5374 - matklad:simplify, r=alexcrichton

Simplify RegistryPackage deserialization

Just mapping dependencies seems so much simpler than thread locals / deserializers with default. Am I missing something, or this indeed will work? :-)

cc @Mark-Simulacrum

7 years agoAuto merge of #5361 - derekdreery:issue_5345, r=matklad
bors [Tue, 17 Apr 2018 13:39:04 +0000 (13:39 +0000)]
Auto merge of #5361 - derekdreery:issue_5345, r=matklad

Fix issue 5345

Fixes #5345.

Also adds some docs and Debug impls.

7 years agoAdd fix and some docs
Richard Dodd [Tue, 17 Apr 2018 13:16:58 +0000 (14:16 +0100)]
Add fix and some docs

7 years agoSimplify RegistryPackage deserialization
Aleksey Kladov [Tue, 17 Apr 2018 07:48:15 +0000 (10:48 +0300)]
Simplify RegistryPackage deserialization

7 years agoBump to 0.28.0
Alex Crichton [Tue, 17 Apr 2018 03:29:41 +0000 (20:29 -0700)]
Bump to 0.28.0

Looks like we've forgotten to do this so far on nightly!

7 years agoAuto merge of #5272 - Phlosioneer:5211-missing-size-hints, r=matklad
bors [Mon, 16 Apr 2018 21:10:56 +0000 (21:10 +0000)]
Auto merge of #5272 - Phlosioneer:5211-missing-size-hints, r=matklad

Implement size_hint for some iterators

This PR implements size_hints for `Deps`, `DepsNotReplaced`, and `Members`.
These size_hints are used extensively by cargo to allocate Vecs.

`Deps`, `DepsNotReplaced`, and `RcVecIter` also now implement `ExactSizeIterator`.

Closes #5211

7 years agoAdd compile-time check for ExactSizeIterator
Phlosioneer [Mon, 16 Apr 2018 20:59:22 +0000 (16:59 -0400)]
Add compile-time check for ExactSizeIterator

7 years agoAuto merge of #5359 - matklad:rustc-cache, r=alexcrichton
bors [Mon, 16 Apr 2018 17:23:53 +0000 (17:23 +0000)]
Auto merge of #5359 - matklad:rustc-cache, r=alexcrichton

Rustc cache

This implements rustc caching, to speed-up no-op builds.

The cache is per-project, and stored in `target` directory. To implement this, I had to move `rustc` from `Config` down to `BuildConfig`.

closes https://github.com/rust-lang/cargo/issues/5315

7 years agorustc is rustc.exe on windows
Aleksey Kladov [Mon, 16 Apr 2018 16:22:53 +0000 (19:22 +0300)]
rustc is rustc.exe on windows

7 years agoSimplify
Aleksey Kladov [Mon, 16 Apr 2018 15:53:12 +0000 (18:53 +0300)]
Simplify

7 years agoMake rustc_info a hidden file
Aleksey Kladov [Mon, 16 Apr 2018 15:52:35 +0000 (18:52 +0300)]
Make rustc_info a hidden file

7 years agoHandle non-rustup cargo + rustup rustc in rustc cache
Aleksey Kladov [Mon, 16 Apr 2018 15:50:25 +0000 (18:50 +0300)]
Handle non-rustup cargo + rustup rustc in rustc cache

7 years agoAuto merge of #5360 - euclio:metadata, r=alexcrichton
bors [Mon, 16 Apr 2018 15:36:50 +0000 (15:36 +0000)]
Auto merge of #5360 - euclio:metadata, r=alexcrichton

include package metadata in `cargo metadata`

Fixes #4819.

All-in-all a pretty small change. I'm a little concerned about threading the `toml::Value` all the way through however, should I make another type? Also, cloning the metadata value initially is maybe not ideal, since it's technically accessible through the original manifest. I figured this way was cleaner.

7 years agoRemove `internal` from error handling
Aleksey Kladov [Mon, 16 Apr 2018 14:57:25 +0000 (17:57 +0300)]
Remove `internal` from error handling

7 years agoAuto merge of #5357 - matklad:even-rust-has-format-string-bugs, r=alexcrichton
bors [Mon, 16 Apr 2018 04:48:29 +0000 (04:48 +0000)]
Auto merge of #5357 - matklad:even-rust-has-format-string-bugs, r=alexcrichton

Correctly print fractional part of a second

So my experiments with `rustc -vV` caching bring no-op build times to around 50ms, and this actually exposes a bug in our time-printing code :-)

7 years agoBetter test description
Richard Dodd [Sun, 15 Apr 2018 13:00:36 +0000 (14:00 +0100)]
Better test description

7 years ago[Wip] fix issue 5345
Richard Dodd [Sun, 15 Apr 2018 12:56:22 +0000 (13:56 +0100)]
[Wip] fix issue 5345