Skip to content

Fixes build with default-features = false - #20

Open
pravic wants to merge 3 commits into
jmgilman:masterfrom
pravic:fix-default-features-false
Open

Fixes build with default-features = false#20
pravic wants to merge 3 commits into
jmgilman:masterfrom
pravic:fix-default-features-false

Conversation

@pravic

@pravic pravic commented Nov 11, 2024

Copy link
Copy Markdown

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
Copy Markdown
Collaborator

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

@pravic

pravic commented Nov 12, 2024

Copy link
Copy Markdown
Author

@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

stormshield-gt commented Nov 12, 2024

Copy link
Copy Markdown
Collaborator

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

@pravic

pravic commented Nov 12, 2024

Copy link
Copy Markdown
Author

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

Comment thread .github/workflows/ci.yml
@pravic

pravic commented Nov 12, 2024

Copy link
Copy Markdown
Author

@stormshield-gt

Copy link
Copy Markdown
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