Verified routes & compile time dependencies

I’ve noticed that verified routes incurs a bunch of compile time dependencies that I can’t figure out. I’m trying to unravel how this works, but if the router references a module that does a use MyAppWeb, :verified_routes, this causes the router to be recompiled for modules that are seemingly unrelated.

For example, the router in this project will recompile whenever TestWeb.Gettext is recompiled. If you comment out the compile time link to Test in the router, the router will no longer recompile when TestWeb.Gettext is recompiled.

I’m only using TestWeb.Gettext as an example. People probably don’t modify that module often if at all, but it’s occurring in other projects on modules that do change quite often.

Any ideas?

2 Likes

I may actually open an issue for this because it’s having pretty tangible impacts on our projects compile times.

EDIT:

I’ve opened an issue:

1 Like