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

Feature openapi has hardcoded k8s-openapi's feature to v1_15 #90

Closed
divoxx opened this issue Nov 20, 2019 · 4 comments
Closed

Feature openapi has hardcoded k8s-openapi's feature to v1_15 #90

divoxx opened this issue Nov 20, 2019 · 4 comments

Comments

@divoxx
Copy link

divoxx commented Nov 20, 2019

Currently, trying to use another version of the openapi (i.e. v1_14) causes compilation to fail with the following error:

Both v1_14 and v1_15 features are enabled on the k8s-openapi crate. Only one feature can be enabled at the same time.

The feature indicates which version of Kubernetes the k8s-openapi crate should support.

If you have enabled both of these features yourself, please remove one of them. If you are writing a library crate, do not enable any features at all. Library crates *must not* enable any features on the k8s-openapi crate.

If you have not enabled one or both of these features yourself, then one of the library crates in your dependency graph *has*. Locate which library crates in your dependency graph depend on k8s-openapi and enable one of its features, and file a bug against them. You can search your Cargo.lock for "k8s-openapi" to discover these crates.

As described in k8s-openapi, libraries should not specify a version/feature. Is this feasible in this library?

@clux
Copy link
Member

clux commented Nov 20, 2019

Oh, that sounds wrong :(

Do you mind pasting how you are using kube + k8s-openapi in Cargo.toml? I thought this would't happen with default-features set to false, but maybe we need to remove the pin there.

@divoxx
Copy link
Author

divoxx commented Nov 21, 2019

Hi @clux

I was testing kube-rs in a fresh application against a 1.14 cluster, so I've added the following dependencies:

[dependencies]
kube = { version = "0.18.1", features = ["openapi"] }
k8s-openapi = { version = "0.6.0", default-features = false, features = ["v1_14"] }

Which resulted in that error. I think you need to get rid of this chunk and keep only the dev-dependencies with a hard coded version.

@clux
Copy link
Member

clux commented Nov 21, 2019

Have taken out all features by default. Think master is now better.

Thanks for the report!

@clux
Copy link
Member

clux commented Nov 21, 2019

releasing in 0.20.0

@clux clux closed this as completed Nov 21, 2019
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

No branches or pull requests

2 participants