Skip to content

Commit a8e1a6b

Browse files
committed
fix: Update for new version behavior
1 parent 096beb9 commit a8e1a6b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

text/3502-cargo-script.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,16 +330,16 @@ the file.
330330

331331
Inferred / defaulted manifest fields:
332332
- `package.name = <slugified file stem>`
333-
- `package.version = "0.0.0"` to [call attention to this crate being used in unexpected places](https://matklad.github.io/2021/08/22/large-rust-workspaces.html#Smaller-Tips)
334-
- This may be altered with [rust-lang/cargo#9829](https://github.com/rust-lang/cargo/issues/9829)
335-
- `package.publish = false` to avoid accidental publishes, particularly if we
336-
later add support for including them in a workspace.
337333
- `package.edition = <current>` to avoid always having to add an embedded
338334
manifest at the cost of potentially breaking scripts on rust upgrades
339335
- Warn when `edition` is unspecified. Since piped commands are run with `--quiet`, this may not show up.
340336
- Based on feedback, we might add `cargo-<edition>-edition` proxies to put in `#!` as a shorthand
341337
- Based on feedback, we can switch to "edition is required as of <future> edition"
342338

339+
Note: As of [rust-lang/cargo#123](https://github.com/rust-lang/cargo/pull/12786),
340+
when `package.version` is missing,
341+
it gets defaulted to `0.0.0` and `package.publish` gets defaulted to `false`.
342+
343343
Disallowed manifest fields:
344344
- `[workspace]`, `[lib]`, `[[bin]]`, `[[example]]`, `[[test]]`, `[[bench]]`
345345
- `package.workspace`, `package.build`, `package.links`, `package.publish`, `package.autobins`, `package.autoexamples`, `package.autotests`, `package.autobenches`

0 commit comments

Comments
 (0)