You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussion with @Techassi, we should warn/error if the visibility of the inner module doesn't match the outer module.
The inner module ends up with the same visibility as the parent anyway, but it is confusing if it is not the same.
#[versioned(version(name = "v1alpha1"))]pubmod versioned {// contents of this mod get merged with the generated `v1alpha` mod.// nothing unusual here, pub all the waypubmod v1alpha1 {pubuse v1alpha1_impl::Error;}}
Is equivalent to:
#[versioned(version(name = "v1alpha1"))]pubmod versioned {// contents of this mod get merged with the generated `v1alpha` mod, // with `pub` visibility (because of `pub mod versioned`).// 👇mod v1alpha1 {pubuse v1alpha1_impl::Error;}}
However, it appears confusing to the reader. Eg:
How can the pub use be of any use inside a private mod?
... with the answer being oh, the mod is actually pub mod because of pub mod versioned which leads to pub mod v1alpha being generated, which absorbs the contents of the mod v1alpha1 that you see in the source.
The text was updated successfully, but these errors were encountered:
NickLarsenNZ
changed the title
stackable-versioned: Require inner module definitions to have the same vis8ibility as the parent
stackable-versioned: Require inner module definitions to have the same visibility as the parent
May 8, 2025
Uh oh!
There was an error while loading. Please reload this page.
As discussion with @Techassi, we should warn/error if the visibility of the inner module doesn't match the outer module.
The inner module ends up with the same visibility as the parent anyway, but it is confusing if it is not the same.
Is equivalent to:
However, it appears confusing to the reader. Eg:
How can the
pub use
be of any use inside a privatemod
?... with the answer being oh, the
mod
is actuallypub mod
because ofpub mod versioned
which leads topub mod v1alpha
being generated, which absorbs the contents of themod v1alpha1
that you see in the source.The text was updated successfully, but these errors were encountered: