mirror of
https://git.pleroma.social/sjw/pleroma.git
synced 2024-12-27 15:05:18 +01:00
Fix in-db configuration in dev environment
Previously, in-db configuration only worked when `warnings_as_errors` was disabled because re-compiling scrubbers on application restart created a warning about module conflicts. This patch fixes that by enabling `ignore_module_conflict` option of the compiler at runtime, and enables `warnings_as_errors` in prod since there is no reason to keep it disabled anymore.
This commit is contained in:
parent
5d215fd81f
commit
e6ccc25565
@ -35,6 +35,10 @@ defmodule Pleroma.Application do
|
||||
# See http://elixir-lang.org/docs/stable/elixir/Application.html
|
||||
# for more information on OTP Applications
|
||||
def start(_type, _args) do
|
||||
# Scrubbers are compiled at runtime and therefore will cause a conflict
|
||||
# every time the application is restarted, so we disable module
|
||||
# conflicts at runtime
|
||||
Code.compiler_options(ignore_module_conflict: true)
|
||||
Config.Holder.save_default()
|
||||
Pleroma.HTML.compile_scrubbers()
|
||||
Config.DeprecationWarnings.warn()
|
||||
|
2
mix.exs
2
mix.exs
@ -90,8 +90,6 @@ defmodule Pleroma.Mixfile do
|
||||
defp elixirc_paths(_), do: ["lib"]
|
||||
|
||||
defp warnings_as_errors(:prod), do: false
|
||||
# Uncomment this if you need testing configurable_from_database logic
|
||||
# defp warnings_as_errors(:dev), do: false
|
||||
defp warnings_as_errors(_), do: true
|
||||
|
||||
# Specifies OAuth dependencies.
|
||||
|
Loading…
Reference in New Issue
Block a user