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

pre-stabilization documentation for workspace inheritance #10659

Merged
merged 1 commit into from May 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 31 additions & 0 deletions src/doc/src/reference/unstable.md
Expand Up @@ -1215,6 +1215,37 @@ cargo check -Z unstable-options -Z check-cfg=features,names,values

* 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)
* [Status](https://github.com/rust-lang/cargo/issues/8415#issuecomment-1112618913)
* [Example Port](https://github.com/clap-rs/clap/pull/3719)

### Testing notes

Target audience for testing
* Maintainer who has a workspace
* *(optional)* Project depends on nightly toolchain

In preparing to stabilize, we are wanting to better understand
* If there were any pain points in porting your project
* Any errors or bugs that you found in testing
* Performance concerns
* Gaps in documentation
Muscraft marked this conversation as resolved.
Show resolved Hide resolved
* Thoughts on how you feel this feature will work in practice

Please provide feedback on the [tracking issue](https://github.com/rust-lang/cargo/issues/8415)
or create an issue for any bugs encountered.

To get started
1. Have a (recent) nightly version installed
2. Place `cargo-features = ["workspace-inheritance"]` at the top of any `Cargo.toml` you
plan to use this feature in
3. Create a `[workspace.package]` and `[workspace.dependencies]` in your workspace `Cargo.toml`
4. Move any package keys or dependencies you feel should be shared between crates to their
respective workspace table
5. Change any keys you want to inherit to `{key}.workspace = true` in the member `Cargo.toml`
6. run `cargo +nightly check`

An example port has been made [in this PR](https://github.com/clap-rs/clap/pull/3719) as
a "real-life" guide.

### The `workspace.package` table

Expand Down