Remix.run Logo
mst 15 hours ago

Circular dependencies almost always end up causing trouble *eventually* because the body of one of the modules involved has to be evaluated first (when the other participants in the cycle aren't a fully operational battlestation yet).

I've used p3rl.org/circular::require on perl projects before now to root out such dependencies and kill them with fire, and "figure out how to get equivalent technology in TS/JS codebases" is on my list of things to do.

Fundamentally, a circular dependency that currently (apparently) "works everywhere" should still be treated as an unexploded footbomb.

Excising them can absolutely be annoying and inconvenient, but IME not nearly as much as having the damn thing go off when a future maintainer makes an innocuous change an indeterminate amount of time later.

tl;dr: HUMBUG (and sorry I don't have a better answer yet)