error module-cycle
What it means#
Modules of a package may not depend on each other in a cycle (§2.1). Cycles inside one module are allowed because its files share a namespace; cycles between modules are not, because the build order and incremental caching rely on an acyclic module graph.
Example#
// src/orders/orders.oxl
use self.billing { charge } // <- module-cycle (orders -> billing -> orders)
pub fn place() { charge() }
// src/billing/billing.oxl
use self.orders { place }
pub fn charge() { }How to fix#
// src/common/common.oxl
pub fn charge() { }
// src/orders/orders.oxl
use self.common { charge }
pub fn place() { charge() }
// src/billing/billing.oxl
use self.common { charge }Move the shared declarations into a third module that both depend on, or merge the two modules into one.