Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move workspace inheritance untable docs to the correct place #10609

Merged
merged 1 commit into from
Apr 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 63 additions & 63 deletions src/doc/src/reference/unstable.md
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,68 @@ For instance:
cargo check -Z unstable-options -Z check-cfg-well-known-values
```

### workspace-inheritance

* RFC: [#2906](https://github.com/rust-lang/rfcs/blob/master/text/2906-cargo-workspace-deduplicate.md)
* Tracking Issue: [#8415](https://github.com/rust-lang/cargo/issues/8415)

The `workspace-inheritance` feature allows workspace members to inherit fields
and dependencies from a workspace.

Example 1:

```toml
# in workspace's Cargo.toml
[workspace.dependencies]
log = "0.3.1"
log2 = { version = "2.0.0", package = "log" }
serde = { git = 'https://github.com/serde-rs/serde' }
wasm-bindgen-cli = { path = "crates/cli" }
```

```toml
# in a workspace member's Cargo.toml
[dependencies]
log.workspace = true
log2.workspace = true
```

Example 2:
```toml
# in workspace's Cargo.toml
[workspace.package]
version = "1.2.3"
authors = ["Nice Folks"]
description = "..."
documentation = "https://example.github.io/example"
readme = "README.md"
homepage = "https://example.com"
repository = "https://github.com/example/example"
license = "MIT"
license-file = "./LICENSE"
keywords = ["cli"]
categories = ["development-tools"]
publish = false
edition = "2018"
```

```toml
# in a workspace member's Cargo.toml
[package]
version.workspace = true
authors.workspace = true
description.workspace = true
documentation.workspace = true
readme.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
license-file.workspace = true
keywords.workspace = true
categories.workspace = true
publish.workspace = true
```

## Stabilized and removed features

### Compile progress
Expand Down Expand Up @@ -1408,66 +1470,4 @@ See the [Features chapter](features.md#dependency-features) for more information

The `-Ztimings` option has been stabilized as `--timings` in the 1.60 release.
(`--timings=html` and the machine-readable `--timings=json` output remain
unstable and require `-Zunstable-options`.)

### workspace-inheritance

* RFC: [#2906](https://github.com/rust-lang/rfcs/blob/master/text/2906-cargo-workspace-deduplicate.md)
* Tracking Issue: [#8415](https://github.com/rust-lang/cargo/issues/8415)

The `workspace-inheritance` feature allows workspace members to inherit fields
and dependencies from a workspace.

Example 1:

```toml
# in workspace's Cargo.toml
[workspace.dependencies]
log = "0.3.1"
log2 = { version = "2.0.0", package = "log" }
serde = { git = 'https://github.com/serde-rs/serde' }
wasm-bindgen-cli = { path = "crates/cli" }
```

```toml
# in a workspace member's Cargo.toml
[dependencies]
log.workspace = true
log2.workspace = true
```

Example 2:
```toml
# in workspace's Cargo.toml
[workspace.package]
version = "1.2.3"
authors = ["Nice Folks"]
description = "..."
documentation = "https://example.github.io/example"
readme = "README.md"
homepage = "https://example.com"
repository = "https://github.com/example/example"
license = "MIT"
license-file = "./LICENSE"
keywords = ["cli"]
categories = ["development-tools"]
publish = false
edition = "2018"
```

```toml
# in a workspace member's Cargo.toml
[package]
version.workspace = true
authors.workspace = true
description.workspace = true
documentation.workspace = true
readme.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
license-file.workspace = true
keywords.workspace = true
categories.workspace = true
publish.workspace = true
```
unstable and require `-Zunstable-options`.)