cargo-readme icon indicating copy to clipboard operation
cargo-readme copied to clipboard

Workspace inheritance breaks cargo readme

Open leighmcculloch opened this issue 2 years ago • 4 comments

Projects that use workspace inheritance, such as to replace a version in a crate toml with version.workspace = true cause cargo readme to error with:

Error: invalid type: map, expected a string for key `package.version` at line 9 column 21

Details about workspace inheritance: https://doc.rust-lang.org/cargo/reference/workspaces.html

leighmcculloch avatar Dec 02 '22 08:12 leighmcculloch

Consider using the cargo_toml crate to parse Cargo.toml instead of doing it yourself

robertbastian avatar Aug 18 '23 08:08 robertbastian

Any progress on this Issue?

I am very interested in this issue.

yassun7010 avatar Jan 08 '24 12:01 yassun7010

I experience similar problems receiving following errors:

$cargo readme
Error: TOML parse error at line 1, column 1
  |
1 | [package]
  | ^^^^^^^^^^
invalid type: map, expected a string
$cargo readme
Error: TOML parse error at line 1, column 1
  |
1 | [workspace]
  | ^
missing field `package``

alexspa avatar Jan 19 '24 22:01 alexspa