phoenixframework / phoenix

Peace of mind from prototype to production
https://www.phoenixframework.org
MIT License
21.3k stars 2.87k forks source link

warning about gettext on newly generated project #5251

Closed epinault closed 1 year ago

epinault commented 1 year ago

Environment

Expected behavior

I just installed Phoenix 1.7 rc2 with elixir 1.14.0

I generated a new project using

mix phx.new test

and when running the following

mix. phx.server 

I should get no warnings. Instead I get bunch of warning see actual behavior

Actual behavior

mix phx.server
warning: the :gettext compiler is no longer required in your mix.exs.

Please find the following line in your mix.exs and remove the :gettext entry:

    compilers: [..., :gettext, ...] ++ Mix.compilers(),

  (gettext 0.22.0) lib/mix/tasks/compile.gettext.ex:5: Mix.Tasks.Compile.Gettext.run/1
  (mix 1.13.4) lib/mix/task.ex:397: anonymous fn/3 in Mix.Task.run_task/3
  (mix 1.13.4) lib/mix/tasks/compile.all.ex:92: Mix.Tasks.Compile.All.run_compiler/2
  (mix 1.13.4) lib/mix/tasks/compile.all.ex:72: Mix.Tasks.Compile.All.compile/4
  (mix 1.13.4) lib/mix/tasks/compile.all.ex:59: Mix.Tasks.Compile.All.with_logger_app/2
  (mix 1.13.4) lib/mix/tasks/compile.all.ex:36: Mix.Tasks.Compile.All.run/1

though the fix is easy, I would not expect that from a newly generated project. I could not find an issue filed for this so hoping this is not a duplicate

I am trying to see in the code where that template for the mix.exs generated is created but can find it under the installer. I tried a default elixir new and that definitely does not come from there.

Gazler commented 1 year ago

I can't replicate this locally, could you please post a sample repository which showcases this issue?

josevalim commented 1 year ago

Are you sure you are on 1.7.0-rc.2? The generators does not include compilers: https://github.com/phoenixframework/phoenix/blob/master/installer/templates/phx_single/mix.exs#L4-L18

epinault commented 1 year ago

Sorry just was able to retest and yes seems like I had some weird ASDF mix up and got a 1.6 project instead of 1.7 but 2 different path were showing different version of phx.new. Thank for looking at it and sorry for the noise

chrismccord commented 1 year ago

No problem. Glad you get things sorted!