I have updated a phoenix application to 1.7 and started using verified routes. When the app compiles, it issues warnings that there is no route path.
warning: no route path for CogitoWeb.Router matches "/portal/configuration/system/log_storage"
lib/cogito_web/live/portal/configuration/system/log_storage.ex:58
However, it appears that the router does have the routes.
portal_configuration_log_storage_path GET /portal/configuration/system/log_storage CogitoWeb.Portal.Configuration.System.LogStorageLive :show
Furthermore, the links work, so I can’t figure out why it is issuing warnings.
Whats the scope look like cause this alone is not going to say if that matches, from this only that warning is valid.
Edit: oops sorry just mis read your comment, I see the scope now outside the code block.
Ok next try this.
mix phx.routes
Oh wait your first comment includes that?
portal_configuration_log_storage_path GET /portal/configuration/system/log_storage CogitoWeb.Portal.Configuration.System.LogStorageLive :show
This is odd to me, your ~p is a string literal so thats not likely the issue, the phx.routes show its been set. Sorry this is a hard one. Not really sure what next.
As a sanity check this is for the module CogitoWeb.Router? also maybe just try rewording the route to something like /foobarbaz just to see if you can get the warning constantly.
I’m with @polygonpusher and at a loss. My only suggestion would be to try and remove the :as as I don’t think it’s needed, though I have no idea why that would affect anything. Just a hail mary at this point. I’ve never run into something like this before. Would have to see more context of how you have stuff set up.
Have you tried deleting your _build directory and compiling it again? I ask this because I often get this warning when changing a route or updating dependencies. Here are the steps I follow when I start getting errors/warnings and everything looks like it should be working fine.
I wish I knew exactly what I did to fix this, but it it working correctly now. I updated to phoenix_live_view 18.18(doubt that fixed anything). I suspect that @wceolin is on to the situation that was causing my problem. While I did not explicitly delete the _build directory, I made enough dependency changes that may have caused the offending mod to rebuild. I know that a mix compile --force did not fix the problem.