You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to get familiarized with bazel builds in rust by trying to build https://github.com/kube-rs/controller-rs. However, I'm running into an issue where the kube dependency does not have the right features for k8s_openapi. Not sure what I'm missing, but these are the files I added:
When I run bazel build //:main --verbose_failures --sandbox_debug I get:
error[E0433]: failed to resolve: could not find `apimachinery` in `k8s_openapi`
--> external/rules_rust~~crate~crates__kube-core-0.96.0/src/dynamic.rs:10:18
|
10 | use k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
| ^^^^^^^^^^^^ could not find `apimachinery` in `k8s_openapi`
error[E0433]: failed to resolve: could not find `apiextensions_apiserver` in `k8s_openapi`
--> external/rules_rust~~crate~crates__kube-core-0.96.0/src/crd.rs:3:18
|
3 | use k8s_openapi::apiextensions_apiserver::pkg::apis::apiextensions as apiexts;
| ^^^^^^^^^^^^^^^^^^^^^^^ could not find `apiextensions_apiserver` in `k8s_openapi`
error[E0433]: failed to resolve: could not find `api` in `k8s_openapi`
--> external/rules_rust~~crate~crates__kube-core-0.96.0/src/gvk.rs:5:19
|
5 | use k8s_openapi::{api::core::v1::ObjectReference, apimachinery::pkg::apis::meta::v1::OwnerReference};
| ^^^ could not find `api` in `k8s_openapi`
error[E0433]: failed to resolve: could not find `apimachinery` in `k8s_openapi`
--> external/rules_rust~~crate~crates__kube-core-0.96.0/src/gvk.rs:5:51
|
5 | use k8s_openapi::{api::core::v1::ObjectReference, apimachinery::pkg::apis::meta::v1::OwnerReference};
| ^^^^^^^^^^^^ could not find `apimachinery` in `k8s_openapi`
error[E0433]: failed to resolve: could not find `apimachinery` in `k8s_openapi`
--> external/rules_rust~~crate~crates__kube-core-0.96.0/src/metadata.rs:4:22
|
4 | pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::{ListMeta, ObjectMeta};
| ^^^^^^^^^^^^ could not find `apimachinery` in `k8s_openapi`
error[E0433]: failed to resolve: could not find `apimachinery` in `k8s_openapi`
--> external/rules_rust~~crate~crates__kube-core-0.96.0/src/labels.rs:3:18
|
3 | use k8s_openapi::apimachinery::pkg::apis::meta::v1::{LabelSelector, LabelSelectorRequirement};
| ^^^^^^^^^^^^ could not find `apimachinery` in `k8s_openapi`
error[E0433]: failed to resolve: could not find `apimachinery` in `k8s_openapi`
--> external/rules_rust~~crate~crates__kube-core-0.96.0/src/resource.rs:1:22
|
1 | pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
| ^^^^^^^^^^^^ could not find `apimachinery` in `k8s_openapi`
error[E0433]: failed to resolve: could not find `api` in `k8s_openapi`
--> external/rules_rust~~crate~crates__kube-core-0.96.0/src/resource.rs:3:5
|
3 | api::core::v1::ObjectReference,
| ^^^ could not find `api` in `k8s_openapi`
error[E0433]: failed to resolve: could not find `apimachinery` in `k8s_openapi`
--> external/rules_rust~~crate~crates__kube-core-0.96.0/src/resource.rs:4:5
|
4 | apimachinery::pkg::apis::meta::v1::{ManagedFieldsEntry, OwnerReference, Time},
| ^^^^^^^^^^^^ could not find `apimachinery` in `k8s_openapi`
error[E0433]: failed to resolve: could not find `api` in `k8s_openapi`
--> external/rules_rust~~crate~crates__kube-core-0.96.0/src/subresource.rs:9:22
|
9 | pub use k8s_openapi::api::autoscaling::v1::{Scale, ScaleSpec, ScaleStatus};
| ^^^ could not find `api` in `k8s_openapi`
error[E0433]: failed to resolve: could not find `api` in `k8s_openapi`
--> external/rules_rust~~crate~crates__kube-core-0.96.0/src/util.rs:8:18
|
8 | use k8s_openapi::api::apps::v1::{DaemonSet, Deployment, ReplicaSet, StatefulSet};
| ^^^ could not find `api` in `k8s_openapi`
error[E0433]: failed to resolve: could not find `apimachinery` in `k8s_openapi`
--> external/rules_rust~~crate~crates__kube-core-0.96.0/src/error_boundary.rs:5:18
|
5 | use k8s_openapi::apimachinery::pkg::apis::meta::v1::ObjectMeta;
| ^^^^^^^^^^^^ could not find `apimachinery` in `k8s_openapi`
error[E0432]: unresolved imports `super::apiexts::v1::CustomResourceDefinition`, `metadata::ListMeta`, `metadata::ObjectMeta`, `crate::metadata::ListMeta`, `crate::metadata::ObjectMeta`
--> external/rules_rust~~crate~crates__kube-core-0.96.0/src/lib.rs:32:20
|
32 | pub use metadata::{ListMeta, ObjectMeta, PartialObjectMeta, PartialObjectMetaExt, TypeMeta};
| ^^^^^^^^ ^^^^^^^^^^
|
::: external/rules_rust~~crate~crates__kube-core-0.96.0/src/crd.rs:7:9
|
7 | use super::apiexts::v1::CustomResourceDefinition as Crd;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: external/rules_rust~~crate~crates__kube-core-0.96.0/src/object.rs:4:16
|
4 | metadata::{ListMeta, ObjectMeta, TypeMeta},
| ^^^^^^^^ ^^^^^^^^^^
error[E0599]: the method `as_ref` exists for enum `Result<K, InvalidObject>`, but its trait bounds were not satisfied
--> external/rules_rust~~crate~crates__kube-core-0.96.0/src/error_boundary.rs:82:16
|
23 | pub struct InvalidObject {
| ------------------------ doesn't satisfy `InvalidObject: Sized`
...
82 | self.0.as_ref().map_or_else(|err| &err.metadata, K::meta)
| ^^^^^^ method cannot be called on `Result<K, InvalidObject>` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`{type error}: Sized`
which is required by `InvalidObject: Sized`
error[E0599]: the method `as_mut` exists for enum `Result<K, InvalidObject>`, but its trait bounds were not satisfied
--> external/rules_rust~~crate~crates__kube-core-0.96.0/src/error_boundary.rs:86:16
|
23 | pub struct InvalidObject {
| ------------------------ doesn't satisfy `InvalidObject: Sized`
...
86 | self.0.as_mut().map_or_else(|err| &mut err.metadata, K::meta_mut)
| ^^^^^^ method cannot be called on `Result<K, InvalidObject>` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`{type error}: Sized`
which is required by `InvalidObject: Sized`
error: aborting due to 15 previous errors
Some errors have detailed explanations: E0432, E0433, E0599.
For more information about an error, try `rustc --explain E0432`.
Target //:main failed to build
Do I need to add something so that kube uses the right features?
bazel: 7.4.0
rules_rust: 0.53.0
The text was updated successfully, but these errors were encountered:
I've been trying to get familiarized with bazel builds in rust by trying to build https://github.com/kube-rs/controller-rs. However, I'm running into an issue where the kube dependency does not have the right features for k8s_openapi. Not sure what I'm missing, but these are the files I added:
WORKSPACE
MODULE.bazel
BUILD
When I run bazel build //:main --verbose_failures --sandbox_debug I get:
Do I need to add something so that kube uses the right features?
bazel: 7.4.0
rules_rust: 0.53.0
The text was updated successfully, but these errors were encountered: