Closed Techassi closed 1 month ago
Seems like we currently cannot use the heck
crate for case conversions: https://github.com/withoutboats/heck/issues/58.
The generated code now looks like this:
#[versioned(
version(name = "v1alpha1"),
version(name = "v1beta1"),
version(name = "v1"),
version(name = "v2"),
version(name = "v3")
)]
struct Foo {
/// My docs
#[versioned(
added(since = "v1alpha1"),
renamed(since = "v1beta1", from = "jjj"),
deprecated(since = "v2", note = "not empty")
)]
deprecated_bar: usize,
baz: bool,
}
// Produces ...
#[automatically_derived]
pub mod foo {
pub struct V1Alpha1 {
pub jjj: usize,
pub baz: bool,
}
pub struct V1Beta1 {
pub bar: usize,
pub baz: bool,
}
pub struct V1 {
pub bar: usize,
pub baz: bool,
}
pub struct V2 {
#[deprecated = "not empty"]
pub deprecated_bar: usize,
pub baz: bool,
}
pub struct V3 {
// Missing deprecated attribute will be fixed
pub deprecated_bar: usize,
pub baz: bool,
}
}
pub type Foo = foo::V3;
I guess we should also take https://github.com/stackabletech/operator-rs/pull/793#issuecomment-2129232150 into consideration
Putting this PR on hold for now, as some more discussion is happening over at #793.
A decision in #793 was reached. We will stick with the current naming scheme and thus this PR will be closed.
Description
Tracked by https://github.com/stackabletech/issues/issues/507, follow-up of #764 and #793