]> git.proxmox.com Git - cargo.git/log
cargo.git
6 years agoupdate [patch] disclaimer in book
Alex Burka [Thu, 21 Sep 2017 01:32:13 +0000 (21:32 -0400)]
update [patch] disclaimer in book

6 years agoAuto merge of #4513 - durka:patch-6, r=alexcrichton
bors [Wed, 20 Sep 2017 17:32:37 +0000 (17:32 +0000)]
Auto merge of #4513 - durka:patch-6, r=alexcrichton

[patch] slipped to 1.21

6 years ago[patch] slipped to 1.21
Alex Burka [Wed, 20 Sep 2017 17:31:04 +0000 (13:31 -0400)]
[patch] slipped to 1.21

7 years agoAuto merge of #4496 - rwakulszowa:infer_from_subdirectories, r=matklad
bors [Mon, 18 Sep 2017 12:05:05 +0000 (12:05 +0000)]
Auto merge of #4496 - rwakulszowa:infer_from_subdirectories, r=matklad

Infer targets from subdirectories

Fixes #4086

I still have a few questions:
- should I add some tests for the old behaviour? It isn't really tested at the moment (no tests failed when I broke the implementation); I could refactor the tests to check for both single file and subdirectory inference
- I moved things around, mostly reusing the code from `inferred_bins` - hopefully I didn't break anything, but it won't hurt to double check :)
- Do we have something like servo's `tidy` check for coding style? I'm open for suggestions if something isn't formatted correctly
- Just a general one - should I rebase + squash commits every time I make subsequent changes to cargo?

7 years agoInfer targets from subdirectories
rwakulszowa [Fri, 15 Sep 2017 13:37:34 +0000 (14:37 +0100)]
Infer targets from subdirectories

7 years agoAuto merge of #4494 - RalfJung:virtual, r=matklad
bors [Mon, 18 Sep 2017 09:12:36 +0000 (09:12 +0000)]
Auto merge of #4494 - RalfJung:virtual, r=matklad

cargo_compile: iterate packages once, not three times

I forgot to push this into <https://github.com/rust-lang/cargo/pull/4492>

r? @matklad

7 years agouse iterator combinators rather than for loops
Ralf Jung [Mon, 18 Sep 2017 09:03:42 +0000 (11:03 +0200)]
use iterator combinators rather than for loops

7 years agoAuto merge of #4501 - matklad:top-level-features, r=alexcrichton
bors [Sun, 17 Sep 2017 22:15:44 +0000 (22:15 +0000)]
Auto merge of #4501 - matklad:top-level-features, r=alexcrichton

Move cargo features to top-level

This should allow to add Cargo-features to virtual manifest as well.

I've not actually added support for features in virtual manifests just yet, because that will probably require some refactoring to avoid duplicating feature-related code between virtual and usual manifests.

r? @alexcrichton

7 years agoMove cargo features to top-level
Aleksey Kladov [Sun, 17 Sep 2017 17:58:14 +0000 (20:58 +0300)]
Move cargo features to top-level

This should allow to add Cargo-features to virtual manifest as well.

7 years agoAuto merge of #4493 - alexcrichton:verify-tarballs, r=matklad
bors [Sun, 17 Sep 2017 08:38:04 +0000 (08:38 +0000)]
Auto merge of #4493 - alexcrichton:verify-tarballs, r=matklad

Verify tarballs don't extract into other directories

Continuation of https://github.com/rust-lang/crates.io/pull/1054 except support on the Cargo side of things

7 years agocargo_compile: iterate packages once, not three times
Ralf Jung [Thu, 14 Sep 2017 18:02:08 +0000 (20:02 +0200)]
cargo_compile: iterate packages once, not three times

7 years agoAuto merge of #4478 - alexcrichton:less-fds, r=matklad
bors [Thu, 14 Sep 2017 21:38:13 +0000 (21:38 +0000)]
Auto merge of #4478 - alexcrichton:less-fds, r=matklad

Periodically gc repos in Cargo

This commit is targeted at improving the long-term management of git checkouts
and git repositories. Currently every time data is fetched from crates.io
libgit2 will create a new pack file in the repository. These pack files
accumulate over time and end up causing pathological behavior if there's lots of
them, causing libgit2 to open many file descriptors all at once, possibly
blowing the system's file descriptor limits.

To alleviate this problem you typically run `git gc`, but libgit2 doesn't have
this implemented. Instead what Cargo now does is detect this situation and run
literally the command line tool `git gc` in a best-effort attempt to compact the
repo. Failing that, for example when git isn't installed, Cargo will remove the
entire repo and do a full checkout again.

At the same time this commit also generalizes this logic, plus the existing fast
path github logic, to all git repositories and not just the index. That way all
git repositories can benefit from the "github fast path" as well as the
compaction steps.

Closes #4403

7 years agoPeriodically gc repos in Cargo
Alex Crichton [Sat, 9 Sep 2017 01:30:37 +0000 (18:30 -0700)]
Periodically gc repos in Cargo

This commit is targeted at improving the long-term management of git checkouts
and git repositories. Currently every time data is fetched from crates.io
libgit2 will create a new pack file in the repository. These pack files
accumulate over time and end up causing pathological behavior if there's lots of
them, causing libgit2 to open many file descriptors all at once, possibly
blowing the system's file descriptor limits.

To alleviate this problem you typically run `git gc`, but libgit2 doesn't have
this implemented. Instead what Cargo now does is detect this situation and run
literally the command line tool `git gc` in a best-effort attempt to compact the
repo. Failing that, for example when git isn't installed, Cargo will remove the
entire repo and do a full checkout again.

At the same time this commit also generalizes this logic, plus the existing fast
path github logic, to all git repositories and not just the index. That way all
git repositories can benefit from the "github fast path" as well as the
compaction steps.

Closes #4403

7 years agoAuto merge of #4492 - RalfJung:virtual, r=matklad
bors [Thu, 14 Sep 2017 20:12:16 +0000 (20:12 +0000)]
Auto merge of #4492 - RalfJung:virtual, r=matklad

Fix confusing error and docs wrt. virtual manifests

Fixes #3966

Contains updated version of #3967

7 years agoVerify tarballs don't extract into other directories
Alex Crichton [Thu, 14 Sep 2017 17:07:15 +0000 (10:07 -0700)]
Verify tarballs don't extract into other directories

7 years agoget rid of Workspace::current() usage in cargo_{compile,doc}
Ralf Jung [Thu, 14 Sep 2017 14:52:42 +0000 (16:52 +0200)]
get rid of Workspace::current() usage in cargo_{compile,doc}

7 years agofix confusing error for virtual manifest with no member
Ralf Jung [Thu, 14 Sep 2017 11:52:06 +0000 (13:52 +0200)]
fix confusing error for virtual manifest with no member

7 years agoupdate --help text for new implicit --all behavior
Ralf Jung [Thu, 14 Sep 2017 11:30:51 +0000 (13:30 +0200)]
update --help text for new implicit --all behavior

7 years agoClarify docs on workspace members
Ralf Jung [Thu, 14 Sep 2017 11:26:49 +0000 (13:26 +0200)]
Clarify docs on workspace members

7 years agoAuto merge of #4489 - mattgathu:update_appveyor_badge_docs, r=alexcrichton
bors [Wed, 13 Sep 2017 14:02:41 +0000 (14:02 +0000)]
Auto merge of #4489 - mattgathu:update_appveyor_badge_docs, r=alexcrichton

Update Appveyor badge docs

* indicate you can specify the appveyor project id if you want to use that instead

This PR is part of: https://github.com/rust-lang/crates.io/issues/693

7 years agoUpdate Appveyor badge docs
Matt Gathu [Wed, 13 Sep 2017 06:38:59 +0000 (09:38 +0300)]
Update Appveyor badge docs

* indicate you can specify the appveyor project id if you want to use that instead

This PR is part of: https://github.com/rust-lang/crates.io/issues/693

7 years agoAuto merge of #4485 - integer32llc:clarify-config, r=alexcrichton
bors [Wed, 13 Sep 2017 02:48:27 +0000 (02:48 +0000)]
Auto merge of #4485 - integer32llc:clarify-config, r=alexcrichton

Clarify that .cargo/config files are unified

It wasn't immediately clear to me from the text on this page whether Cargo looks for these files and stops at the first one, or whether it looks for them all and puts them all together. I was pretty sure it was the latter, but I think these few more words would have made me feel more confident sooner :)

7 years agoClarify that .cargo/config files are unified
Carol (Nichols || Goulding) [Tue, 12 Sep 2017 15:01:40 +0000 (11:01 -0400)]
Clarify that .cargo/config files are unified

7 years agoAuto merge of #4480 - integer32llc:explain-labels, r=matklad
bors [Sun, 10 Sep 2017 18:20:03 +0000 (18:20 +0000)]
Auto merge of #4480 - integer32llc:explain-labels, r=matklad

Add an explanation of the labels

As requested @matklad! ❤️ Are there any questions you have about the labels that remain unanswered?

7 years agoDocument the relnotes label too
Carol (Nichols || Goulding) [Sun, 10 Sep 2017 17:31:55 +0000 (13:31 -0400)]
Document the relnotes label too

7 years agoAdd an explanation of the labels
Carol (Nichols || Goulding) [Sun, 10 Sep 2017 16:55:42 +0000 (12:55 -0400)]
Add an explanation of the labels

7 years agoAuto merge of #4469 - nipunn1313:workspace_features, r=alexcrichton
bors [Sat, 9 Sep 2017 21:39:44 +0000 (21:39 +0000)]
Auto merge of #4469 - nipunn1313:workspace_features, r=alexcrichton

Hashed dependencies of metadata into the metadata of a lib

This fixes one part of #3620. To my understanding, the more fundamental fix is more challenging

7 years agoMake `dep_targets` consistent throughout compilation
Alex Crichton [Sat, 9 Sep 2017 20:52:03 +0000 (13:52 -0700)]
Make `dep_targets` consistent throughout compilation

Previously it depended on dynamic state that was calculated throughout a
compilation which ended up causing different fingerprints showing up in a few
locations, so this makes the invocation deterministic throughout `cargo_rustc`.

7 years agoDP Cache target_metadata. Update all the lifetimes
Nipunn Koorapati [Tue, 5 Sep 2017 16:40:01 +0000 (09:40 -0700)]
DP Cache target_metadata. Update all the lifetimes

7 years agoCleanup debug statements
Nipunn Koorapati [Tue, 5 Sep 2017 08:46:22 +0000 (01:46 -0700)]
Cleanup debug statements

7 years agoRefactor to share code from dep_targets. Fixes the plat-specific case
Nipunn Koorapati [Tue, 5 Sep 2017 08:12:33 +0000 (01:12 -0700)]
Refactor to share code from dep_targets. Fixes the plat-specific case

7 years agoget doctests to pass
Nipunn Koorapati [Tue, 5 Sep 2017 03:31:01 +0000 (20:31 -0700)]
get doctests to pass

7 years agoHashed dependencies of metadata into the metadata of a lib
Nipunn Koorapati [Tue, 5 Sep 2017 00:13:26 +0000 (17:13 -0700)]
Hashed dependencies of metadata into the metadata of a lib

7 years agoAuto merge of #4464 - matklad:document-all-the-things, r=alexcrichton
bors [Sat, 9 Sep 2017 19:44:59 +0000 (19:44 +0000)]
Auto merge of #4464 - matklad:document-all-the-things, r=alexcrichton

Mention sccache in the guide

Closes  #4307

7 years agoMention sccache in the guide
Aleksey Kladov [Sun, 3 Sep 2017 09:19:29 +0000 (12:19 +0300)]
Mention sccache in the guide

7 years agoAuto merge of #4477 - alexcrichton:fix-out-of-bounds, r=matklad
bors [Sat, 9 Sep 2017 08:13:32 +0000 (08:13 +0000)]
Auto merge of #4477 - alexcrichton:fix-out-of-bounds, r=matklad

Use poll instead of select to handle large fds

It may be the case that Cargo's running around with a lot of file descriptors,
and in this case we wouldn't be able to call `select` due to the file
descriptors being too large and not fitting in the bit array. This switches to
what the standard library is currently doing, using `poll`, which doesn't have
this limitations.

7 years agoAuto merge of #4476 - behnam:book, r=alexcrichton
bors [Sat, 9 Sep 2017 06:08:08 +0000 (06:08 +0000)]
Auto merge of #4476 - behnam:book, r=alexcrichton

[doc/book] Move section content to */index.md

This gives a better over-all structure to the book, which we can also
follow for other books on <doc.rust-lang.org>.

Also, confirming fix for broken links with the latest (0.0.24) `mdbook`
release.

7 years agoAuto merge of #4473 - wesleywiser:cyclical_features, r=matklad
bors [Sat, 9 Sep 2017 05:29:40 +0000 (05:29 +0000)]
Auto merge of #4473 - wesleywiser:cyclical_features, r=matklad

Allow features to be cyclical

Fixes #3796

7 years agoAuto merge of #3992 - alexcrichton:replace-git, r=matklad
bors [Sat, 9 Sep 2017 00:42:13 +0000 (00:42 +0000)]
Auto merge of #3992 - alexcrichton:replace-git, r=matklad

Support vendoring git repositories

Currently the vendoring support in Cargo primarily only allows replacing
registry sources, e.g. crates.io. Other networked sources of code, such as git
repositories, cannot currently be replaced. The purpose of this commit is to
support vendoring of git dependencies to eventually have support implemented in
the `cargo-vendor` subcommand.

Support for vendoring git repositories required a few subtle changes:

* First and foremost, configuration for source replacement of a git repository
  was added. This looks similar to the `Cargo.toml` configuration of a git
  source.

* The restriction around checksum providing sources was relaxed. If a
  replacement source provides checksums but the replaced source doesn't then
  that's now considered ok unlike it being an error before.

* Lock files can be generated for crates.io crates against vendored sources, but
  lock files cannot be generated against git sources. A lock file must
  previously exist to make use of a vendored git source.

* The `package` field of `.cargo-checksum.json` is now optional, and it is
  intended to be omitted for git sources that are vendored.

7 years agoUse poll instead of select to handle large fds
Alex Crichton [Fri, 8 Sep 2017 05:14:55 +0000 (22:14 -0700)]
Use poll instead of select to handle large fds

It may be the case that Cargo's running around with a lot of file descriptors,
and in this case we wouldn't be able to call `select` due to the file
descriptors being too large and not fitting in the bit array. This switches to
what the standard library is currently doing, using `poll`, which doesn't have
this limitations.

7 years ago[doc/book] Move section content to */index.md
Behnam Esfahbod [Sat, 2 Sep 2017 22:11:39 +0000 (15:11 -0700)]
[doc/book] Move section content to */index.md

This gives a better over-all structure to the book, which we can also
follow for other books on <doc.rust-lang.org>.

Also, confirming fix for broken links with the latest (0.0.24) `mdbook`
release.

7 years agoAllow features to be cyclical
Wesley Wiser [Wed, 6 Sep 2017 03:04:38 +0000 (23:04 -0400)]
Allow features to be cyclical

Fixes #3796

7 years agoAuto merge of #4472 - alexcrichton:update, r=matklad
bors [Wed, 6 Sep 2017 19:54:15 +0000 (19:54 +0000)]
Auto merge of #4472 - alexcrichton:update, r=matklad

Update dependencies

Just a usual `cargo update` plus moving over some major versions

7 years agoAuto merge of #4461 - behnam:policies, r=alexcrichton
bors [Wed, 6 Sep 2017 15:42:07 +0000 (15:42 +0000)]
Auto merge of #4461 - behnam:policies, r=alexcrichton

[doc] Redirect /policies.html to crates.io/policies

This relieves us from migrating the Package Policies document into the
new Cargo Manual mdbook.

Moved the content to `crates.io` repo in
<https://github.com/rust-lang/crates.io/pull/1033>.

NOTE: We should wait until that change goes live before landing this
one. I'll notify here when it's time to land.

Closes <https://github.com/rust-lang/crates.io/issues/1030>

7 years ago[doc/book] Drop Policies link from Reference page
Behnam Esfahbod [Wed, 6 Sep 2017 09:08:50 +0000 (02:08 -0700)]
[doc/book] Drop Policies link from Reference page

7 years ago[doc/header] Update Policies URL
Behnam Esfahbod [Wed, 6 Sep 2017 09:07:59 +0000 (02:07 -0700)]
[doc/header] Update Policies URL

7 years ago[doc] Redirect /policies.html to crates.io/policies
Behnam Esfahbod [Fri, 1 Sep 2017 19:29:22 +0000 (12:29 -0700)]
[doc] Redirect /policies.html to crates.io/policies

This relieves us from migrating the Package Policies document into the
new Cargo Manual mdbook.

Moved the content to `crates.io` repo in
<https://github.com/rust-lang/crates.io/pull/1033>.

NOTE: We should wait until that change goes live before landing this
one. I'll notify here when it's time to land.

Closes <https://github.com/rust-lang/crates.io/issues/1030>

7 years agoUpdate dependencies
Alex Crichton [Tue, 5 Sep 2017 22:29:07 +0000 (15:29 -0700)]
Update dependencies

Just a usual `cargo update` plus moving over some major versions

7 years agoSupport vendoring git repositories
Alex Crichton [Thu, 4 May 2017 03:33:28 +0000 (20:33 -0700)]
Support vendoring git repositories

Currently the vendoring support in Cargo primarily only allows replacing
registry sources, e.g. crates.io. Other networked sources of code, such as git
repositories, cannot currently be replaced. The purpose of this commit is to
support vendoring of git dependencies to eventually have support implemented in
the `cargo-vendor` subcommand.

Support for vendoring git repositories required a few subtle changes:

* First and foremost, configuration for source replacement of a git repository
  was added. This looks similar to the `Cargo.toml` configuration of a git
  source.

* The restriction around checksum providing sources was relaxed. If a
  replacement source provides checksums but the replaced source doesn't then
  that's now considered ok unlike it being an error before.

* Lock files can be generated for crates.io crates against vendored sources, but
  lock files cannot be generated against git sources. A lock file must
  previously exist to make use of a vendored git source.

* The `package` field of `.cargo-checksum.json` is now optional, and it is
  intended to be omitted for git sources that are vendored.

7 years agoAuto merge of #4467 - RalfJung:locked, r=alexcrichton
bors [Tue, 5 Sep 2017 16:04:29 +0000 (16:04 +0000)]
Auto merge of #4467 - RalfJung:locked, r=alexcrichton

fix error message when --locked is passed but lockfile is outdated

The logic is currently the wrong way around, saying I passed `--frozen` when I really passed `--locked`.

I had no idea where to put the test...

7 years agofix error message when --locked is passed but lockfile is outdated
Ralf Jung [Mon, 4 Sep 2017 11:33:03 +0000 (13:33 +0200)]
fix error message when --locked is passed but lockfile is outdated

7 years agoAuto merge of #4465 - matklad:yak-shaving, r=alexcrichton
bors [Sun, 3 Sep 2017 20:59:43 +0000 (20:59 +0000)]
Auto merge of #4465 - matklad:yak-shaving, r=alexcrichton

Add CONTRIBUTING.md

r? @alexcrichton

7 years agoAdd CONTRIBUTING.md
Aleksey Kladov [Sun, 3 Sep 2017 09:47:49 +0000 (12:47 +0300)]
Add CONTRIBUTING.md

7 years agoAuto merge of #4462 - behnam:book-fixes, r=alexcrichton
bors [Sat, 2 Sep 2017 03:02:48 +0000 (03:02 +0000)]
Auto merge of #4462 - behnam:book-fixes, r=alexcrichton

[doc/book] Drop reference/policies.md and small fixes

We don't need to put `policies.md` in the book. See
<https://github.com/rust-lang/crates.io/issues/1030> for more.

Renaming `introduction.md` to `index.md` prevents creating two html
files (and URL) for one source.

The rest are small styling issues.

Tracker: <https://github.com/rust-lang/cargo/issues/4040>

7 years ago[doc/book] Drop reference/policies.md and small fixes
Behnam Esfahbod [Fri, 1 Sep 2017 22:31:37 +0000 (15:31 -0700)]
[doc/book] Drop reference/policies.md and small fixes

We don't need to put `policies.md` in the book. See
<https://github.com/rust-lang/crates.io/issues/1030> for more.

Renaming `introduction.md` to `index.md` prevents creating two html
files (and URL) for one source.

The rest are small styling issues.

Tracker: <https://github.com/rust-lang/cargo/issues/4040>

7 years agoAuto merge of #4457 - behnam:book-pub, r=alexcrichton
bors [Fri, 1 Sep 2017 19:27:55 +0000 (19:27 +0000)]
Auto merge of #4457 - behnam:book-pub, r=alexcrichton

[doc] Publish book to gh-pages

Export mdBook into `target/doc/book/`, to make it accessible at <http://doc.crates.io/book/>

I have tested the changes on my repo (but when I had this commit on top of the other PR) locally. The result is at <http://code.behnam.es/rust-cargo/book/>.

Tracker: <https://github.com/rust-lang/cargo/issues/4040>

7 years ago[doc/book] Rename crates-io.md to publishing.md
Behnam Esfahbod [Fri, 1 Sep 2017 17:19:50 +0000 (10:19 -0700)]
[doc/book] Rename crates-io.md to publishing.md

7 years ago[doc] Add back heading to index.md
Behnam Esfahbod [Fri, 1 Sep 2017 17:08:34 +0000 (10:08 -0700)]
[doc] Add back heading to index.md

7 years ago[doc] Publish book to gh-pages
Behnam Esfahbod [Fri, 1 Sep 2017 08:33:11 +0000 (01:33 -0700)]
[doc] Publish book to gh-pages

7 years agoAuto merge of #4455 - behnam:book-enh, r=alexcrichton
bors [Fri, 1 Sep 2017 16:30:25 +0000 (16:30 +0000)]
Auto merge of #4455 - behnam:book-enh, r=alexcrichton

[doc/book] Add introduction page and other enhancements

Preview: http://code.behnam.es/rust-cargo/book/

* Reorganize files to use folders instead of numbered files. This will allow us to add new sections and pages without breaking a numbering system or the URLs.

* Rename "Cargo In Depth" to "Cargo Reference", as those pages are considered *the* reference for cargo behaviors.

* Add `introduction.md`, as the landing page with the book title and Cargo logo on top.

* Expand `installation.md`: Import install text and links from <https://crates.io/install>, as we
want to drop that page and redirect it to here. (See <https://github.com/rust-lang/crates.io/issues/1029>)

* Sync `SUMMARY.md` titles (and sub-pages lists in section pages) with page titles and fix some wordings and casings.

* Expand Introduction and section pages with some intro text.

* Set lang for some of the code blocks.

* Add `book.toml` to get the title in HTML head title, etc.

Tracker: <https://github.com/rust-lang/cargo/issues/4040>

7 years ago[doc] Sync back doc/book changes into old docs
Behnam Esfahbod [Thu, 31 Aug 2017 22:07:55 +0000 (15:07 -0700)]
[doc] Sync back doc/book changes into old docs

7 years ago[doc/book] Add book.toml
Behnam Esfahbod [Thu, 31 Aug 2017 21:42:32 +0000 (14:42 -0700)]
[doc/book] Add book.toml

7 years ago[doc/book] Final touches to introduction.md
Behnam Esfahbod [Thu, 31 Aug 2017 21:36:07 +0000 (14:36 -0700)]
[doc/book] Final touches to introduction.md

7 years ago[doc/book] Assign langs to more code blocks
Behnam Esfahbod [Thu, 31 Aug 2017 21:01:17 +0000 (14:01 -0700)]
[doc/book] Assign langs to more code blocks

7 years ago[doc/book] Create dir for book sections
Behnam Esfahbod [Thu, 31 Aug 2017 20:17:19 +0000 (13:17 -0700)]
[doc/book] Create dir for book sections

7 years ago[doc/book] Improve page titles
Behnam Esfahbod [Thu, 31 Aug 2017 19:53:55 +0000 (12:53 -0700)]
[doc/book] Improve page titles

7 years ago[src/doc/book] Add introduction page
Behnam Esfahbod [Thu, 31 Aug 2017 08:04:54 +0000 (01:04 -0700)]
[src/doc/book] Add introduction page

7 years ago[doc/book] Expand installation.md
Behnam Esfahbod [Thu, 31 Aug 2017 19:22:24 +0000 (12:22 -0700)]
[doc/book] Expand installation.md

Import install text and links from <https://crates.io/install>, as we
want to drop that page and redirect it to here.

See <https://github.com/rust-lang/crates.io/issues/1029>

7 years agoAuto merge of #4453 - behnam:book, r=alexcrichton
bors [Thu, 31 Aug 2017 21:08:09 +0000 (21:08 +0000)]
Auto merge of #4453 - behnam:book, r=alexcrichton

Import mdBook-based docs and sync

Since we decided to keep the mdBook-based docs in-repo, I have imported the existing converted docs from <https://github.com/istankovic/cargo-book> under `/src/doc/book/` here, and have synced the current docs and the mdBook-based ones manually, file-by-file.

I have created a `MIGRATION_MAP` file, which shows the relationship between old docs and new ones. The first column is the old file, the second column is the canonical location in mdBook, and the rest of columns are globs of other files in mdBook containing content from the old file.

The first and second column of `MIGRATION_MAP` shall later be used to create redirect rules from `doc.crates.io/` to `doc.rust-lang.org/cargo/`.

I will also add a README file to remind everyone to keep these files in sync during the migration.

There are also two or three small wording fixes here, which I'll note inline.

This is a retry of <https://github.com/rust-lang/cargo/pull/4220>.

First step for <https://github.com/rust-lang/cargo/issues/4040>.

7 years agoAuto merge of #4447 - lucaskolstad:proc-macro-crates-host-deps-linkage, r=alexcrichton
bors [Thu, 31 Aug 2017 20:26:56 +0000 (20:26 +0000)]
Auto merge of #4447 - lucaskolstad:proc-macro-crates-host-deps-linkage, r=alexcrichton

Add host dependency path via -L for cargo_test.

Proc-macro crates' dependencies in the host dependency directory cannot
be found when running `cargo test` with the `--target {target}` flag
set as reported in #4224. This adds the host dependency directory to the
search path to find those missing dependencies with -L when building tests
and adds a test case that fails before and passes after this patch.

A new function `find_host_deps(..)` is added to accomplish this which can
determine the path of the host dependencies directory from within
`run_doc_tests(..)` where the missing library search path is needed.

Fixes #4224
Fixes #4254

Modeled after a similar patch: a298346d6e8862992be3fd93dd8a6c833cc72719

**Concerns**

The test case seems to require a non-local crate from crates.io to example the failure before this patch. Couldn't make it fail with simply another local subcrate, but if others think it's possible that'd be great. This means that during tests for the cargo project itself that this test case actually downloads and compiles a crate, which I don't think any other tests do and is obviously not ideal and is perhaps even unacceptable. I've used the base64 crate pretty arbitrarily, but which crate it is really doesn't matter to test the case's content. So if anyone knows a tiny or empty crate on crates.io to use instead that'd speed this up and if someone can figure out how to make it fail before this patch is applied without downloading an external crate that would help as well.

Also, I'm not 100% confident about the `find_host_deps(..)` style and whether it's the best way to find the host dependencies directory with just the `TestOptions` and `Compilation` structs available since I'm new to this project. Any comments are appreciated.

7 years agoTweak proc_macro test to correctly test case.
Lucas Kolstad [Thu, 31 Aug 2017 17:55:19 +0000 (10:55 -0700)]
Tweak proc_macro test to correctly test case.

Minor change causes the test to actually test the case instead of always
passing regardless of the fix that adds the host dependency directory to
the library search path.

7 years ago[src/doc/book] Use package registry for crates.io
Behnam Esfahbod [Thu, 31 Aug 2017 08:32:03 +0000 (01:32 -0700)]
[src/doc/book] Use package registry for crates.io

7 years ago[src/doc/book] Fix header casings
Behnam Esfahbod [Thu, 31 Aug 2017 08:30:58 +0000 (01:30 -0700)]
[src/doc/book] Fix header casings

7 years ago[src/doc/book] Move a paragraph to cargo-in-depth.md
Behnam Esfahbod [Thu, 31 Aug 2017 08:26:30 +0000 (01:26 -0700)]
[src/doc/book] Move a paragraph to cargo-in-depth.md

7 years ago[src/doc/book] Add all sub-chapters to cargo-in-depth.md
Behnam Esfahbod [Thu, 31 Aug 2017 08:07:35 +0000 (01:07 -0700)]
[src/doc/book] Add all sub-chapters to cargo-in-depth.md

7 years ago[src/doc/book] Drop unused images
Behnam Esfahbod [Thu, 31 Aug 2017 07:49:54 +0000 (00:49 -0700)]
[src/doc/book] Drop unused images

7 years ago[src/doc] Add README.md
Behnam Esfahbod [Thu, 31 Aug 2017 01:33:22 +0000 (18:33 -0700)]
[src/doc] Add README.md

7 years ago[src/doc/book] Update SUMMARY.md
Behnam Esfahbod [Thu, 31 Aug 2017 01:19:18 +0000 (18:19 -0700)]
[src/doc/book] Update SUMMARY.md

7 years ago[src/doc/book] Update 03-01-specifying-dependencies.md from specifying-dependencies.md
Behnam Esfahbod [Thu, 31 Aug 2017 01:16:52 +0000 (18:16 -0700)]
[src/doc/book] Update 03-01-specifying-dependencies.md from specifying-dependencies.md

7 years ago[src/doc/book] Check 03-08-source-replacement.md
Behnam Esfahbod [Thu, 31 Aug 2017 01:15:26 +0000 (18:15 -0700)]
[src/doc/book] Check 03-08-source-replacement.md

7 years ago[src/doc/book] Update 03-10-policies.md from policies.md
Behnam Esfahbod [Thu, 31 Aug 2017 01:14:29 +0000 (18:14 -0700)]
[src/doc/book] Update 03-10-policies.md from policies.md

7 years ago[src/doc/book] Check 03-07-pkgid-spec.md
Behnam Esfahbod [Thu, 31 Aug 2017 01:12:51 +0000 (18:12 -0700)]
[src/doc/book] Check 03-07-pkgid-spec.md

7 years ago[src/doc/book] Update 03-02-manifest.md from manifest.md
Behnam Esfahbod [Thu, 31 Aug 2017 01:10:13 +0000 (18:10 -0700)]
[src/doc/book] Update 03-02-manifest.md from manifest.md

7 years ago[src/doc/book] Apply 01-*.md changes into index.md
Behnam Esfahbod [Thu, 31 Aug 2017 01:02:21 +0000 (18:02 -0700)]
[src/doc/book] Apply 01-*.md changes into index.md

7 years agoReplace plugins_dylib_path with host_deps_output.
Lucas Kolstad [Thu, 31 Aug 2017 00:59:23 +0000 (17:59 -0700)]
Replace plugins_dylib_path with host_deps_output.

The plugins_dylib_path field on Compilation is removed because it is
identical to host_deps_output, it is only used in one easily replaced
location, and because host_deps_output is a more general name that
includes its new usage location in cargo_test.rs as well while better
matching the corresponding deps_output field.

Also de-indents erroneously indented lines in a test case.

7 years ago[src/doc/book] Update guide.md and 02-*.md from guide.md
Behnam Esfahbod [Thu, 31 Aug 2017 00:38:47 +0000 (17:38 -0700)]
[src/doc/book] Update guide.md and 02-*.md from guide.md

7 years ago[src/doc/book] Check faq.md
Behnam Esfahbod [Thu, 31 Aug 2017 00:26:34 +0000 (17:26 -0700)]
[src/doc/book] Check faq.md

7 years ago[src/doc/book] Update 03-09-external-tools.md from external-tools.md
Behnam Esfahbod [Thu, 31 Aug 2017 00:13:49 +0000 (17:13 -0700)]
[src/doc/book] Update 03-09-external-tools.md from external-tools.md

7 years ago[src/doc/book] Update 03-04-environment-variables.md from environment-variables.md
Behnam Esfahbod [Thu, 31 Aug 2017 00:12:06 +0000 (17:12 -0700)]
[src/doc/book] Update 03-04-environment-variables.md from environment-variables.md

7 years ago[src/doc/book] Update 03-06-crates-io.md from crates-io.md
Behnam Esfahbod [Thu, 31 Aug 2017 00:08:18 +0000 (17:08 -0700)]
[src/doc/book] Update 03-06-crates-io.md from crates-io.md

7 years ago[src/doc/book] Update 03-05-build-scripts.md from build-script.md
Behnam Esfahbod [Thu, 31 Aug 2017 00:05:21 +0000 (17:05 -0700)]
[src/doc/book] Update 03-05-build-scripts.md from build-script.md

7 years ago[src/doc/book] Update 03-03-config.md from config.md
Behnam Esfahbod [Thu, 31 Aug 2017 00:00:04 +0000 (17:00 -0700)]
[src/doc/book] Update 03-03-config.md from config.md

7 years ago[src/doc/book] Add .gitignore
Behnam Esfahbod [Wed, 30 Aug 2017 22:45:37 +0000 (15:45 -0700)]
[src/doc/book] Add .gitignore

Using `mdbook init` command.

Also, update `.gitignore` file manually and add a leading slash.
(Upstream fix for mdBook: <https://github.com/azerupi/mdBook/pull/413>)

7 years ago[src/doc/book] Import from cargo-book repo
Behnam Esfahbod [Wed, 30 Aug 2017 22:38:51 +0000 (15:38 -0700)]
[src/doc/book] Import from cargo-book repo

7 years agoRemove find_host_deps and use Compilation field.
Lucas Kolstad [Wed, 30 Aug 2017 22:16:52 +0000 (15:16 -0700)]
Remove find_host_deps and use Compilation field.

This patch removes the addition of the find_host_deps() function by
adding a host_deps_output field to the Compilation struct instead. The
test case is altered to not use an external crate from crates.io but
instead use the Package.publish(..) method.

7 years agoAuto merge of #4451 - steveklabnik:relax-rustdoc-tests, r=alexcrichton
bors [Wed, 30 Aug 2017 15:40:20 +0000 (15:40 +0000)]
Auto merge of #4451 - steveklabnik:relax-rustdoc-tests, r=alexcrichton

relax rustdoc tests

This was asserting on the output directly, rather than just what it contains.

In https://github.com/rust-lang/rust/pull/44138 we are adding deprecations, and so it
breaks these tests.

7 years agoDon't use deprecated rustdoc flags in tests
steveklabnik [Wed, 30 Aug 2017 14:50:40 +0000 (10:50 -0400)]
Don't use deprecated rustdoc flags in tests

In rust-lang/rust#44138 we are adding deprecations, and so it
breaks these tests.

7 years agoAuto merge of #4440 - nisargthakkar:publish_target, r=alexcrichton
bors [Tue, 29 Aug 2017 17:40:45 +0000 (17:40 +0000)]
Auto merge of #4440 - nisargthakkar:publish_target, r=alexcrichton

Adding target support to cargo package and cargo publish

Fixing Issue #4012

Same as #4077 but couldn't reopen the PR due to force push after rebasing from master

7 years agoRemoving redundant extern
Nisarg Thakkar [Tue, 29 Aug 2017 15:08:02 +0000 (20:38 +0530)]
Removing redundant extern

7 years agoAdding tests for --target with cargo publish and cargo package
Nisarg Thakkar [Sun, 27 Aug 2017 06:49:17 +0000 (12:19 +0530)]
Adding tests for --target with cargo publish and cargo package