Skip to content

Transitively re-export dependencies for crd derive #228

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

Closed
wants to merge 1 commit into from

Conversation

semtexzv
Copy link

For #227 .

Copy link
Member

@clux clux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comments

@@ -238,7 +238,7 @@ impl CustomDerive for CustomResource {
let has_status = status.is_some();

let root_obj = quote! {
#[derive(Serialize, Deserialize, Clone, Debug)]
#[derive(kube::serde::Serialize, kube::serde::Deserialize, Clone, Debug)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. This would make using kube_derive without kube impossible. I'd rather make serde_json an explicit dependency of kube-derive and re-export from there.

@@ -48,6 +49,7 @@ features = []
default = ["native-tls"]
native-tls = ["openssl", "reqwest/native-tls"]
rustls-tls = ["rustls", "reqwest/rustls-tls"]
derive = ["kube-derive"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a nice way to publish crates that depend on in-source crates, and would need a lot of scripts to hack around this.

While, this might be possible, it also introduces confusion because both crates expose a CustomResource symbol. in kube: the manual CRD creator, in kube-derive: the automatic proc_macro.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I'd say that the naming of trait being CustomResource is correct. And would probably name the CustomResource struct a ResourceDescriptor or something similar.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that is fair. The duplicate naming is a bit confusing, and will try to update the names soon. Sorry for keeping this in the queue for now.

I appreciate the PR and will likely merge this at some point, it does require writing some better release scripts because of the within-repo crate dependency. So will wait until I have time to write that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is actually now done in master.

@clux
Copy link
Member

clux commented Dec 25, 2020

Closing as per #227 (comment)

@clux clux closed this Dec 25, 2020
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