diff --git a/crates/stackable-versioned-macros/src/codegen/venum/mod.rs b/crates/stackable-versioned-macros/src/codegen/venum/mod.rs index 47744e330..a9aefb0ce 100644 --- a/crates/stackable-versioned-macros/src/codegen/venum/mod.rs +++ b/crates/stackable-versioned-macros/src/codegen/venum/mod.rs @@ -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 { diff --git a/crates/stackable-versioned-macros/src/codegen/vstruct/mod.rs b/crates/stackable-versioned-macros/src/codegen/vstruct/mod.rs index 7f5aa4e70..f4c257e56 100644 --- a/crates/stackable-versioned-macros/src/codegen/vstruct/mod.rs +++ b/crates/stackable-versioned-macros/src/codegen/vstruct/mod.rs @@ -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 { diff --git a/crates/stackable-versioned/CHANGELOG.md b/crates/stackable-versioned/CHANGELOG.md index 85d7b2360..2c8f05c38 100644 --- a/crates/stackable-versioned/CHANGELOG.md +++ b/crates/stackable-versioned/CHANGELOG.md @@ -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 + ([#859]). ### Changed @@ -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 +[#859]: https://github.com/stackabletech/operator-rs/pull/859 ## [0.1.1] - 2024-07-10