]> git.proxmox.com Git - cargo.git/log
cargo.git
6 years agoUpdate docs to use cc instead of gcc
Edward Yang [Wed, 18 Oct 2017 06:39:49 +0000 (01:39 -0500)]
Update docs to use cc instead of gcc

6 years agoAuto merge of #4635 - dethoter:4430, r=alexcrichton
bors [Tue, 17 Oct 2017 17:32:27 +0000 (17:32 +0000)]
Auto merge of #4635 - dethoter:4430, r=alexcrichton

Fix a documentation for package.build option.

Fix for #4430.

6 years agoFix a documentation for package.build option.
Evgen Druzhynin [Tue, 17 Oct 2017 15:52:56 +0000 (18:52 +0300)]
Fix a documentation for package.build option.

6 years agoAuto merge of #4630 - ehuss:new-test-temp-dir, r=alexcrichton
bors [Tue, 17 Oct 2017 14:24:37 +0000 (14:24 +0000)]
Auto merge of #4630 - ehuss:new-test-temp-dir, r=alexcrichton

Fix `new` tests on Windows inadvertently picking up ~/.cargo/config.

Fixes #4601.  By relying on `__CARGO_TEST_ROOT`, using a temp directory is no
longer necessary.

6 years agoFix `new` tests on Windows inadvertently picking up ~/.cargo/config.
Eric Huss [Mon, 16 Oct 2017 23:41:11 +0000 (16:41 -0700)]
Fix `new` tests on Windows inadvertently picking up ~/.cargo/config.

Fixes #4601.  By relying on `__CARGO_TEST_ROOT`, using a temp directory is no
longer necessary.

6 years agoAuto merge of #4628 - pixelistik:patch-1, r=alexcrichton
bors [Mon, 16 Oct 2017 22:24:57 +0000 (22:24 +0000)]
Auto merge of #4628 - pixelistik:patch-1, r=alexcrichton

Fix typo in docs

6 years agoFix typo in docs
pixelistik [Mon, 16 Oct 2017 20:11:24 +0000 (22:11 +0200)]
Fix typo in docs

6 years agoAuto merge of #4619 - camjackson:patch-1, r=alexcrichton
bors [Sun, 15 Oct 2017 17:00:09 +0000 (17:00 +0000)]
Auto merge of #4619 - camjackson:patch-1, r=alexcrichton

Document how to make `build.rs` write to the terminal

Documenting the solution mentioned here: https://github.com/rust-lang/cargo/issues/985

6 years agoAuto merge of #4624 - alexcrichton:bump, r=alexcrichton
bors [Sun, 15 Oct 2017 15:30:51 +0000 (15:30 +0000)]
Auto merge of #4624 - alexcrichton:bump, r=alexcrichton

Bump to 0.24.0

It's that time of the year again!

6 years agoBump to 0.24.0
Alex Crichton [Sun, 15 Oct 2017 15:30:11 +0000 (08:30 -0700)]
Bump to 0.24.0

It's that time of the year again!

6 years agoDocument how to make `build.rs` write to the terminal
Cam Jackson [Sun, 15 Oct 2017 03:30:38 +0000 (11:30 +0800)]
Document how to make `build.rs` write to the terminal

6 years agoAuto merge of #4616 - kennytm:fix-4490, r=alexcrichton
bors [Sat, 14 Oct 2017 14:54:15 +0000 (14:54 +0000)]
Auto merge of #4616 - kennytm:fix-4490, r=alexcrichton

Uplift *.dSYM

Fixed #4490.

The solution is based on #4570. Simply adding `.dSYM` into `add_target_specific_suffixes` will cause cargo trying to actually run that `.dSYM` folder, so I've upgraded the `linkable` boolean into a 3-value enum `TargetFileType`, to tell `cargo run` and `cargo test` to avoid these debug symbol files.

(I haven't checked if it can solve #4056, don't wanna mess with Spotlight 😝)

6 years agoAuto merge of #4618 - integer32llc:config-in-home, r=alexcrichton
bors [Sat, 14 Oct 2017 14:19:16 +0000 (14:19 +0000)]
Auto merge of #4618 - integer32llc:config-in-home, r=alexcrichton

Clarify that $HOME/.cargo is always checked

6 years agoClarify that $HOME/.cargo is always checked
Jake Goulding [Fri, 13 Oct 2017 23:50:04 +0000 (19:50 -0400)]
Clarify that $HOME/.cargo is always checked

6 years agoUplift *.dSYM. Fix #4490.
kennytm [Fri, 13 Oct 2017 19:13:32 +0000 (03:13 +0800)]
Uplift *.dSYM. Fix #4490.

6 years agoAuto merge of #4610 - hdhoang:patch-1, r=alexcrichton
bors [Thu, 12 Oct 2017 14:23:24 +0000 (14:23 +0000)]
Auto merge of #4610 - hdhoang:patch-1, r=alexcrichton

layout: fix typo, and improve pronoun

"it" is ambiguous between `new` and `at` (the most recent noun).

6 years agoAuto merge of #4314 - nodakai:phantom-type-in-projectbuilder, r=matklad
bors [Thu, 12 Oct 2017 08:52:44 +0000 (08:52 +0000)]
Auto merge of #4314 - nodakai:phantom-type-in-projectbuilder, r=matklad

cargotest/support: remove internal mutability in favor of switching types

`Cell<bool>` was removed from `ProjectBuilder`. Instead `PhantomData<T>` was added to it (and `RepoBuilder`) to manage state transition in the type level (`T` is either `Configuring` or `Done`.)
`ProjectBuilder::cargo_process()` was removed as its design heavily depended on the internal mutability.

Also added `#[must_use]` to `ProjectBuilder` and `RepoBuilder` to check for call sites of their `build()` method.

6 years agolayout: fix typo, and improve pronoun
Hoàng Đức Hiếu [Thu, 12 Oct 2017 04:04:58 +0000 (13:04 +0900)]
layout: fix typo, and improve pronoun

"it" is ambiguous between `new` and `at` (the most recent noun).

6 years agoAuto merge of #4608 - vmx:patch-1, r=alexcrichton
bors [Thu, 12 Oct 2017 00:20:13 +0000 (00:20 +0000)]
Auto merge of #4608 - vmx:patch-1, r=alexcrichton

Remove wrong information about git repository

Dependencies cannot be a git repository when published to crates.io.

6 years agoRemove wrong information about git repository
Volker Mische [Wed, 11 Oct 2017 19:18:41 +0000 (21:18 +0200)]
Remove wrong information about git repository

Dependencies cannot be a git repository when published to crates.io.

6 years agoAuto merge of #4594 - behnam:workspace, r=alexcrichton
bors [Tue, 10 Oct 2017 19:20:43 +0000 (19:20 +0000)]
Auto merge of #4594 - behnam:workspace, r=alexcrichton

[core/workspace] Create WorkspaceRootConfig

Create `WorkspaceRootConfig`, which knows its `root_dir` and lists of
`members` and `excludes`, to answer queries on which paths are a member
and which are not.

----

This is the first step of the fix, that's only a codemod to put together the relevant parts : `workspace.members`, `workspace.excludes`, and the `root_dir` (where `members` and `excludes` are relative to). There's no logic change in this PR to keep review easier.

The added tests are commented out, because they fail with the current logic. The next step to get these steps to pass.

Tracker: <https://github.com/rust-lang/cargo/issues/4089>
Old PR: <https://github.com/rust-lang/cargo/pull/4297>

6 years agoAuto merge of #4581 - tamird:master, r=alexcrichton
bors [Tue, 10 Oct 2017 18:36:48 +0000 (18:36 +0000)]
Auto merge of #4581 - tamird:master, r=alexcrichton

cargo_rustc: remove workaround for fixed upstream issue

Fixed in https://github.com/rust-lang/rust/pull/25411. Also, the
removed code is implicated in test failures observed in
https://github.com/rust-lang/rust/pull/44515.

r? @alexcrichton

6 years agoAuto merge of #4602 - ehuss:fix-new-test-windows, r=alexcrichton
bors [Tue, 10 Oct 2017 17:58:30 +0000 (17:58 +0000)]
Auto merge of #4602 - ehuss:fix-new-test-windows, r=alexcrichton

Allow test to pass if user has ~/.gitconfig on Windows.

The `new` test will fail on Windows if you have `~/.gitconfig` configured with a username/email.  This is because libgit2 searches quite a few environment variables hunting for a config file.  Rather than adjusting other environment variables (I think at a minimum it would be `%HOMEDRIVE%%HOMEPATH%` and `%USERPROFILE%`), this just adds an empty config file since libgit2 will stop at the first one it finds.

6 years agocargo_rustc: remove workaround for fixed upstream issue
Tamir Duberstein [Thu, 5 Oct 2017 06:54:43 +0000 (02:54 -0400)]
cargo_rustc: remove workaround for fixed upstream issue

Fixed in https://github.com/rust-lang/rust/pull/25411. Also, the
removed code is implicated in test failures observed in
https://github.com/rust-lang/rust/pull/44515.

6 years agocargotest/support: remove internal mutability in favor of switching types
NODA, Kai [Sat, 22 Jul 2017 03:12:21 +0000 (11:12 +0800)]
cargotest/support: remove internal mutability in favor of switching types

Remove is_build: Cell<bool> from ProjectBuilder and introduce a new type Project.

is_build==false <-> ProjectBuilder
is_build==true <-> Project

Also add #[must_use] to ProjectBuilder to confirm its instances are surely consumed by its build() method to produce Project.

The same goes for RepoBuilder.

ProjectBuilder::cargo_process() was removed as its design heavily depended on the internal mutability.

Signed-off-by: NODA, Kai <nodakai@gmail.com>
6 years agoAllow test to pass if user has ~/.gitconfig on Windows.
Eric Huss [Tue, 10 Oct 2017 00:52:51 +0000 (17:52 -0700)]
Allow test to pass if user has ~/.gitconfig on Windows.

6 years agoAuto merge of #4570 - tatsuya6502:target-specific-artifacts, r=alexcrichton
bors [Mon, 9 Oct 2017 20:48:17 +0000 (20:48 +0000)]
Auto merge of #4570 - tatsuya6502:target-specific-artifacts, r=alexcrichton

Handle target specific outputs such as .wasm or .dll.lib

Fixes #4500, #4535

Until now, Cargo does not have any knowledge about target-specific output files. It relies solely on rustc for this sort of information (`rustc --print=file-names ...`).

As a result, Cargo does not place some build artifacts (files) to target/{debug,release} directory. These files include *.wasm for wasm32-unknown-emscripten target and *.dll.lib for *-pc-windows-msvc cdylib target.

This commit will add such knowledge to Cargo so that *.wasm and *.dll.lib will be placed in target/{debug,release} directory.

**EDIT**: I added [a summary of changes](https://github.com/rust-lang/cargo/pull/4570#issuecomment-334433635). Please read it for more details of changes.

**IMPORTANT**
Although I added test cases for both wasm32-unknown-emscripten and *-pc-windows-msvc cdylib targets, ~I did not do manual testing on wasm32-unknown-emscripten target as I do not have an environment with emscripten installed. It will be appreciated if anybody tests this change for wasm32-unknown-emscripten target.~  **EDIT**: Tested for both wasm32-unknown-emscripten and x86_64-pc-windows-msvc. Thanks @Herschel for the help.

6 years agoAuto merge of #4597 - andreevlex:fix-cargo-doc, r=alexcrichton
bors [Mon, 9 Oct 2017 17:53:25 +0000 (17:53 +0000)]
Auto merge of #4597 - andreevlex:fix-cargo-doc, r=alexcrichton

Fixed spelling error in manifest.md

6 years agoFixed spelling error in manifest.md
Andreev Alexander [Mon, 9 Oct 2017 13:38:06 +0000 (16:38 +0300)]
Fixed spelling error in manifest.md

6 years agoAuto merge of #4595 - treiff:update-appveyor-badge-documentation, r=alexcrichton
bors [Sun, 8 Oct 2017 02:32:33 +0000 (02:32 +0000)]
Auto merge of #4595 - treiff:update-appveyor-badge-documentation, r=alexcrichton

Update docs for appveyor badge.

Can now optionally specify the appveyor `project_name`.

Related PR: [rust-lang/crates.io#1111](https://github.com/rust-lang/crates.io/pull/1111)
Related Issue: [rust-lang/crates.io#587](https://github.com/rust-lang/crates.io/issues/587)

6 years agoUpdate docs for appveyor badge.
Trevor Reiff [Sun, 8 Oct 2017 00:59:39 +0000 (20:59 -0400)]
Update docs for appveyor badge.

6 years ago[workspace] Add some docs
Behnam Esfahbod [Sat, 7 Oct 2017 22:00:13 +0000 (15:00 -0700)]
[workspace] Add some docs

Plus some little codemod.

6 years ago[core/workspace] Create WorkspaceRootConfig
Behnam Esfahbod [Tue, 26 Sep 2017 05:55:02 +0000 (22:55 -0700)]
[core/workspace] Create WorkspaceRootConfig

Create `WorkspaceRootConfig`, which knows its `root_dir` and lists of
`members` and `excludes`, to answer queries on which paths are a member
and which are not.

6 years agoAuto merge of #4578 - derekdreery:refactor/cargo_util_config, r=alexcrichton
bors [Sat, 7 Oct 2017 15:09:06 +0000 (15:09 +0000)]
Auto merge of #4578 - derekdreery:refactor/cargo_util_config, r=alexcrichton

Remove some cells from Config

In most cases it makes sense to not use interior mutability in Config, so that mutability is more transparent. This PR removes Cells in these cases. It leaves those cases where parameters are only initialized on first access (LazyCell).

6 years agoUpdate docs (replace todos)
Richard Dodd [Sat, 7 Oct 2017 12:47:21 +0000 (13:47 +0100)]
Update docs (replace todos)

6 years agoAuto merge of #4586 - lukaslueg:issue4534, r=alexcrichton
bors [Fri, 6 Oct 2017 17:54:30 +0000 (17:54 +0000)]
Auto merge of #4586 - lukaslueg:issue4534, r=alexcrichton

Report hint if single failure with --no-fail-fast

There are two things going on in #4534:

* The doctest-kind masks the unittest-kind if doctests are executed during `--no-fail-fast`, no doctests fail and tests errors have already piled up. This is bug, fixed.
* Cargo would previously not report any unittest-hints if running with `--no-fail-fast`. This behavior has been changed to report a specific hint iif exactly one error has bubbled up during `--no-fail-fast`. The hint in #4534 is now `...pass '--test integ'`.

6 years agoReport hint if single failure with --no-fail-fast
Lukas Lueg [Fri, 6 Oct 2017 16:14:23 +0000 (18:14 +0200)]
Report hint if single failure with --no-fail-fast

If a single unit-test fails, report a rerun-hint for it,
even with --no-fail-fast.

Fixes reporting a doctest-hint if doctest succeeds while
unittest fail with --no-fail-fast.

Fixes #4534

6 years agoAuto merge of #4583 - alexcrichton:unstable, r=matklad
bors [Thu, 5 Oct 2017 22:54:59 +0000 (22:54 +0000)]
Auto merge of #4583 - alexcrichton:unstable, r=matklad

Fix [patch] causing updates with a virtual manifest

This commit fixes the [patch] implementation to avoid causing spurious updates
of the registry when specified inside of a virtual manifest via a path
dependency that was otherwise outside of the workspace.

Cargo previously attempted to learn about path dependencies through the
configuration of the workspace by looking at members, their path dependencies,
and their replace sections. The replace/patch sections, however, only matter at
the root of the workspace and those weren't looked at! This commit fixes this
problem by explicitly looking at the workspace's replace/patch sections and
avoiding looking at other manifest replace/patch which shouldn't matter.

Closes #4552

6 years agoFix [patch] causing updates with a virtual manifest
Alex Crichton [Thu, 5 Oct 2017 22:11:25 +0000 (15:11 -0700)]
Fix [patch] causing updates with a virtual manifest

This commit fixes the [patch] implementation to avoid causing spurious updates
of the registry when specified inside of a virtual manifest via a path
dependency that was otherwise outside of the workspace.

Cargo previously attempted to learn about path dependencies through the
configuration of the workspace by looking at members, their path dependencies,
and their replace sections. The replace/patch sections, however, only matter at
the root of the workspace and those weren't looked at! This commit fixes this
problem by explicitly looking at the workspace's replace/patch sections and
avoiding looking at other manifest replace/patch which shouldn't matter.

Closes #4552

6 years agoHandle target specific outputs such as .wasm
Tatsuya Kawano [Thu, 5 Oct 2017 01:37:04 +0000 (09:37 +0800)]
Handle target specific outputs such as .wasm

Fixes #4535

- Do not add metadata to wasm32 bin target because generated .js will
  refer corresponding .wasm.
- Handle different usages of "-" and "_" in .js and .wasm file names.
  (e.g "foo-bar.js" vs. "foo_bar.wasm")
- Change file mode of cargo_rustc/context.rs (100755 -> 100644)

6 years agoAuto merge of #4580 - djc:cargo-update, r=alexcrichton
bors [Wed, 4 Oct 2017 22:35:33 +0000 (22:35 +0000)]
Auto merge of #4580 - djc:cargo-update, r=alexcrichton

Update dependencies (unbreak macOS 10.13 with libgit2-sys-0.6.16)

It would be nice to pull in the fix for https://github.com/alexcrichton/git2-rs/issues/257.

6 years agoAuto merge of #4579 - mdevlamynck:issue-3388, r=alexcrichton
bors [Wed, 4 Oct 2017 22:04:49 +0000 (22:04 +0000)]
Auto merge of #4579 - mdevlamynck:issue-3388, r=alexcrichton

Fix error message when Cargo.toml misses a [package] section

Fixes #3388.

6 years agoUpdate dependencies (unbreak macOS 10.13 with libgit2-sys-0.6.16)
Dirkjan Ochtman [Wed, 4 Oct 2017 19:37:55 +0000 (21:37 +0200)]
Update dependencies (unbreak macOS 10.13 with libgit2-sys-0.6.16)

6 years agoFix error message when Cargo.toml misses a [package] section, remove an unused import
Matthias Devlamynck [Wed, 4 Oct 2017 19:24:26 +0000 (21:24 +0200)]
Fix error message when Cargo.toml misses a [package] section, remove an unused import

6 years agoAuto merge of #4571 - raytung:remove-root-from-cargo-lock, r=matklad
bors [Wed, 4 Oct 2017 18:30:20 +0000 (18:30 +0000)]
Auto merge of #4571 - raytung:remove-root-from-cargo-lock, r=matklad

Remove root from cargo lock

Removing [root] section from Cargo.lock for #4563

Tests of interest has been updated accordingly, especially [tests/lockfile-compat.rs#oldest_lockfile_still_works](https://github.com/rust-lang/cargo/compare/master...raytung:remove-root-from-cargo-lock?expand=1#diff-48866d1891f97cb799dd0ca7148d1eefR10)

6 years agoRemove cells where now unnecessary.
Richard Dodd [Wed, 4 Oct 2017 18:11:34 +0000 (19:11 +0100)]
Remove cells where now unnecessary.

6 years agoRefactor Config::configure to take &mut.
Richard Dodd [Wed, 4 Oct 2017 17:03:08 +0000 (18:03 +0100)]
Refactor Config::configure to take &mut.

7 years agoAuto merge of #4556 - lukaslueg:patch-1, r=carols10cents
bors [Wed, 4 Oct 2017 13:50:45 +0000 (13:50 +0000)]
Auto merge of #4556 - lukaslueg:patch-1, r=carols10cents

Update README.md

Table is outdated and of little use anyway

7 years agoAuto merge of #4558 - lukaslueg:issue4504, r=alexcrichton
bors [Wed, 4 Oct 2017 09:13:29 +0000 (09:13 +0000)]
Auto merge of #4558 - lukaslueg:issue4504, r=alexcrichton

Allow multiple arguments in `cargo bench`

It seems the docopt DSL was simply lacking.

7 years agoUpdated old lockfile tests
Ray Tung [Tue, 3 Oct 2017 14:57:49 +0000 (01:57 +1100)]
Updated old lockfile tests

7 years agoRemoved root related flags
Ray Tung [Tue, 3 Oct 2017 14:35:32 +0000 (01:35 +1100)]
Removed root related flags

7 years agoRevert "Removed root related flags"
Ray Tung [Tue, 3 Oct 2017 14:28:13 +0000 (01:28 +1100)]
Revert "Removed root related flags"

This reverts commit 6f03cce1c3e6083f882fc56100487e616f60fa6b.

7 years agoUpdated test to ensure cargo update transforms Cargo.lock
Ray Tung [Tue, 3 Oct 2017 14:05:57 +0000 (01:05 +1100)]
Updated test to ensure cargo update transforms Cargo.lock

7 years agoRemoved root related flags
Ray Tung [Tue, 3 Oct 2017 13:50:33 +0000 (00:50 +1100)]
Removed root related flags

7 years agoRevert the file mode on context.rs (100644 -> 100755)
Tatsuya Kawano [Tue, 3 Oct 2017 12:46:45 +0000 (20:46 +0800)]
Revert the file mode on context.rs (100644 -> 100755)

7 years agoUpdated appropriate docs referencing [root]
Ray Tung [Tue, 3 Oct 2017 12:33:32 +0000 (23:33 +1100)]
Updated appropriate docs referencing [root]

7 years agoRemoved extraneous logic that generates [root] in cargo.lock
Ray Tung [Tue, 3 Oct 2017 12:18:08 +0000 (23:18 +1100)]
Removed extraneous logic that generates [root] in cargo.lock

7 years agoHandle target specific outputs such as .wasm or .dll.lib
Tatsuya Kawano [Tue, 3 Oct 2017 11:44:35 +0000 (19:44 +0800)]
Handle target specific outputs such as .wasm or .dll.lib

Fixes #4500, #4535

Until now, Cargo does not have any knowledge about target-specific
output files. It relies solely on rustc for this sort of information
(`rustc --print=file-names ...`).

As a result, Cargo does not place some build artifacts (files) to
target/{debug,release} directory. These files include *.wasm
for wasm32-unknown-emscripten target and *.dll.lib for
*-pc-windows-msvc cdylib target.

This commit will add such knowledge to Cargo so that *.wasm and
*.dll.lib will be placed in target/{debug,release} directory.

7 years agoAuto merge of #4564 - rust-lang:matklad-patch-2, r=alexcrichton
bors [Tue, 3 Oct 2017 10:17:41 +0000 (10:17 +0000)]
Auto merge of #4564 - rust-lang:matklad-patch-2, r=alexcrichton

Describe E-mentor label in contributing.md

7 years agoAuto merge of #4559 - derekdreery:add_docs, r=alexcrichton
bors [Tue, 3 Oct 2017 09:18:58 +0000 (09:18 +0000)]
Auto merge of #4559 - derekdreery:add_docs, r=alexcrichton

Add some more docs

Add some more docs for various parts of cargo, and add/improve a few debug implementations.

7 years agoDescribe E-mentor label in contributing.md
Aleksey Kladov [Mon, 2 Oct 2017 19:11:09 +0000 (22:11 +0300)]
Describe E-mentor label in contributing.md

7 years agoRevert Cargo.lock
Richard Dodd [Mon, 2 Oct 2017 12:38:52 +0000 (13:38 +0100)]
Revert Cargo.lock

7 years agoMerge remote-tracking branch 'upstream/master' into add_docs
Richard Dodd [Mon, 2 Oct 2017 12:37:40 +0000 (13:37 +0100)]
Merge remote-tracking branch 'upstream/master' into add_docs

7 years agoAuto merge of #4562 - SimonSapin:btree-manifest, r=matklad
bors [Mon, 2 Oct 2017 10:40:21 +0000 (10:40 +0000)]
Auto merge of #4562 - SimonSapin:btree-manifest, r=matklad

Make manifest serialization deterministic

Fixes #4326

`cargo package` (and so `cargo publish`) parses a crate’s `Cargo.toml`, makes some modifications, and re-serializes it. Because the `TomlManifest` struct uses `HashMap` with its default `RandomState` hasher, the maps’ iteration order changed on every run.

As a result, when using `cargo vendor`, updating a dependency would generate a diff larger than necessary, with non-significant order-changes obscuring significant changes.

This replaces some uses of `HashMap` with `BTreeMap`, whose iteration order is deterministic (based on `Ord`).

7 years agoMake manifest serialization deterministic
Simon Sapin [Mon, 2 Oct 2017 10:04:02 +0000 (12:04 +0200)]
Make manifest serialization deterministic

Fixes #4326

`cargo package` (and so `cargo publish`) parses a crate’s `Cargo.toml`,
makes some modifications, and re-serializes it.
Because the `TomlManifest` struct uses `HashMap`
with its default `RandomState` hasher,
the maps’ iteration order changed on every run.

As a result, when using `cargo vendor`,
updating a dependency would generate a diff larger than necessary,
with non-significant order-changes obscuring significant changes.

This replaces some uses of `HashMap` with `BTreeMap`,
whose iteration order is deterministic (based on `Ord`).

7 years agoSome moer docs
Richard Dodd [Sun, 1 Oct 2017 18:37:48 +0000 (19:37 +0100)]
Some moer docs

7 years agoAdd some more docs
Richard Dodd [Sun, 1 Oct 2017 13:47:53 +0000 (14:47 +0100)]
Add some more docs

7 years agoAllow multiple arguments in `cargo bench`
Lukas Lueg [Sat, 30 Sep 2017 14:51:42 +0000 (16:51 +0200)]
Allow multiple arguments in `cargo bench`

Fixes #4504

7 years agoAuto merge of #4554 - lukaslueg:contributing, r=alexcrichton
bors [Sat, 30 Sep 2017 09:40:21 +0000 (09:40 +0000)]
Auto merge of #4554 - lukaslueg:contributing, r=alexcrichton

Expand contribution guidelines

Expand `contributing.md`, including inspirations from Rust's and some other projects' guides.

7 years agoUpdate README.md
lukaslueg [Sat, 30 Sep 2017 09:18:22 +0000 (11:18 +0200)]
Update README.md

Table is outdated and of little use anyway

7 years agoAuto merge of #4553 - integer32llc:typos, r=alexcrichton
bors [Sat, 30 Sep 2017 08:49:52 +0000 (08:49 +0000)]
Auto merge of #4553 - integer32llc:typos, r=alexcrichton

Fix some typos in docs and error messages

7 years agoAuto merge of #4550 - lukaslueg:issue4539, r=alexcrichton
bors [Sat, 30 Sep 2017 08:05:10 +0000 (08:05 +0000)]
Auto merge of #4550 - lukaslueg:issue4539, r=alexcrichton

Improve error ico doc-targets with same name

Replace the `assert!` that was triggered in #4539 with a `bail!`, giving the user a clear error that points to the offending packages. The error message now looks like

> The binary `foo_cli` is specified by packages `foo (file://...)` and `bar (file://...)` but can be documented only once. Consider renaming or marking one of the targets as `doc = false`.

or

> The library `foo_cli` is specified by packages `foo (file://...)` and `bar (file://...)` ...

or

> The target `foo_cli` is specified as a library and as a binary by package `foo (file://...)`. It can be documented only once. Consider...

or

> The target `foo_cli` is specified as a library by package `foo (file://...)` and as a binary by package `bar (file://...)`. It can be ...

Add unit-test for all cases, including one that ensures the advertised mitigation `doc = false` actually works.

7 years agoAuto merge of #4551 - natboehm:owner-invite-messages, r=alexcrichton
bors [Sat, 30 Sep 2017 07:37:59 +0000 (07:37 +0000)]
Auto merge of #4551 - natboehm:owner-invite-messages, r=alexcrichton

Owner invite messages

This PR addresses issue #4537, the plan for `cargo owner --add` requiring invitations in Cargo and the encompassing issue [#924](https://github.com/rust-lang/crates.io/issues/924), requiring an invite to add someone as an owner in Crates.io.

Regarding the Cargo issue, we went with Option 2, changing the `add_owners` function to decode a struct sent from Crates containing a `boolean` and `String`, the `boolean` being the response status and `String` being the success message. This may sound redundant however we concluded that using both of these fields were necessary to support older versions of Cargo - if we changed Crates.io to only return the `String` message on success this would likely break systems using the older version of `add_owner` expecting a response containing a `boolean`. Matching this schema, `add_owners` on the Crates.io side will soon return a struct containing a `boolean` and `String`, and instead of adding a new crate owner to the database will add a crate owner invite. If successful, `modify_owners` now prints the message sent from Crates.io instead of the old hardcoded message.

Resolves #4537

7 years agoExpand contribution guidelines
Lukas Lueg [Fri, 29 Sep 2017 20:31:14 +0000 (22:31 +0200)]
Expand contribution guidelines

7 years agoFix some typos in docs and error messages
Carol (Nichols || Goulding) [Fri, 29 Sep 2017 19:36:55 +0000 (15:36 -0400)]
Fix some typos in docs and error messages

7 years agoAuto merge of #4546 - derekdreery:add_docs, r=matklad
bors [Fri, 29 Sep 2017 13:07:13 +0000 (13:07 +0000)]
Auto merge of #4546 - derekdreery:add_docs, r=matklad

Add some docs

I was reading around the source, trying to understand it, and writing docs to help myself. I thought they may be useful for the main crate.

7 years agoImprove error ico doc-targets with same name
Lukas Lueg [Fri, 29 Sep 2017 11:46:31 +0000 (13:46 +0200)]
Improve error ico doc-targets with same name

We can currently only document one doc-target per name.
Replace an assert! with a clear error message in that case.
Fixes #4539.

7 years agoAuto merge of #4547 - lukaslueg:installlisterror, r=alexcrichton
bors [Fri, 29 Sep 2017 07:09:41 +0000 (07:09 +0000)]
Auto merge of #4547 - lukaslueg:installlisterror, r=alexcrichton

Improve error message for crippled .crates.toml

In case `.crates.toml` can't be parsed for some reason, the user is left wondering where to look. The problem is exasperated by the fact that `.cargo.toml` is a hidden file. Improve the error message during `install`/`uninstall`/`list` and point to the path of `.crates.toml`. A error message might now look like

> error: failed to parse crate metadata at `/home/foobar/.cargo/.crates.toml`
>
> Caused by:
>   invalid TOML found for metadata
>
> Caused by:
>   ...

A unit-test for a crippled `.cargo.toml` had been missing before, added that.

7 years agoAuto merge of #4542 - equal-l2:sha256-crypto-hash, r=alexcrichton
bors [Fri, 29 Sep 2017 06:48:13 +0000 (06:48 +0000)]
Auto merge of #4542 - equal-l2:sha256-crypto-hash, r=alexcrichton

Use crypto-hash to calculate SHA256

`crypto-hash` is an abstraction library for native hash libraries.
It uses CryptoAPI on Windows, CommonCrypto on macOS, and OpenSSL on *nix.

This PR will also remove `openssl` and `advapi32-sys` from dependencies since they are only used for calculating SHA256, which is superseded by `crypto-hash`.
(`crypto-hash` itself uses `openssl` and `advapi32-sys` though)

7 years agoadd boolean to struct to support what crates is sending
Natalie Boehm [Thu, 28 Sep 2017 19:23:48 +0000 (15:23 -0400)]
add boolean to struct to support what crates is sending

in case an old version of cargo is being used. the old
version should be able to decode the boolean and ignore
the string.

7 years agoImprove error message for crippled .crates.toml
Lukas Lueg [Thu, 28 Sep 2017 17:43:40 +0000 (19:43 +0200)]
Improve error message for crippled .crates.toml

7 years agoAdd some docs
Richard Dodd [Thu, 28 Sep 2017 14:01:56 +0000 (15:01 +0100)]
Add some docs

7 years agoAuto merge of #4543 - nerdrew:master, r=matklad
bors [Thu, 28 Sep 2017 07:47:38 +0000 (07:47 +0000)]
Auto merge of #4543 - nerdrew:master, r=matklad

teach zsh completion +{stable,beta,nightly}

e.g.: `cargo +nightly test`

7 years agoteach zsh completion +{stable,beta,nightly}
Andrew Lazarus [Thu, 28 Sep 2017 05:24:17 +0000 (22:24 -0700)]
teach zsh completion +{stable,beta,nightly}

e.g.: cargo +nightly test

7 years agochange add_owners to return a string and transmit the status message passed from...
Natalie Boehm [Wed, 27 Sep 2017 19:08:17 +0000 (15:08 -0400)]
change add_owners to return a string and transmit the status message passed from the owner_add function in crates.io

7 years agoAuto merge of #4541 - raytung:update-man-page, r=carols10cents
bors [Wed, 27 Sep 2017 16:02:44 +0000 (16:02 +0000)]
Auto merge of #4541 - raytung:update-man-page, r=carols10cents

Recover lost man changes

Recover lost man changes per @carols10cents's comment in #2689

7 years agoFix compilation error
equal-l2 [Wed, 27 Sep 2017 13:46:06 +0000 (22:46 +0900)]
Fix compilation error

7 years agoUse crypto-hash to calculate SHA256
equal-l2 [Wed, 27 Sep 2017 12:14:55 +0000 (21:14 +0900)]
Use crypto-hash to calculate SHA256

7 years agoRecover lost man changes
Ray Tung [Wed, 27 Sep 2017 11:34:03 +0000 (21:34 +1000)]
Recover lost man changes

7 years agoi don't know if this works but i should commit
Natalie Boehm [Tue, 26 Sep 2017 21:01:50 +0000 (17:01 -0400)]
i don't know if this works but i should commit

7 years agoAuto merge of #4531 - lukaslueg:springclean, r=alexcrichton
bors [Tue, 26 Sep 2017 14:19:46 +0000 (14:19 +0000)]
Auto merge of #4531 - lukaslueg:springclean, r=alexcrichton

Cleaning lints

More fixes and cleanups. There will be at least two more commits to come.

7 years agoReset unneeded lint changes
Lukas Lueg [Tue, 26 Sep 2017 07:54:07 +0000 (09:54 +0200)]
Reset unneeded lint changes

7 years agoAuto merge of #4523 - dbrgn:badges-docs, r=matklad
bors [Sun, 24 Sep 2017 20:10:35 +0000 (20:10 +0000)]
Auto merge of #4523 - dbrgn:badges-docs, r=matklad

Improve docs for build badges

The `repo` format wasn't clear to me. I also fixed a typo and clarified how the is-it-maintained badges are generated

7 years agoMore lint cleaning
Lukas Lueg [Sun, 24 Sep 2017 14:26:37 +0000 (16:26 +0200)]
More lint cleaning

7 years agoAuto merge of #4530 - djc:update-deps, r=alexcrichton
bors [Sat, 23 Sep 2017 16:27:11 +0000 (16:27 +0000)]
Auto merge of #4530 - djc:update-deps, r=alexcrichton

Update dependencies

It would be nice to use openssl-0.9.19 in particular, since it supports
newer LibreSSL.

Not sure how this usually works, would it be better to only update openssl and related dependencies? I figured doing everything at once couldn't hurt, and it seems to pass tests locally at least.

Also, would it be feasible to backport this to the beta branch?

7 years agoAuto merge of #4532 - copyninja:master, r=alexcrichton
bors [Sat, 23 Sep 2017 16:02:07 +0000 (16:02 +0000)]
Auto merge of #4532 - copyninja:master, r=alexcrichton

Fix typo's in the cargo's output messages.

I'm forwarding  the patch we used in Debian to fix the typo's which were found in cargo's output messages.

7 years agoFix typo's in the cargo's output messages.
Vasudev Kamath [Sat, 23 Sep 2017 11:25:41 +0000 (16:55 +0530)]
Fix typo's in the cargo's output messages.

7 years agoUpdate dependencies
Dirkjan Ochtman [Sat, 23 Sep 2017 07:57:34 +0000 (09:57 +0200)]
Update dependencies

It would be nice to use openssl-0.9.19 in particular, since it supports
newer LibreSSL.

7 years agoAuto merge of #4528 - adrian5:patch-1, r=alexcrichton
bors [Sat, 23 Sep 2017 04:25:35 +0000 (04:25 +0000)]
Auto merge of #4528 - adrian5:patch-1, r=alexcrichton

Fix typo in doc

7 years agoAuto merge of #4526 - lukaslueg:patch-2, r=matklad
bors [Sat, 23 Sep 2017 03:54:06 +0000 (03:54 +0000)]
Auto merge of #4526 - lukaslueg:patch-2, r=matklad

Update CONTRIBUTING.md

Point out that code added to Cargo may raise the minimal version of Rust required. Cargo does not have a grace period where it has to compile on "stable -2" or anything like that.