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

Crates.io version fails during compilation #225

Closed
lamafab opened this issue Feb 4, 2021 · 3 comments
Closed

Crates.io version fails during compilation #225

lamafab opened this issue Feb 4, 2021 · 3 comments

Comments

@lamafab
Copy link
Contributor

lamafab commented Feb 4, 2021

Description

The crates.io version of this repository results in a compilation error. Cloning directly from this repo via git works just fine.

Reproduce

When you set Cargo.toml as this:

substrate-subxt = "0.13.0"

It results in:

error[E0277]: the trait bound `<T as frame::system::System>::Index: From<i32>` is not satisfied
  --> /home/anon/.cargo/registry/src/github.com-1ecc6299db9ec823/substrate-subxt-0.13.0/src/extrinsic/signer.rs:90:55
   |
90 |         self.nonce = self.nonce.map(|nonce| nonce + 1.into());
   |                                                       ^^^^ the trait `From<i32>` is not implemented for `<T as frame::system::System>::Index`
   |
   = note: required because of the requirements on the impl of `Into<<T as frame::system::System>::Index>` for `i32`
help: consider further restricting the associated type
   |
89 |     pub fn increment_nonce(&mut self) where <T as frame::system::System>::Index: From<i32> {
   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: could not compile `substrate-subxt`

Workaround

substrate-subxt = { version = "0.13.0", git = "https://github.com/paritytech/substrate-subxt.git" }
@niklasad1
Copy link
Member

This was fixed by https://github.com/paritytech/substrate-subxt/pull/217/files

//cc @ascjones release 0.14 with substrate 2.0.1 support? :)

@ascjones
Copy link
Contributor

ascjones commented Feb 5, 2021

#226

@ascjones
Copy link
Contributor

ascjones commented Feb 8, 2021

Released #226

@ascjones ascjones closed this as completed Feb 8, 2021
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

No branches or pull requests

3 participants