Support `private` modules
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:
https://github.com/ditto-lang/ditto/blob/8c3b1c900fb35c49c0f77b99c55cf1bc450763bf/crates/ditto-make/src/build_ninja.rs#L305-L337
The ditto_ast::Module type will also need a private: bool field adding:
https://github.com/ditto-lang/ditto/blob/8c3b1c900fb35c49c0f77b99c55cf1bc450763bf/crates/ditto-ast/src/module.rs#L9
Hi, Can I take up this issue if possible?
Hi, Can I take up this issue if possible?
Sure thing 🙏