Skip to content

Commit

Permalink
feat(stackable-versioned): Add 'use super::*' to generated version mo…
Browse files Browse the repository at this point in the history
…dules

Co-authored-by: Sebastian Bernauer <[email protected]>
  • Loading branch information
Techassi and sbernauer committed Sep 6, 2024
1 parent d4936e6 commit 450d49f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions crates/stackable-versioned-macros/src/codegen/venum/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ impl VersionedEnum {
#[automatically_derived]
#deprecated_attr
#visibility mod #version_ident {
use super::*;

#(#original_attributes)*
#version_specific_docs
pub enum #enum_name {
Expand Down
2 changes: 2 additions & 0 deletions crates/stackable-versioned-macros/src/codegen/vstruct/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@ impl VersionedStruct {
#[automatically_derived]
#deprecated_attr
#visibility mod #version_ident {
use super::*;

#(#original_attributes)*
#version_specific_docs
pub struct #struct_name {
Expand Down
5 changes: 4 additions & 1 deletion crates/stackable-versioned/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ All notable changes to this project will be documented in this file.
- Pass through container and item attributes (including doc-comments). Add
attribute for version specific docs ([#847]).
- Forward container visibility to generated modules ([#850]).
- Add `use super::*` to version modules to be able to use imported types
([#xxx]).

### Changed

Expand All @@ -19,12 +21,13 @@ All notable changes to this project will be documented in this file.
### Fixed

- Report variant rename validation error at the correct span and trim underscores
from variants not using PascalCase (#[842]).
from variants not using PascalCase ([#842]).

[#842]: https://github.com/stackabletech/operator-rs/pull/842
[#844]: https://github.com/stackabletech/operator-rs/pull/844
[#847]: https://github.com/stackabletech/operator-rs/pull/847
[#850]: https://github.com/stackabletech/operator-rs/pull/850
[#xxx]: https://github.com/stackabletech/operator-rs/pull/xxx

## [0.1.1] - 2024-07-10

Expand Down

0 comments on commit 450d49f

Please sign in to comment.