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

Introduce path prefix for generated ::subxt code #655

Closed
cmichi opened this issue Sep 20, 2022 · 1 comment · Fixed by #664
Closed

Introduce path prefix for generated ::subxt code #655

cmichi opened this issue Sep 20, 2022 · 1 comment · Fixed by #664

Comments

@cmichi
Copy link
Contributor

cmichi commented Sep 20, 2022

I'm running into a problem using subxt-codegen:

  • subxt-codegen generates code like this for certain code paths: ::subxt::tx::StaticTxPayload::new.
  • If subxt is not a root dependency of the invoking crate this results in a compiler error could not find 'subxt' in the list of imported crates.

I suggest to introduce an optional prefix which can be passed to subxt-codegen.

@jsdw
Copy link
Collaborator

jsdw commented Sep 22, 2022

That makes sense, and it's the same sort of thing other proc macro crates in the ecosystem do to tackle the issue :)

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 a pull request may close this issue.

2 participants