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

Frequent dependency failures - substrate, polkadot, and subxt dependency mismatches #1053

Open
drahnr opened this issue Jul 7, 2023 · 8 comments

Comments

@drahnr
Copy link

drahnr commented Jul 7, 2023

We are building a CLI tool with subxt, but try to keep everything in a single workspace. This breaks frequently due to version mismatches of i.e. wasmtime and causes more friction than needed. We are not particularly keen on splitting the workspace into two.

Could it be viable to have a substrate/polkadot branch in subxt to be released in lockstep with the substrate versions that are used in polkadot?

Pretty sure this is the wrong place to file, but technically it'd need to be in all 3 repositories

@drahnr drahnr changed the title Frequent version mismatches between substrate, polkadot, and subxt Frequent dependency failures - substrate, polkadot, and subxt dependency mismatches Jul 7, 2023
@bkchr bkchr transferred this issue from paritytech/polkadot Jul 7, 2023
@jsdw
Copy link
Collaborator

jsdw commented Jul 10, 2023

It's currently not possible to release a version of Subxt that aligns with latest Polkadot/Substrate crates since we have stopped publishing them to github. Once we have this publishing-to-github working again (@bkchr I think you were going to be helping a new hire on Mara's team with this), we'll either strive to stay in alignment with Polkadot releases (if substrate crates are published based on polkadot release branches) or just keep fairly uptodate (if Substrate crates are published on some regular cadence independently of Polkadot releases).

That said, Subxt can be used entirely independently of Substrate too if you disable the substrate-compat feature. You can use the provided subxt-signer to sign transactions, which is the main thing that substrate-compat provides. This would avoid any dependency conflicts with Substrate crates.

@jsdw
Copy link
Collaborator

jsdw commented Jul 10, 2023

(probably at some point substrate-compat will become "opt-in" instead of "opt-out" now, especially because it's been tricky to maintain any sort of sensible alignment with the versions of substrate crates that people are using elsewhere)

@jsdw
Copy link
Collaborator

jsdw commented Jul 19, 2023

See #1077; We'll aim to remove this flag because, while it can be useful, it's more a hinderence than a help nowadays for most cases I think.

@drahnr did removing this feature flag solve your case?

@drahnr
Copy link
Author

drahnr commented Jul 19, 2023

The problem is much larger than substrate-compat unfortunately.

@jsdw
Copy link
Collaborator

jsdw commented Jul 19, 2023

Ah, sorry to hear that! Is there anything I can help with from the Subxt side at all?

@drahnr
Copy link
Author

drahnr commented Jul 19, 2023

Lockstep releases and lockstep branching with polkadot releases would be a dream.

@jsdw
Copy link
Collaborator

jsdw commented Jul 19, 2023

For that, we can't really do anything until Substrate crates are being released again.

What issues did you encounter when disabling the "substrate-compat" feature flag? Doing this removes any ties to the Substrate crates and so Subxt should be able to coexist quite peacefully in a workspace with Substrate crates with this.

subxt-signer is a fairly new crate that we have released which can potentially replace sp_core et al for signing things (which was the only thing Substrate crates were needed for before).

@niklasad1
Copy link
Member

subxt is now independent of substrate/polkadot-sdk after we removed the substrate-compat feature and the only polkadot-sdk dependency subxt has is sp-crypto-hashing which is just a hashing library.

So, subxt should really work with any version polkadot-sdk i.e, from crates.io/git or whatever you like..

I guess it's technically possible to have dependency mismatches within the "subxt macro" because it depends sp-executor if --feature runtime-metadata-path is enabled but otherwise I expect it work but maybe I'm missing something?

I think and hope that that this isn't any issue anymore.

Can you please double-check and let us know?

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