This is a follow-up on a post ( Using extensions in modules ) when I thought there is a bug in the module system.
The point is that a module should be self-contained.
So, if it relies on some extensions, it should declare so explicitly.
In example models Discrete Event Mousetrap and Distribution Center Discrete Event Simulator, the imported module says “the main file that includes this one must have both the csv and time extensions”.
This puts the burden on the programmer of the model.
Instead, I think NetLogo should check this kind of dependencies.
So, I understand that technically the main model file must declare any extensions it relies on, even if indirectly through imported modules.
Therefore, I propose that any extensions used by a module should be declared as well in the importing model file.
If a module declares an extension, but the importing model does not, NetLogo should flag this as an error.
In this solution, the module still declares its dependencies formally, but NetLogo checks that these dependencies are fulfilled.
Please, implement a mechanism like this and change the example models accordingly.