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

cargo check --no-default-features --features std,tungstenite results in compiler error #644

Closed
clangenb opened this issue Sep 14, 2023 · 5 comments · Fixed by #677
Closed
Assignees
Labels
F2-bug Something isn't working Q3-substantial

Comments

@clangenb
Copy link
Collaborator

clangenb commented Sep 14, 2023

Not sure if this is combination is intended to be used, but I think it should:

src/api/api_client.rs:183:51
    |
183 |         let (genesis_hash, metadata, runtime_version) = futures::future::try_join3(
    |                                                         ^^^^^^^ use of undeclared crate or module `futures`

error[E0433]: failed to resolve: use of undeclared crate or module `futures`
   --> src/api/api_client.rs:243:4
    |
243 |             futures::future::try_join(metadata_future, runtime_version_future).await?;
    |             ^^^^^^^ use of undeclared crate or module `futures`

Observed on https://github.com/scs/substrate-api-client/tree/polkadot-v0.9.42-tag-v0.14.0

@clangenb
Copy link
Collaborator Author

Ah, ok I see it needs the feature sync-api maybe this should be documented

@haerdib
Copy link
Contributor

haerdib commented Sep 14, 2023

Which features were you using?

@haerdib haerdib added the F2-bug Something isn't working label Sep 14, 2023
@clangenb
Copy link
Collaborator Author

Exactly as in the title ;)

@haerdib
Copy link
Contributor

haerdib commented Sep 14, 2023

Ah, I read everything but the title 😊

Not sure about the docs - where would you expect that? We already tried to have quite some elaborate doc in the Cargo.toml:
https://github.com/scs/substrate-api-client/blob/master/Cargo.toml.

Either way: The included features represent exactly the tungstenite-client = ["std", "tungstenite"] feature here. If this does not compile as standalone we should fix the feautre import accordingly.

Also I'd vote for having a compile error that explains what's happening and how to fix it, in case it's unavoidable to have possible feature clashes. Just like here.

@clangenb
Copy link
Collaborator Author

Alright, yeah I think now that the documentation is fine, however I do geth the above compiler error locally also with:

 cargo check --no-default-features --features tungstenite-client 

On the current master: d580975

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F2-bug Something isn't working Q3-substantial
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants