Skip to content

Commit 699807c

Browse files
authored
Update RFC 2906 to match the implementation
rust-lang/cargo#10564 changed the metadata inheritance source from `workspace` to `workspace.package`
1 parent 50b1e7a commit 699807c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

text/2906-cargo-workspace-deduplicate.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ version = { workspace = true }
180180
This directive tells Cargo that the version of `foo` is the same as the
181181
`workspace.version` directive found in the workspace manifest. This means that
182182
in addition to a new `[workspace.dependencies]` section, package metadata keys
183-
can now also be defined inside of a `[workspace]` section:
183+
can now also be defined inside of a `[workspace.package]` section:
184184

185185
```toml
186-
[workspace]
186+
[workspace.package]
187187
version = "0.25.2"
188188
```
189189

@@ -233,11 +233,11 @@ Dependencies declared in `[workspace.dependencies]` have no meaning as-is. They
233233
do not affect the build nor do they force packages to depend on those
234234
dependencies. This part comes later below.
235235

236-
The `[workspace]` section will also allow the definition of a number of keys
236+
The `[workspace.package]` section will also allow the definition of a number of keys
237237
also defined in `[package]` today, namely:
238238

239239
```toml
240-
[workspace]
240+
[workspace.package]
241241
version = "1.2.3"
242242
authors = ["Nice Folks"]
243243
description = "..."
@@ -252,11 +252,11 @@ categories = ["development-tools"]
252252
publish = false
253253
edition = "2018"
254254

255-
[workspace.badges]
255+
[workspace.package.badges]
256256
# ...
257257
```
258258

259-
Each of these keys have no meaning in a `[workspace]` table yet, but will have
259+
Each of these keys have no meaning in a `[workspace.package]` table yet, but will have
260260
meaning when they're assigned to crates internally. That part comes later though
261261
in this design! Note that the format and accepted values for these keys are the
262262
same as the `[package]` section of `Cargo.toml`.
@@ -294,7 +294,7 @@ This directive indicates that the license of `foo` is the same as
294294
`workspace.license`. If `workspace.license` isn't defined then this generates an
295295
error.
296296

297-
The following keys in `[package]` can be inherited from `[workspace]` with the
297+
The following keys in `[package]` can be inherited from `[workspace.package]` with the
298298
new `workspace = true` directive.
299299

300300
```toml
@@ -589,7 +589,7 @@ ways this could happen.
589589
## Inheriting metadata from other packages
590590

591591
One possible extension of this RFC is for metadata to not only be inheritable
592-
from the `[workspace]` table but also from other packages. For example a
592+
from the `[workspace.package]` table but also from other packages. For example a
593593
scenario seen in the wild is that some repositories have multiple "cliques" of
594594
crates which are all versioned as a unit. In this scenario one "clique" can have
595595
its version directives deduplicated with this proposal, but not multiple ones.

0 commit comments

Comments
 (0)