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

Fixes build with default-features = false #20

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pravic
Copy link

@pravic pravic commented Nov 11, 2024

If you try to build this crate with default-features = false, you get this:

error[E0432]: unresolved import `crate::clients::reqwest`
   --> src/lib.rs:238:14
    |
238 |     clients::reqwest::Client,
    |              ^^^^^^^ could not find `reqwest` in `clients`
    |
note: found an item that was configured out
   --> src/clients.rs:4:9
    |
4   | pub mod reqwest;
    |         ^^^^^^^
note: the item is gated behind the `reqwest` feature
   --> src/clients.rs:3:7
    |
3   | #[cfg(feature = "reqwest")]
    |       ^^^^^^^^^^^^^^^^^^^

error[E0433]: failed to resolve: use of undeclared crate or module `reqwest`
  --> src/errors.rs:28:33
   |
28 |     ReqwestBuildError { source: reqwest::Error },
   |                                 ^^^^^^^ use of undeclared crate or module `reqwest`

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `rustify` (lib) due to 2 previous errors

@stormshield-gt
Copy link
Collaborator

Thanks for fixing this, do you mind adding a CI job to ensure this won't happen again?

@pravic
Copy link
Author

pravic commented Nov 12, 2024

@stormshield-gt I am not sure how to verify this using CI.

If we create another crate inside this repository which references the rustify with default-features = false, this might work. But do you want another crate in the repo? And if yes, then where? /examples? /tests?

@stormshield-gt
Copy link
Collaborator

stormshield-gt commented Nov 12, 2024

I think a cargo clippy --no-default-features should be sufficient

@pravic
Copy link
Author

pravic commented Nov 12, 2024

@stormshield-gt Done. Approve to run the check.

@stormshield-gt
Copy link
Collaborator

You can rebase on master, #24 should have fix the CI

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.

2 participants