Skip to content
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 released substrate dependencies #375

Merged
merged 8 commits into from
Jan 17, 2022
Merged

Use released substrate dependencies #375

merged 8 commits into from
Jan 17, 2022

Conversation

ascjones
Copy link
Contributor

@ascjones ascjones commented Dec 20, 2021

Use substrate crates from crates.io, which will allow us to do a release of this crate.

todo

  • Release sp-keyring which is still at an old version on crates.io. It's a dev dependency but it depends on sp-core and sp-runtime, so brings in conflicting versions which causes the tests to not compile.
  • Consider mapping the DispatchError from the metadata, instead of the statically defined type from sp_runtime, in case the target node has a different DispatchError definition. (in progress in Use the generated DispatchError instead of the hardcoded Substrate one #394; I don't think it needs to block this version bump PR from merging)

@@ -144,7 +141,6 @@ impl RuntimeError {
DispatchError::CannotLookup => Ok(Self::CannotLookup),
DispatchError::ConsumerRemaining => Ok(Self::ConsumerRemaining),
DispatchError::NoProviders => Ok(Self::NoProviders),
DispatchError::TooManyConsumers => Ok(Self::TooManyConsumers),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to parameterize DispatchError and allow the definition in the metadata to be used, in case of such a mismatch in the DispatchError type between the target node and the released version of sp_runtime

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working on that in #394

@ascjones ascjones mentioned this pull request Jan 7, 2022
18 tasks
@jsdw jsdw marked this pull request as ready for review January 17, 2022 13:59
Copy link
Contributor

@dvdplm dvdplm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

macro/Cargo.toml Outdated
@@ -33,5 +33,4 @@ subxt-codegen = { version = "0.2.0", path = "../codegen" }
pretty_assertions = "0.6.1"
subxt = { path = ".." }
trybuild = "1.0.38"

sp-keyring = { git = "https://github.com/paritytech/substrate/", branch = "master" }
sp-keyring = { version = "4.0.0" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sp-keyring = { version = "4.0.0" }
sp-keyring = "4.0.0"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh good point :) I'll fix both of those!

@jsdw jsdw merged commit cc0f980 into master Jan 17, 2022
@jsdw jsdw deleted the aj-substrate-deps branch January 17, 2022 14:25
0623forbidden pushed a commit to DEIPworld/substrate-subxt that referenced this pull request Feb 15, 2022
* WIP update dependencies to crates versions

* Use released versions of sp-version and sp-arithmetic

* Attempt to align version of sp-keyring used to correspond to 4.0.0 releases. No luck but closer

* sp-keyring 4.0.0

* also sp-keyring 4.0.0 for macro crate

* simplify cargo.tomls

Co-authored-by: James Wilson <james@jsdw.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants