use-ink/cargo-contract

Cargo workspace: inherit `package` fields from `workspace.package`

Closed this issue · 1 comments

Is your feature request related to a problem? Please describe.
Building with cargo contract build --manifest-path=contract/Cargo.toml fails if Cargo.toml has the following:

[package]
edition.workspace = true
version.workspace = true
authors.workspace = true
# and more from https://doc.rust-lang.org/cargo/reference/workspaces.html#the-package-table

Error message:

 [==] Building cargo project
error: failed to parse manifest at `/tmp/cargo-contract_7MeJpP/contract/Cargo.toml`

Caused by:
  error inheriting `edition` from workspace root manifest's `workspace.package.edition`

Caused by:
  `workspace.package.edition` was not defined

Describe the solution you'd like
#1358 adds support for workspace dependencies. The same approach can be used for package fields.

Describe alternatives you've considered
NA

Additional context
NA

Duplicated #1265.