akira / exq_ui

UI Dashboard for Exq, a job processing library for Elixir. Exq UI provides the UI dashboard to display stats on job processing.
Other
154 stars 73 forks source link

Compilation warning after Elixir 1.14 update #139

Closed williamweckl closed 1 year ago

williamweckl commented 1 year ago

At my CI process I use the instruction --warnings-as-errors at the mix compile command to avoid some common code mistakes.

After updating to Elixir 1.14.x, I am receiving a new warning at my router file, at the line that adds EXQ UI (live_exq_ui macro function). The warning happens because of the line https://github.com/akira/exq_ui/blob/master/lib/exq_ui_web/router.ex#L32 from ExqUIWeb.Router.

I don't know the exact version of Elixir that implemented this change because I have updated from 1.13.4 to 1.14.3.

To solve the issue, I can of course disable the --warnings-as-errors at my CI, but I really don´t want to do that. I think that fixing the warning at EXQ UI is a better option.

Since live_exq_ui is a macro, I totally agree with the warning message... We should use compile_env instead of get_env.