Workspace dependencies and properties#1835
Conversation
| classically we are struggling with bkchr/proc-macro-crate#34 |
crates/engine/Cargo.toml Outdated
| ink_primitives = { version = "4.2.0", path = "../../crates/primitives", default-features = false } | ||
| derive_more = { workspace = true, features = ["from", "display"] } | ||
| # cannot inherit due to: https://github.com/bkchr/proc-macro-crate/issues/34 | ||
| scale = { package = "parity-scale-codec", version = "3.4", default-features = false, features = ["derive"] } |
There was a problem hiding this comment.
You can define this alias on the workspace level and use here scale = { workspace = true }
There was a problem hiding this comment.
please check my comment: #1835 (comment)
There was a problem hiding this comment.
have you run the code? I have done it some time ago, but this doesn't compile: 08c1937
(macro generation phase fails)
There was a problem hiding this comment.
btw, package is ignored when workspace is present
There was a problem hiding this comment.
There was a problem hiding this comment.
I will ensure that CI works well now and if so, I will apply these changes
crates/ink/Cargo.toml Outdated
| repository.workspace = true | ||
| version.workspace = true | ||
| | ||
| authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"] |
There was a problem hiding this comment.
It seems authors are the same, maybe we can use workspace too?
There was a problem hiding this comment.
no, they are not the same across crates and I really don't want to get into authorship resolution here - I don't know what is the legal status of it
There was a problem hiding this comment.
there are 14 crates in workspace, only 3 of them have this basic authorship; the rest that you have grepped are in integration-tests; nevertheless, suggestion applied
There was a problem hiding this comment.
Hmm, maybe you forgot to push or maybe I'm reviewing too earlier=D
There was a problem hiding this comment.
yes, that's the case, sorry
crates/ink/Cargo.toml Outdated
| ink_prelude = { version = "4.2.0", path = "../prelude", default-features = false } | ||
| ink_macro = { version = "4.2.0", path = "macro", default-features = false } | ||
| | ||
| derive_more = { workspace = true, features = ["from"] } |
There was a problem hiding this comment.
Could you keep the order the same for now, please? Let's change it in a separate PR. We can use cargo-sort and include it in our CI
There was a problem hiding this comment.
all done in-place
crates/ink/codegen/Cargo.toml Outdated
| | ||
| serde = { version = "1.0.137", default-features = false, features = ["derive"] } | ||
| serde_json = "1.0.81" | ||
| ink_ir = { workspace = true } |
There was a problem hiding this comment.
I think returning the alias ir back, for now, is better to avoid conflicts. Later we can change that in a separate PR
There was a problem hiding this comment.
leaving the old version then
xgreenx left a comment
There was a problem hiding this comment.
Could you merge master please? Sorry, we added some conflicts to you
crates/engine/Cargo.toml Outdated
| ink_primitives = { version = "4.2.0", path = "../../crates/primitives", default-features = false } | ||
| derive_more = { workspace = true, features = ["from", "display"] } | ||
| # cannot inherit due to: https://github.com/bkchr/proc-macro-crate/issues/34 | ||
| scale = { package = "parity-scale-codec", version = "3.4", default-features = false, features = ["derive"] } |
There was a problem hiding this comment.
crates/ink/Cargo.toml Outdated
| repository.workspace = true | ||
| version.workspace = true | ||
| | ||
| authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"] |
There was a problem hiding this comment.
Hmm, maybe you forgot to push or maybe I'm reviewing too earlier=D
| @xgreenx I'm force pushing to have a cleaner start - lmk if the only outstanding issues are with |
574f5f2 to 370d82b Compare | it seems that the incorrect remedy for bkchr/proc-macro-crate#34 is to add the cost is the list of warnings during compilation |
| @SkymanOne it's the thing described here: #1835 (comment) |
| name = "ink_allocator" | ||
| version = "4.2.0" | ||
| version.workspace = true | ||
| authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"] |
There was a problem hiding this comment.
See discussion above. @Robbepop is the original author of some of the crates so those ones will remain not inhherited, and the rest inherit the default.
xgreenx left a comment
There was a problem hiding this comment.
Thank you for addressing all comments, much easier to review=)
ascjones left a comment
There was a problem hiding this comment.
LGTM, Sorry I just merged some dependency bumps so you will need to resolve those conflicts then we can merge.
# Conflicts: # crates/e2e/Cargo.toml # crates/e2e/macro/Cargo.toml # crates/metadata/Cargo.toml
| @ascjones it should be now ready to go :) |
| ink_env = { version = "4.2.0", path = "crates/env", default-features = false } | ||
| ink_ir = { version = "4.2.0", path = "crates/ink/ir", default-features = false } |



closes: #1814
Notes:
default-features = falsein workspace (workspaces.dependencies causes ignore of default-features = false in crate rust-lang/cargo#11329)scale(alias forparity-scale-codec) was left in everyCargo.tomldue to: Does not support workspace inheriting bkchr/proc-macro-crate#34; solved similarly tosubxtandpolkadot-introspectorrepositories