6386 Commits

Author SHA1 Message Date
Dale Wijnand
67c52ffe58
Add tests for per-target edition
Test:
* enabling edition feature & setting at target level (happy path)
* overriding the package-level edition with per-target edition
* feature gating of per-target edition
* per-target edition usage for rustdoc
2018-07-31 14:49:33 +01:00
Dale Wijnand
75c15f824c
Wire Features down to targets::configure to check the edition feature gate 2018-07-31 14:22:45 +01:00
Dale Wijnand
5fcf30f4a1
Document per-target edition & give an example 2018-07-31 10:47:35 +01:00
Dale Wijnand
a570dc5aaa
Default target edition to package edition 2018-07-27 16:59:19 +01:00
Dale Wijnand
d4ee795357
Wire target edition to rustc/rustdoc 2018-07-27 15:51:55 +01:00
Dale Wijnand
123d5c3133
Wire Fingerprint to target unit's edition 2018-07-27 15:51:54 +01:00
Dale Wijnand
76001afbfe
Add an Edition on TomlTarget & Target, & wire 2018-07-27 15:51:54 +01:00
bors
db48c63b36 Auto merge of #5812 - dwijnand:move-existing_vcs_repo, r=alexcrichton
Move existing_vcs_repo to the util::vcs module

Rather than being in cargo_new publically exposed and used by cargo fix.

Just a proposal, as it looked weird to me.
2018-07-27 04:56:29 +00:00
bors
03e89340f7 Auto merge of #5810 - Eh2406:test-fix, r=alexcrichton
now that we respect gitignore tests can be simplified

There are a lot of test that used a tempfile to avoid the fact that cargo would not init a git in the test folder. (or because they were copy/pasted from one that did.) Now that #5733 landed we can remove them all.
2018-07-27 03:51:35 +00:00
bors
dab09a065b Auto merge of #5807 - dwijnand:cargo-list-summary, r=alexcrichton
Show the command summary when running cargo --list

Fixes #3726
2018-07-27 02:49:04 +00:00
bors
5a5bbc20cc Auto merge of #5801 - ehuss:fix-doctestable, r=alexcrichton
Fix `test --doc` with incompatible lib types.

When I recently changed the doctest handling, I forgot to check the lib type in
the `test --doc` scenario.

I also added the package name to a nearby error message, since it can be
confusing in a workspace setting.
2018-07-27 02:17:52 +00:00
Dale Wijnand
eea58f205f
Move existing_vcs_repo to the util::vcs module
Rather than being in cargo_new publically exposed and used by cargo fix.
2018-07-26 22:09:45 +01:00
Dale Wijnand
cd55e0459c
Avoid right-padding commands with spaces
Primarily because it needlessly breaks tests.
2018-07-26 21:42:31 +01:00
Dale Wijnand
09cd53832c
Adapt --list output in find_closest_biuld_to_build test 2018-07-26 21:41:43 +01:00
bors
d195f28239 Auto merge of #5804 - dwijnand:hg-discover, r=alexcrichton
Fix HgRepo::discover

Replace the duplicate .cwd call with an invocation taken from
https://stackoverflow.com/a/3138925/463761

Match the semantics of the other vcs calls, which is invoke from 'cwd'
targeting 'path'. Looks a little confusing because hg takes a '--cwd'
argument.
2018-07-26 19:29:21 +00:00
Eh2406
7fc0dffed2 remove all of the (now) unnecessary temp file usage in tests 2018-07-26 15:10:48 -04:00
Eh2406
acf89e946c update test for #5733 2018-07-26 14:39:10 -04:00
bors
b5a1dbd0b4 Auto merge of #5733 - withoutboats:cargo-new-respects-gitignore, r=alexcrichton
Respect .gitignore during `cargo new`

When running `cargo new`, we check to see if you are inside a git repository. If you are, we do not initialize a new git repo for your project unless you specifically asked for it using --vcs. (See #1210 for more background).

This commit changes that behavior to *also* create a new repo if the project would be an ignored path in the parent repository. This way, if your home directory is a git repository, as long as you have ignored the directory you are creating a new project in, we will instantiate a git repository without you having to specifically request it.
2018-07-26 18:01:26 +00:00
bors
41df9a0ecc Auto merge of #5802 - ehuss:fix-doc-typo, r=dwijnand
Fix minor typo in the book.
2018-07-26 17:21:33 +00:00
Without Boats
064a1461d7
Respect .gitignore during cargo new
When running `cargo new`, we check to see if you are inside a git
repository. If you are, we do not initialize a new git repo for
your project unless you specifically asked for it using --vcs.
(See #1210 for more background).

This commit changes that behavior to *also* create a new repo if
the project would be an ignored path in the parent repository.
This way, if your home directory is a git repository, as long as
you have ignored the directory you are creating a new project in,
we will instantiate a git repository without you having to
specifically request it.
2018-07-26 15:39:42 +02:00
Dale Wijnand
a838f8fa9c
Fix read-manifest summary printing under cargo --list 2018-07-26 12:09:04 +01:00
Dale Wijnand
af2c355585
Show the command summary when running cargo --list 2018-07-26 12:08:39 +01:00
Dale Wijnand
c3422cfc40
Reformat main::list_commands to return CommandInfo over a tuple 2018-07-26 12:06:50 +01:00
Dale Wijnand
36cd1c3219
Fix HgRepo::discover
Replace the duplicate .cwd call with an invocation taken from
https://stackoverflow.com/a/3138925/463761

Match the semantics of the other vcs calls, which is invoke from 'cwd'
targeting 'path'. Looks a little confusing because hg takes a '--cwd'
argument.
2018-07-26 08:52:07 +01:00
bors
cef7c5667c Auto merge of #5803 - dwijnand:dependabot/cargo/crossbeam-utils-0.5, r=matklad
Upgrade to crossbeam-utils's -new 0.5 API

Supersedes #5800
2018-07-26 07:13:38 +00:00
Dale Wijnand
810a0a1eca
Upgrade to crossbeam-utils's -new 0.5 API 2018-07-26 06:47:19 +01:00
Eric Huss
462eab8285 Fix minor typo in the book. 2018-07-25 22:46:17 -07:00
Eric Huss
dd6c6102a1 Fix test --doc with incompatible lib types.
When I recently changed the doctest handling, I forgot to check the lib type in
the `test --doc` scenario.

I also added the package name to a nearby error message, since it can be
confusing in a workspace setting.
2018-07-25 22:40:46 -07:00
dependabot[bot]
6f11cd9e14
Update crossbeam-utils requirement to 0.5
Updates the requirements on [crossbeam-utils](https://github.com/crossbeam-rs/crossbeam-utils) to permit the latest version.
- [Release notes](https://github.com/crossbeam-rs/crossbeam-utils/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam-utils/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam-utils/commits/v0.5.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-26 05:30:17 +00:00
bors
191bfbfaf2 Auto merge of #5794 - Nemo157:rustdoc-rename-extern, r=alexcrichton
Apply dependency renamings when running rustdoc

Fixes #5792
2018-07-26 00:36:42 +00:00
bors
80f69228d6 Auto merge of #5790 - dwijnand:dependabot/cargo/crossbeam-0.4, r=alexcrichton
Upgrade to crossbeam 0.4

Supersedes #5789
2018-07-25 23:10:21 +00:00
Dale Wijnand
8ea90e96cf
Switch to crossbeam_utils crate, sidesteppin 2018-07-25 23:32:25 +01:00
bors
2cd36b4ed1 Auto merge of #5791 - dwijnand:oneline-files, r=alexcrichton
Declare one-line files on one line, in test projects

Builds on #5787
Fixes #5745 unless @alexcrichton feels more can be done there.
2018-07-25 22:04:20 +00:00
bors
cb9c0b0c70 Auto merge of #5787 - dwijnand:dedup-manifest-further, r=alexcrichton
Deduplicate a bunch more manifests in test code

Wanted to deduplicate the "bar" manifest files too, and found I hadn't even done build.rs.
2018-07-25 21:21:24 +00:00
Wim Looman
a432619806 Apply dependency renamings when running rustdoc
Fixes #5792
2018-07-25 18:58:28 +02:00
Dale Wijnand
ac2d5d0917
Update the minimal parking_lot_core version 2018-07-25 17:11:26 +01:00
Dale Wijnand
6ca32be8a2
Declare one-line write_all contents on one line, too 2018-07-25 10:00:45 +01:00
Dale Wijnand
ca7d9ee292
Declare one-line files on one line, in test projects 2018-07-25 09:58:50 +01:00
Dale Wijnand
16681b3dfd
Migrate to crossbeam's new 0.4 API 2018-07-25 06:50:16 +01:00
dependabot[bot]
4b73ed06cb
Update crossbeam requirement to 0.4
Updates the requirements on [crossbeam](https://github.com/crossbeam-rs/crossbeam) to permit the latest version.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-07-25 05:31:03 +00:00
Dale Wijnand
ab19c48358
Dedup a bunch more manifest 2018-07-25 00:43:30 +01:00
Dale Wijnand
5659b78b76
Replace const BASIC_MANIFEST with basic_manifest("foo", "0.0.1") 2018-07-24 23:35:50 +01:00
bors
4e53ce48d1 Auto merge of #5782 - dwijnand:dedup-manifest, r=alexcrichton
Add a default template for Cargo.toml

Fixes #5743

r? @alexcrichton
2018-07-24 20:47:57 +00:00
bors
5bb850141a Auto merge of #5621 - knight42:cargo-search-relaced-registry, r=alexcrichton
Update replaced registry before search

Close #5550.

It seems that updating the replaced registry before search has not been well considered in cargo and I have to add a function to trait `core::source::Source` to get the replaced `SourceId`.

I am not sure whether this is a good design, any advice is welcome.
2018-07-24 16:10:11 +00:00
Dale Wijnand
081e7930d2
Drop now unnecessary basic manifests 2018-07-24 16:33:55 +01:00
bors
f102a24cee Auto merge of #5757 - Eh2406:minimal-versions-build, r=alexcrichton
Minimal versions build

This is a conceptual rebase of #5275, to reiterate:
Big thanks to @klausi for doing most of the work!
Thanks to @matklad for pointing out that we could finish it.

I don't know if I have the Travis config quite correct, advice definitely wellcome!

edit: closes #5275
2018-07-24 15:11:36 +00:00
Eh2406
4a8c70ecc0 update curl so we don't need so may hacks 2018-07-24 10:41:10 -04:00
bors
5a386e91c6 Auto merge of #5779 - alexcrichton:msg, r=dwijnand
Fix a formatting of a cargo fix message

Something I saw in the report of https://github.com/rust-lang/cargo/issues/5775
2018-07-24 14:02:09 +00:00
Dale Wijnand
252f6e8e9f
Opt-out all other failing tests
Looks like cargo traverses the filesystem & fails if it runs into a
Cargo.toml that doesn't declare a target.  I couldn't find a nice way to
re-engineer the test to avoid this issue.  So I'll leave that as someone
else's exercise.
2018-07-24 13:59:42 +01:00
Dale Wijnand
d2c815be22
Add an opt-out to the auto-generated Cargo.toml 2018-07-24 13:19:47 +01:00