Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(stackable-versioned): Add 'use super::*' to generated version module #859

Merged
merged 2 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
([#859]).

### 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
[#859]: https://github.com/stackabletech/operator-rs/pull/859

## [0.1.1] - 2024-07-10

Expand Down
Loading