-
-
Notifications
You must be signed in to change notification settings - Fork 342
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
Conversation
There was a problem hiding this 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)] |
There was a problem hiding this comment.
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"] |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Closing as per #227 (comment) |
For #227 .