kellpossible / cargo-i18n

A Rust Cargo sub-command and libraries to extract and build localization resources to embed in your application/library
MIT License
121 stars 25 forks source link

Correct handling of crate version in workspace. #118

Closed Jisu-Woniu closed 6 months ago

Jisu-Woniu commented 6 months ago

I ran cargo i18n in my project directory and got this error:

Error: Cannot parse Cargo configuration file "./Cargo.toml" because Cargo.toml's package version needs to be a string..

and my Cargo.toml is like:

[workspace]
members = [
# sub-crates
]

[workspace.package]
version = "0.1.0"
# other global configurations

[package]
version.workspace = true

As is mentioned in The Cargo Book, the version of the root crate should be inherited from the workspace.package region (in this case, 0.1.0).

Jisu-Woniu commented 6 months ago

Duplicate with #97.