ta0kira / zeolite

Zeolite is a statically-typed, general-purpose programming language.
Apache License 2.0
18 stars 0 forks source link

`$ModuleOnly$` sources in deps are still accessible from C++ sources. #88

Closed ta0kira closed 4 years ago

ta0kira commented 4 years ago

This is because $ModuleOnly$ categories are still in the module's public namespace and public cache directory. Instead, there should be a private namespace for public $ModuleOnly$ headers. The current solution for visibility is to filter out categories from .0rp sources with $ModuleOnly$ from deps, which fails to control visibility in C++ sources.

One complication is that in testing mode (-t) the module being tested is loaded and the tests have access to $ModuleOnly$. This means that there needs to be a record of the extra namespace in compile-metadata. One solution is to split subdirs into public_subdirs and private_subdirs.

ta0kira commented 4 years ago

Note that the test added by 041495431b6d53d7241307c1b753c3382068dd9f still needs to be executed by cli-tests.sh, but only after the visibility it tests is fixed.