-
Notifications
You must be signed in to change notification settings - Fork 689
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
Use workspace.dependenceis to ensure consistent versions of common crates #2065
Conversation
The CI pipeline was cancelled due to failure one of the required jobs. |
I thought I'd havea go at doing this, because it's generally worked well for us in Subxt (though the number of warnings is small and quite tolerable). I think to do it in |
Note to anybody reading this; actually |
Changes (partial #994): - Set log to `0.4.20` everywhere - Lift `log` to the workspace Starting with a simpler one after seeing #2065 from @jsdw. This sets the `default-features` to `false` in the root and then overwrites that in each create to its original value. This is necessary since otherwise the `default` features are additive and its impossible to disable them in the crate again once they are enabled in the workspace. I am using a tool to do this, so its mostly a test to see that it works as expected. --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Changes (partial paritytech#994): - Set log to `0.4.20` everywhere - Lift `log` to the workspace Starting with a simpler one after seeing paritytech#2065 from @jsdw. This sets the `default-features` to `false` in the root and then overwrites that in each create to its original value. This is necessary since otherwise the `default` features are additive and its impossible to disable them in the crate again once they are enabled in the workspace. I am using a tool to do this, so its mostly a test to see that it works as expected. --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
…ubmitted something (paritytech#2065)
…ubmitted something (paritytech#2065)
…ubmitted something (paritytech#2065)
…ubmitted something (paritytech#2065)
…ubmitted something (paritytech#2065)
…ubmitted something (paritytech#2065)
…ubmitted something (paritytech#2065)
…ubmitted something (paritytech#2065)
…ubmitted something (paritytech#2065)
…ubmitted something (paritytech#2065)
…ubmitted something (paritytech#2065)
…ubmitted something (paritytech#2065)
…ubmitted something (paritytech#2065)
…ubmitted something (paritytech#2065)
…ubmitted something (paritytech#2065)
Description
This uses the
[workspace.dependencies]
field to give some consistency over versions of common crates used all over the place and make keeping their versions in sync easier.For now, I just started with two common crates,
scale-info
andparity-scale-codec
. If this is something that's wanted, I can add some more common crates to the list, or else others can add to the list.Downsides
parity-scale-codec
is renamed tocodec
in many places. Owing to a quirk of workwspace dependencies, it must be declared in the workspace as:Owing to how the macro discovers which crate path to use, it currently needs the
package
field to be duplicated as in:This leads to a bunch of warnings. It could be fixed in
parity-scale-codec
with a bit of effort.The other thing leading to warnings is that eg
default-features = false
should be added to the workspace dependencies, else it is ignored in the use site. Fixing any fallout from that would lead to a little churn perhaps.Unknowns
Does this break the tooling to publish crates automatically, or any other CI workflows?