module: do not expose list of modules
Doing so would encourage accidentally creating dependency loops. Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
b4a479fb3f
commit
5dbf9ece3b
2 changed files with 20 additions and 20 deletions
|
|
@ -24,7 +24,7 @@ pub const Engine = @import("engine.zig").Engine;
|
|||
pub const ModSet = @import("module.zig").ModSet;
|
||||
|
||||
// TODO: perhaps this could be a comptime var rather than @import("root")?
|
||||
const modules = blk: {
|
||||
pub const modules = blk: {
|
||||
if (!@hasDecl(@import("root"), "modules")) {
|
||||
@compileError("expected `pub const modules = .{};` in root file");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue