-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange compilation error: could not load module ExampleWeb.RoutexBackend due to reason :nofile #2
Comments
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. |
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
In fact, if I remove the |
Seems a
Fixed in 2e28451 |
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.
I was also getting that, as well as one for |
mix phx.new --no-ecto example
{:routex, "~> 0.1.0-alpha.2"}
example_web.ex
androutex_backend.ex
fromroutex_example
appget "/"
inrouter.ex
inpreprocess_using ExampleWeb.RoutexBackend do
blockI get this compilation error:
I've checked the instructions from here to be sure I've not missed anything.
Couldn't reproduce the error in the
routex_example
app.The text was updated successfully, but these errors were encountered: