Support `private` modules
Opened this issue · 2 comments
jmackie commented
A module marked as private
can only be imported by other modules in the same package.
private module Implementation.Details exports (..);
The implementation should be fairly straightforward - we just need to check during build planning whether a module imported from a different package is private: true
(and raise an error if it is):
Relevant bit of the build planning logic is here:
ditto/crates/ditto-make/src/build_ninja.rs
Lines 305 to 337 in 8c3b1c9
The ditto_ast::Module
type will also need a private: bool
field adding:
ditto/crates/ditto-ast/src/module.rs
Line 9 in 8c3b1c9
ritikBhandari commented
Hi,
Can I take up this issue if possible?
jmackie commented
Hi, Can I take up this issue if possible?
Sure thing 🙏