An early check in the compilation process, before type-checking begins, ensures that the module
dependency graph has no cycles. However, the algorithm employed is broken, as it only goes "one level
deep", instead of building the full dependency graph: for each (sub)module, it only looks for dependency
cycles among the submodules directly imported (plus the "parent" module itself).
As a result, in a project structure like the following:
CS-FSSA-020
An early check in the compilation process, before type-checking begins, ensures that the module dependency graph has no cycles. However, the algorithm employed is broken, as it only goes "one level deep", instead of building the full dependency graph: for each (sub)module, it only looks for dependency cycles among the submodules directly imported (plus the "parent" module itself).
As a result, in a project structure like the following:
one can craft the dependency cycle main -> a -> b -> c -> a