elixirschool / school_house

The new era of Elixir School now powered by @phoenixframework
https://elixirschool.com/
Apache License 2.0
154 stars 49 forks source link

Upgrade to Elixir v1.14 #205

Closed Benjamin-Philip closed 2 years ago

Benjamin-Philip commented 2 years ago

This commit upgrades the Elixir version used in the Docker image and the Continuous Integration to v1.14.

Benjamin-Philip commented 2 years ago

Should I replace instances ofApplication.get_env with Application.compile_env? That should fix the failing workflow.

doomspork commented 2 years ago

@Benjamin-Philip let's make that change and give it a look to make sure everything works as expected 👍

Thanks for the PR!

Benjamin-Philip commented 2 years ago

@doomspork On investigation I found that the warning:

Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead

is mostly from AppSignal and is passed when we use AppSignal.Phoenix.view in SchoolHouseWeb.view. It is also passed when we use AppSignal.Phoenix in SchoolHouseWeb.Endpoint.

Additionally using Gettext in SchoolHouseWeb.Gettext passes one instance of the warning.

Since this is something that needs changes upstream, there are 4 things we could do:

  1. Close the PR
  2. Upgrade to patched versions of these packages (I'll probably have to send the patches myself)
  3. Stop using the --warnings-as-errors flag temporarily
  4. Configure Elixir to ignore this warning (I'm not sure if this is possible though)

This is possibly a bug in the Elixir compiler as these are errors from using an external module.

Benjamin-Philip commented 2 years ago

Scratch that. Upgrading gettext and appsignal_phoenix fixed everything.

Benjamin-Philip commented 2 years ago

Done.

I haven't tested with asdf though as I don't use it.