Comments (4)
Seems a compile --force
is not the same as a first compilation, neither is clearing the _build
folder. The error raised on the first compilation lead me to the issue; so thanks for the reproduction steps on a clean Phoenix project.
== Compilation error in file lib/example_web/components/layouts.ex ==
** (RuntimeError) Elixir.Routex.Extension.VerifiedRoutes: Could not find a route definition matching ["images", "logo.svg"]
Fixed in 2e28451
Released a4!
from routex.
Thanks for investing time to test this still early phase lib!
Have seen this during development and had my own little backdoor for troubleshooting. New version alpha3 made it public. Please let me know what you get with the debugging flag set.
https://hexdocs.pm/routex/troubleshooting.html
from routex.
Here's the output:
Compiling 15 files (.ex)
Completed: ExampleWeb.RoutexBackend ⇒ Routex.Extension.Alternatives.configure/2
Completed: ExampleWeb.RoutexBackend ⇒ Routex.Extension.Translations.configure/2
Start: Processing routes with Routex.Processing
Executing: ExampleWeb.RoutexBackend ⇒ Routex.Extension.VerifiedRoutes.configure/2warning:
!! Routex processing is wrapped in a task for debugging purposes. Compilation will fail !!
(routex 0.1.0-alpha.3) lib/routex/processing.ex:51: Routex.Processing.__before_compile__/1
(elixir 1.14.0) src/elixir_module.erl:399: anonymous fn/6 in :elixir_module.expand_callback/6
(elixir 1.14.0) src/elixir_module.erl:398: :elixir_module.expand_callback/6
(stdlib 4.0.1) lists.erl:1350: :lists.foldl/3
(elixir 1.14.0) src/elixir_module.erl:382: :elixir_module.eval_form/6
(elixir 1.14.0) src/elixir_module.erl:105: :elixir_module.compile/5
Completed: ExampleWeb.RoutexBackend ⇒ Routex.Extension.VerifiedRoutes.configure/2
12:05:59.554 [info]
The default sigil used by Phoenix Verified Routes is overridden by Routex due to the configuration in `ExampleWeb.RoutexBackend`.
~p: localizes and verifies routes. (override)
~o: only verifies routes. (original)
Documentation: https://hexdocs.pm/routex/extensions/verified_routes.html
12:05:59.580 [error] Task #PID<0.310.0> started from #PID<0.287.0> terminating
** (ArgumentError) could not load module ExampleWeb.RoutexBackend due to reason :nofile
(elixir 1.14.0) lib/code.ex:1562: Code.ensure_loaded!/1
(routex 0.1.0-alpha.3) lib/routex/processing.ex:136: Routex.Processing.transform_routes/3
(routex 0.1.0-alpha.3) lib/routex/processing.ex:76: anonymous fn/3 in Routex.Processing.execute_callbacks/1
(stdlib 4.0.1) maps.erl:411: :maps.fold_1/3
(routex 0.1.0-alpha.3) lib/routex/processing.ex:75: Routex.Processing.execute_callbacks/1
(elixir 1.14.0) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2
(elixir 1.14.0) lib/task/supervised.ex:34: Task.Supervised.reply/4
(stdlib 4.0.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Function: #Function<0.72679254/0 in Routex.Processing.__before_compile__/1>
Args: []
== Compilation error in file lib/example_web/router.ex ==
** (exit) an exception was raised:
** (ArgumentError) could not load module ExampleWeb.RoutexBackend due to reason :nofile
(elixir 1.14.0) lib/code.ex:1562: Code.ensure_loaded!/1
(routex 0.1.0-alpha.3) lib/routex/processing.ex:136: Routex.Processing.transform_routes/3
(routex 0.1.0-alpha.3) lib/routex/processing.ex:76: anonymous fn/3 in Routex.Processing.execute_callbacks/1
(stdlib 4.0.1) maps.erl:411: :maps.fold_1/3
(routex 0.1.0-alpha.3) lib/routex/processing.ex:75: Routex.Processing.execute_callbacks/1
(elixir 1.14.0) lib/task/supervised.ex:89: Task.Supervised.invoke_mfa/2
(elixir 1.14.0) lib/task/supervised.ex:34: Task.Supervised.reply/4
(stdlib 4.0.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
Have seen this during development
In fact, if I remove the preprocess_using
macro, compile and then later add it back it works.
from routex.
Adding it to a clean project was the step before trying to add it to a larger project. Will report back if I bump into anything.
== Compilation error in file lib/example_web/components/layouts.ex ==
** (RuntimeError) Elixir.Routex.Extension.VerifiedRoutes: Could not find a route definition matching ["images", "logo.svg"]
I was also getting that, as well as one for ~p"/assets/app.css"
when doing the compilation trick by adding preprocess_using
as a subsequent change. All fixed with the last release.
from routex.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from routex.