Skip to content

Commit

Permalink
fix(stackable-versioned): Generate Kubernetes code independent of con…
Browse files Browse the repository at this point in the history
…tainer order (#913)

* fix(stackable-versioned): Generate Kubernetes code independent of container order

* chore: Update changelog

* chore: Remove superfluous iter() calls
  • Loading branch information
Techassi authored Nov 27, 2024
1 parent 5b152c7 commit 3e5b3ba
Showing 7 changed files with 157 additions and 225 deletions.
11 changes: 9 additions & 2 deletions crates/stackable-versioned-macros/fixtures/inputs/k8s/module.rs
Original file line number Diff line number Diff line change
@@ -5,6 +5,12 @@
)]
// ---
pub(crate) mod versioned {
// This struct is placed before the FooSpec one to ensure that the Kubernetes code generation
// works no matter the order.
pub struct Baz {
boom: Option<u16>,
}

#[versioned(k8s(group = "foo.example.org", plural = "foos", namespaced))]
pub struct FooSpec {
bar: usize,
@@ -21,7 +27,8 @@ pub(crate) mod versioned {
baz: String,
}

pub struct Baz {
boom: Option<u16>,
pub enum Boom {
Big,
Shaq,
}
}
Original file line number Diff line number Diff line change
@@ -6,6 +6,12 @@
)]
// ---
pub(crate) mod versioned {
// This struct is placed before the FooSpec one to ensure that the Kubernetes code generation
// works no matter the order.
pub struct Baz {
boom: Option<u16>,
}

#[versioned(k8s(group = "foo.example.org", plural = "foos", namespaced))]
pub struct FooSpec {
bar: usize,
@@ -22,7 +28,8 @@ pub(crate) mod versioned {
baz: String,
}

pub struct Baz {
boom: Option<u16>,
pub enum Boom {
Big,
Shaq,
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3e5b3ba

Please sign in to comment.