Skip to content

Commit e38161b

Browse files
committed
chore(stackable-versioned): Update status struct name to avoid collisions
1 parent 69ee88c commit e38161b

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

crates/stackable-versioned-macros/src/codegen/container/struct.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,14 @@ impl Struct {
348348
.then_some(quote! { , namespaced });
349349
let crates = kubernetes_options.crates.to_token_stream();
350350

351+
// TODO (@Techassi): This struct name should be defined once in a single place instead
352+
// of constructing it in two different places which can lead to de-synchronization.
351353
let status = kubernetes_options
352354
.config_options
353355
.experimental_conversion_tracking
354356
.then(|| {
355357
let status_ident = format_ident!(
356-
"{struct_ident}Status",
358+
"{struct_ident}StatusWithChangedValues",
357359
struct_ident = self.common.idents.kubernetes.as_ident()
358360
);
359361
quote! { , status = #status_ident }
@@ -462,7 +464,7 @@ impl Struct {
462464
.experimental_conversion_tracking
463465
.then(|| {
464466
let status_ident = format_ident!(
465-
"{struct_ident}Status",
467+
"{struct_ident}StatusWithChangedValues",
466468
struct_ident = self.common.idents.kubernetes.as_ident()
467469
);
468470

crates/stackable-versioned-macros/tests/snapshots/stackable_versioned_macros__snapshot_tests__k8s@conversion_tracking.rs.snap

Lines changed: 9 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)