Skip to content

Commit 5854505

Browse files
committed
chore: Add explanation comment
1 parent 9147d0b commit 5854505

File tree

1 file changed

+4
-1
lines changed
  • crates/stackable-versioned-macros/src/codegen

1 file changed

+4
-1
lines changed

crates/stackable-versioned-macros/src/codegen/module.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ impl Module {
4141
return quote! {};
4242
}
4343

44-
// TODO (@Techassi): Leave comment explaining this
44+
// If the 'preserve_module' flag is provided by the user, we need to change the visibility
45+
// of version modules (eg. 'v1alpha1') to be public, so that they are accessible inside the
46+
// preserved (wrapping) module. Otherwise, we can inherit the visibility from the module
47+
// which will be erased.
4548
let version_module_vis = if self.preserve_module {
4649
&Visibility::Public(Pub::default())
4750
} else {

0 commit comments

Comments
 (0)