Skip to content

Commit

Permalink
document the -Zallow-yanked-deps unstable CLI flag
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroalbini committed Sep 4, 2018
1 parent 226eefd commit 632ace6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
15 changes: 8 additions & 7 deletions src/bin/cargo/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,14 @@ pub fn main(config: &mut Config) -> CliResult {
"
Available unstable (nightly-only) flags:
-Z avoid-dev-deps -- Avoid installing dev-dependencies if possible
-Z minimal-versions -- Install minimal dependency versions instead of maximum
-Z no-index-update -- Do not update the registry, avoids a network request for benchmarking
-Z offline -- Offline mode that does not perform network requests
-Z unstable-options -- Allow the usage of unstable options such as --registry
-Z config-profile -- Read profiles from .cargo/config files
-Z compile-progress -- Display a progress bar while compiling
-Z avoid-dev-deps -- Avoid installing dev-dependencies if possible
-Z minimal-versions -- Install minimal dependency versions instead of maximum
-Z no-index-update -- Do not update the registry, avoids a network request for benchmarking
-Z offline -- Offline mode that does not perform network requests
-Z unstable-options -- Allow the usage of unstable options such as --registry
-Z config-profile -- Read profiles from .cargo/config files
-Z compile-progress -- Display a progress bar while compiling
-Z allow-yanked-deps -- Allow depending on yanked crates
Run with 'cargo -Z [FLAG] [SUBCOMMAND]'"
);
Expand Down
12 changes: 12 additions & 0 deletions src/doc/src/reference/unstable.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,18 @@ directory. Example:
cargo +nightly build --out-dir=out -Z unstable-options
```

## allow-yanked-deps
* Original Issue: [#4425](https://github.com/rust-lang/cargo/issues/4225)

This feature allows your project to depend on yanked crates.

The flag can be useful if you need to build an old project that relies on a
yanked dependency, and you can't update it. The flag should not be used on new
or maintained projects: remember that yanked crates are not meant to be used.

```
cargo +nightly build -Z allow-yanked-deps
```

### Edition
* Tracking Issue: [rust-lang/rust#44581](https://github.com/rust-lang/rust/issues/44581)
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/cargo_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,6 @@ fn explain() {
fn z_flags_help() {
cargo_process("-Z help")
.with_stdout_contains(
" -Z unstable-options -- Allow the usage of unstable options such as --registry",
" -Z unstable-options -- Allow the usage of unstable options such as --registry",
).run();
}

0 comments on commit 632ace6

Please sign in to comment.