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

[v0.93] unresolved import crate::client #1548

Closed
HoKim98 opened this issue Jul 23, 2024 · 0 comments · Fixed by #1549
Closed

[v0.93] unresolved import crate::client #1548

HoKim98 opened this issue Jul 23, 2024 · 0 comments · Fixed by #1549
Labels
bug Something isn't working

Comments

@HoKim98
Copy link
Contributor

HoKim98 commented Jul 23, 2024

Current and expected behavior

Problem Situation

cargo build --package kube --no-default-features  # no `client` feature

Expected behavior

   Compiling kube v0.93.0 (/home/user/Library/kube/kube)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s

Current behavior

error[E0432]: unresolved import `crate::client`
   --> kube/src/lib.rs:197:46
    |
197 |     #[allow(unreachable_pub)] pub use crate::client::ConfigExt as _;
    |                                              ^^^^^^ could not find `client` in the crate root
    |
note: found an item that was configured out
   --> kube/src/lib.rs:140:26
    |
140 |     pub use kube_client::client;
    |                          ^^^^^^
    = note: the item is gated behind the `client` feature

warning: unused import: `crate::client::ConfigExt as _`
   --> kube/src/lib.rs:197:39
    |
197 |     #[allow(unreachable_pub)] pub use crate::client::ConfigExt as _;
    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unused_imports)]` on by default

For more information about this error, try `rustc --explain E0432`.
warning: `kube` (lib) generated 1 warning
error: could not compile `kube` (lib) due to 1 previous error; 1 warning emitted

Possible solution

Add #[cfg(feature = "client")] constraint on #[allow(unreachable_pub)] pub use crate::client::ConfigExt as _;

Please see #1549

Additional context

No response

Environment

  • Development Environment: Local
  • Kubernetes: N/A
  • Container: N/A
  • Source: v0.93 ~ main#5b3b73d

Configuration and features

kube = { version = "0.93", default-features = false }

Affected crates

No response

Would you like to work on fixing this bug?

yes

@HoKim98 HoKim98 added the bug Something isn't working label Jul 23, 2024
@HoKim98 HoKim98 changed the title [v0.93~] unresolved import crate::client [v0.93] unresolved import crate::client Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant