Skip to content

Verified routes feature is pathological in terms of compile-connected cycles. #6522

@a3kov

Description

@a3kov

Any module using verified routes creates compile-time dependency on the router. Unfortunately this is pathological in terms of creating compile-connected cycles if you are using verified routes heavily in your project - it is very easy to arrive at a situation where a big chunk of your project is compile-connected.
One way to solve this would be a kill switch that developers would use to enable the checks and to create the compile-time dependency on the router only in certain mix environments. This way we would be able to postpone the checks for CI & production releases - your CI certainly does not care about cycles (as long as it can be compiled). Receiving late feedback on a broken link is not perfect, but we would still be able to catch the error.
Unfortunately the whole feature was not designed with dependency cycles in mind - it even suggests to refer to the router using a module attribute, which automatically creates compile-time dependency on the router too. So even to provide the said kill switch is not so easy. I think this feature needs a major redesign with this issue in mind.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions