Commit bd6079e
feat(stackable-versioned): Add support for modules (#891)
* chore: Add changelog entry
* chore: Update PR link in changelog
* refactor: Modularize token generation
This separates token generation code to be more
modular. Depending on the context, individual
parts of the code need to be placed in different
locations.
Two major refactors are the change of macro input
as well as moving module generation out of the
struct definition generation.
This commit doesn't include changes for enum
generation. This will be done in a separate commit.
* refactor: Use fully qualified From path
* refactor: Adjust enum generation code
* feat: Add support for modules
This commit contains a major rework of most parts of the attribute
macro to support attaching it to modules. Most of the previously
existing features are already in place. There are only two missing
features which will be added in follow-up commits: version specific
doc comments and merged CRD YAML support. Because of that, some
snapshot tests are failing.
* fix: Correctly emit automatically_derived and deprecated attributes
* fix: Skip From impls for enum if options are set
* fix: Correctly emit doc commens
* fix: Correctly emit merged_crd code
* fix: Correctly skip merged_crd generation
This also adds a test to validate that the relevant code is not
generated of the skip option is set.
* chore: Fix clippy errors
* test: Add module snapshot tests
* test: Update basic Kubernetes snapshot test
* doc: Fix doc comment links
* chore: Remove unused strum dependency
* ci(pre-commit): Update rust version and use stackabletech/actions/run-pre-commit
* fix: Correctly report missing Spec suffix
* test: Update compile-fail test cases
* chore: Update changelog
* ci(pre-commit): Add rust-src component
* ci(build): Bump Rust version
* chore: Apply suggestions
Co-authored-by: Nick <[email protected]>
* chore(test): Add comment about empty versioned attribute
* chore: Add missing doc comments for supported K8s arguments
* chore: Replace unwrap with expect
* chore: Adjust FIXME comment
* chore: Add explanation comment
* chore: Remove outdated comments
* chore: Add doc comment to validate_added_action function
* chore: Replace mustn't with must not in error message
* chore: Use concrete type instead of generic type in BTreeMapExt impl
* chore: Add doc comments
---------
Co-authored-by: Nick <[email protected]>1 parent de15662 commit bd6079e
File tree
54 files changed
+2856
-2605
lines changed- .github/workflows
- crates
- stackable-versioned-macros
- fixtures
- inputs
- default
- k8s
- snapshots
- src
- attrs
- common
- item
- codegen
- common
- container
- item
- venum
- vstruct
- tests/default/fail
- stackable-versioned
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
54 files changed
+2856
-2605
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments