Skip to content

Commit 3f052d8

Browse files
committed
Auto merge of #10659 - Muscraft:prestabilization-inheritance-docs, r=epage
pre-stabilization documentation for workspace inheritance This is adding documentation for how we would like users to test workspace inheritance. This came about from a discussion between `@epage` and I on better ways to document "pre-stabilization" features that are looking for people to test them. One of the ideas was to add some of the documentation to `unstable.md` so that it is all in one area. Having it in one area allows us to link to it so there are testing notes and documentation in one place. It also helps when posting in various places looking for testers as we can link to the nightly docs as needed. One idea was to post in TWiR [under a new table](rust-lang/this-week-in-rust#3236) and this also helps with this. The new documentation covers - What we are looking for from testers - Where to give feedback - How to test this feature - An example port as a guide r? `@epage`
2 parents fbe2e68 + 6892cc3 commit 3f052d8

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

src/doc/src/reference/unstable.md

+31
Original file line numberDiff line numberDiff line change
@@ -1215,6 +1215,37 @@ cargo check -Z unstable-options -Z check-cfg=features,names,values
12151215

12161216
* RFC: [#2906](https://github.com/rust-lang/rfcs/blob/master/text/2906-cargo-workspace-deduplicate.md)
12171217
* Tracking Issue: [#8415](https://github.com/rust-lang/cargo/issues/8415)
1218+
* [Status](https://github.com/rust-lang/cargo/issues/8415#issuecomment-1112618913)
1219+
* [Example Port](https://github.com/clap-rs/clap/pull/3719)
1220+
1221+
### Testing notes
1222+
1223+
Target audience for testing
1224+
* Maintainer who has a workspace
1225+
* *(optional)* Project depends on nightly toolchain
1226+
1227+
In preparing to stabilize, we are wanting to better understand
1228+
* If there were any pain points in porting your project
1229+
* Any errors or bugs that you found in testing
1230+
* Performance concerns
1231+
* Gaps in documentation
1232+
* Thoughts on how you feel this feature will work in practice
1233+
1234+
Please provide feedback on the [tracking issue](https://github.com/rust-lang/cargo/issues/8415)
1235+
or create an issue for any bugs encountered.
1236+
1237+
To get started
1238+
1. Have a (recent) nightly version installed
1239+
2. Place `cargo-features = ["workspace-inheritance"]` at the top of any `Cargo.toml` you
1240+
plan to use this feature in
1241+
3. Create a `[workspace.package]` and `[workspace.dependencies]` in your workspace `Cargo.toml`
1242+
4. Move any package keys or dependencies you feel should be shared between crates to their
1243+
respective workspace table
1244+
5. Change any keys you want to inherit to `{key}.workspace = true` in the member `Cargo.toml`
1245+
6. run `cargo +nightly check`
1246+
1247+
An example port has been made [in this PR](https://github.com/clap-rs/clap/pull/3719) as
1248+
a "real-life" guide.
12181249

12191250
### The `workspace.package` table
12201251

0 commit comments

Comments
 (0)