Skip to content

Conversation

@Techassi
Copy link
Member

Description

Tracked by stackabletech/issues#507, follow-up of #764 and #793

# Reviewer - [ ] Code contains useful comments - [ ] (Integration-)Test cases added - [ ] Documentation added or updated - [ ] Changelog updated - [ ] Cargo.toml only contains references to git tags (not specific commits or branches) 
@Techassi Techassi self-assigned this May 24, 2024
@Techassi
Copy link
Member Author

Seems like we currently cannot use the heck crate for case conversions: withoutboats/heck#58.

@Techassi Techassi marked this pull request as ready for review May 24, 2024 09:13
@Techassi
Copy link
Member Author

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;
NickLarsenNZ
NickLarsenNZ previously approved these changes May 24, 2024
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

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

LGTM

Co-authored-by: Nick <NickLarsenNZ@users.noreply.github.com>
@sbernauer
Copy link
Member

I guess we should also take #793 (comment) into consideration

@Techassi
Copy link
Member Author

Putting this PR on hold for now, as some more discussion is happening over at #793.

@Techassi
Copy link
Member Author

A decision in #793 was reached. We will stick with the current naming scheme and thus this PR will be closed.

@Techassi Techassi closed this May 28, 2024
@Techassi Techassi deleted the feat/crd-versioning-module-names branch May 28, 2024 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants