summaryrefslogtreecommitdiff
path: root/lib/pleroma/application.ex
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-07-14 11:41:30 +0300
committerrinpatch <rinpatch@sdf.org>2020-07-14 13:16:54 +0300
commite6ccc2556568f2180c3ce1945bdc7a0cba97e924 (patch)
tree452722ece6987c8b526a5af0af0c864774ca059e /lib/pleroma/application.ex
parent5d215fd81f529b639db9096ca71d4e7f0a6ed386 (diff)
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.
Diffstat (limited to 'lib/pleroma/application.ex')
-rw-r--r--lib/pleroma/application.ex4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pleroma/application.ex b/lib/pleroma/application.ex
index b68a373a4..3282c6882 100644
--- a/lib/pleroma/application.ex
+++ b/lib/pleroma/application.ex
@@ -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()