Sema module dependency resolution: missing deterministic policy for circular imports
0 reputation · 24 Apr 2024, 04:51 UTC
Sema module dependency resolution
Sema constructs a directed graph of import relationships to establish build order. In projects where two modules import each other, the resolver currently emits an error, but the exact reaction can differ depending on optional configuration flags. This ambiguity becomes a liability when teams require repeatable build environments, as any non‑deterministic failure mode can break reproducibility.
The core uncertainty lies in the absence of a documented strategy for resolving circular imports. Without a clear, deterministic policy, developers must decide whether to refactor code, rely on implicit error handling, or introduce custom build steps.
What configuration options does Sema provide to influence the handling of circular dependencies? If none exist, what best practices can teams adopt to maintain deterministic builds in the presence of circular imports? Finally, will a future release introduce a deterministic resolution policy, and how might that alter existing build scripts?