Skip to content

Commit 3857d21

Browse files
Techassisbernauer
andauthored
feat(stackable-versioned): Add 'use super::*' to generated version module (#859)
* feat(stackable-versioned): Add 'use super::*' to generated version modules Co-authored-by: Sebastian Bernauer <[email protected]> * chore: Update PR link in changelog --------- Co-authored-by: Sebastian Bernauer <[email protected]>
1 parent d4936e6 commit 3857d21

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

Diff for: crates/stackable-versioned-macros/src/codegen/venum/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ impl VersionedEnum {
150150
#[automatically_derived]
151151
#deprecated_attr
152152
#visibility mod #version_ident {
153+
use super::*;
154+
153155
#(#original_attributes)*
154156
#version_specific_docs
155157
pub enum #enum_name {

Diff for: crates/stackable-versioned-macros/src/codegen/vstruct/mod.rs

+2
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ impl VersionedStruct {
150150
#[automatically_derived]
151151
#deprecated_attr
152152
#visibility mod #version_ident {
153+
use super::*;
154+
153155
#(#original_attributes)*
154156
#version_specific_docs
155157
pub struct #struct_name {

Diff for: crates/stackable-versioned/CHANGELOG.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ All notable changes to this project will be documented in this file.
1010
- Pass through container and item attributes (including doc-comments). Add
1111
attribute for version specific docs ([#847]).
1212
- Forward container visibility to generated modules ([#850]).
13+
- Add `use super::*` to version modules to be able to use imported types
14+
([#859]).
1315

1416
### Changed
1517

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

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

2426
[#842]: https://github.com/stackabletech/operator-rs/pull/842
2527
[#844]: https://github.com/stackabletech/operator-rs/pull/844
2628
[#847]: https://github.com/stackabletech/operator-rs/pull/847
2729
[#850]: https://github.com/stackabletech/operator-rs/pull/850
30+
[#859]: https://github.com/stackabletech/operator-rs/pull/859
2831

2932
## [0.1.1] - 2024-07-10
3033

0 commit comments

Comments
 (0)