Skip to content

Commit b262bde

Browse files
feat(stackable-versioned): Add K8s specific features (#857)
* chore: Add changelog entry * chore: Update PR link in changelog * chore: Fix markdownlint error * feat: Add support for CustomResource derive * chore: Move CRD test case to run via trybuild * chore(ci): Add cargo-udeps ignore * fix(docs): Repair doc comment reference * chore: Apply suggestions Co-authored-by: Nick <[email protected]> * fix(docs): Use struct@ to fix rustdoc errors * chore: Bump syn to 2.0.77 * test: Move K8s specific tests into own folder * test: Adjust test modules, add negative K8s specific test * chore: Add comment to cargo-udeps ignore items * Update crates/stackable-versioned-macros/Cargo.toml Co-authored-by: Nick <[email protected]> * chore: Remove trailing whitespace --------- Co-authored-by: Nick <[email protected]>
1 parent 04f3b11 commit b262bde

28 files changed

+505
-191
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ signature = "2.2.0"
5858
snafu = "0.8.4"
5959
stackable-operator-derive = { path = "stackable-operator-derive" }
6060
strum = { version = "0.26.3", features = ["derive"] }
61-
syn = "2.0.72"
61+
syn = "2.0.77"
6262
tempfile = "3.11.0"
6363
time = { version = "0.3.36" }
6464
tokio = { version = "1.39.2", features = ["macros", "rt-multi-thread", "fs"] }

crates/stackable-versioned-macros/Cargo.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,37 @@ license.workspace = true
66
edition.workspace = true
77
repository.workspace = true
88

9+
# cargo-udeps throws an error that these dependencies are unused. They are,
10+
# however, used in K8s specific test cases. This is a false-positive and an
11+
# apparent limitation of cargo-udeps. These entries can be removed once
12+
# cargo-udeps supports detecting usage of such dependencies.
13+
[package.metadata.cargo-udeps.ignore]
14+
development = ["schemars", "serde_yaml"]
15+
916
[lib]
1017
proc-macro = true
1118

19+
[features]
20+
full = ["k8s"]
21+
k8s = ["dep:kube", "dep:k8s-openapi"]
22+
1223
[dependencies]
1324
k8s-version = { path = "../k8s-version", features = ["darling"] }
1425

1526
convert_case.workspace = true
1627
darling.workspace = true
1728
itertools.workspace = true
29+
k8s-openapi = { workspace = true, optional = true }
30+
kube = { workspace = true, optional = true }
1831
proc-macro2.workspace = true
1932
strum.workspace = true
2033
syn.workspace = true
2134
quote.workspace = true
2235

2336
[dev-dependencies]
2437
rstest.workspace = true
38+
schemars.workspace = true
39+
serde.workspace = true
40+
serde_json.workspace = true
41+
serde_yaml.workspace = true
2542
trybuild.workspace = true

0 commit comments

Comments
 (0)