-
Notifications
You must be signed in to change notification settings - Fork 443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workspace dependencies and properties #1835
Conversation
classically we are struggling with bkchr/proc-macro-crate#34 |
crates/engine/Cargo.toml
Outdated
|
||
[dependencies] | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can define this alias on the workspace level and use here scale = { workspace = true }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check my comment: #1835 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, package
is ignored when workspace
is present
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems authors
are the same, maybe we can use workspace
too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, maybe you forgot to push or maybe I'm reviewing too earlier=D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, that's the case, sorry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pushed
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leaving the old version then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you merge master
please? Sorry, we added some conflicts to you
crates/engine/Cargo.toml
Outdated
|
||
[dependencies] | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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) |
@@ -1,25 +1,25 @@ | |||
[package] | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing all comments, much easier to review=)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these two not fixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for spotting: #1856
closes: #1814
Notes:
default-features = false
in workspace (workspaces.dependencies causes ignore of default-features = false in crate rust-lang/cargo#11329)scale
(alias forparity-scale-codec
) was left in everyCargo.toml
due to: Does not support workspace inheriting bkchr/proc-macro-crate#34; solved similarly tosubxt
andpolkadot-introspector
repositories