From ec80a1e405c7b1d893c08ea99e824f2c13719c3a Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Fri, 2 Sep 2022 22:35:08 +0200 Subject: [PATCH] Bump minimum Elixir version to 1.10 1.9 being end-of-life --- CHANGELOG.md | 1 + Dockerfile | 2 +- ci/Dockerfile | 2 +- docs/installation/generic_dependencies.include | 2 +- elixir_buildpack.config | 2 +- lib/pleroma/config/loader.ex | 15 ++------------- mix.exs | 2 +- restarter/mix.exs | 2 +- 8 files changed, 9 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d0ef4e11..caa5d0cd2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - MastoFE ### Changed +- **Breaking:** Elixir >=1.10 is now required (was >= 1.9) - Allow users to remove their emails if instance does not need email to register - Uploadfilter `Pleroma.Upload.Filter.Exiftool` has been renamed to `Pleroma.Upload.Filter.Exiftool.StripLocation` - Updated the recommended pleroma.vcl configuration for Varnish to target Varnish 7.0+ diff --git a/Dockerfile b/Dockerfile index e68b7ea7c..44fd3ebcc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM elixir:1.9-alpine as build +FROM elixir:1.10-alpine as build COPY . . diff --git a/ci/Dockerfile b/ci/Dockerfile index e6a8b438c..5929f832d 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -1,4 +1,4 @@ -FROM elixir:1.9.4 +FROM elixir:1.10.4 RUN apt-get update &&\ apt-get install -y libmagic-dev cmake libimage-exiftool-perl ffmpeg &&\ diff --git a/docs/installation/generic_dependencies.include b/docs/installation/generic_dependencies.include index 2dbd93e42..dcaacfdfd 100644 --- a/docs/installation/generic_dependencies.include +++ b/docs/installation/generic_dependencies.include @@ -1,7 +1,7 @@ ## Required dependencies * PostgreSQL 9.6+ -* Elixir 1.9+ +* Elixir 1.10+ * Erlang OTP 22.2+ * git * file / libmagic diff --git a/elixir_buildpack.config b/elixir_buildpack.config index 946408c12..1102e7145 100644 --- a/elixir_buildpack.config +++ b/elixir_buildpack.config @@ -1,2 +1,2 @@ -elixir_version=1.9.4 +elixir_version=1.10.4 erlang_version=22.3.4.1 diff --git a/lib/pleroma/config/loader.ex b/lib/pleroma/config/loader.ex index 015be3d8e..bd85eccab 100644 --- a/lib/pleroma/config/loader.ex +++ b/lib/pleroma/config/loader.ex @@ -19,21 +19,10 @@ defmodule Pleroma.Config.Loader do :tesla ] - if Code.ensure_loaded?(Config.Reader) do - @reader Config.Reader - - def read(path), do: @reader.read!(path) - else - # support for Elixir less than 1.9 - @reader Mix.Config - def read(path) do - path - |> @reader.eval!() - |> elem(0) - end - end + @reader Config.Reader @spec read(Path.t()) :: keyword() + def read(path), do: @reader.read!(path) @spec merge(keyword(), keyword()) :: keyword() def merge(c1, c2), do: @reader.merge(c1, c2) diff --git a/mix.exs b/mix.exs index 66390d113..d196eb872 100644 --- a/mix.exs +++ b/mix.exs @@ -5,7 +5,7 @@ def project do [ app: :pleroma, version: version("2.4.52"), - elixir: "~> 1.9", + elixir: "~> 1.10", elixirc_paths: elixirc_paths(Mix.env()), compilers: [:phoenix, :gettext] ++ Mix.compilers(), elixirc_options: [warnings_as_errors: warnings_as_errors()], diff --git a/restarter/mix.exs b/restarter/mix.exs index 9f26f5f64..4bb9b76e2 100644 --- a/restarter/mix.exs +++ b/restarter/mix.exs @@ -5,7 +5,7 @@ def project do [ app: :restarter, version: "0.1.0", - elixir: "~> 1.8", + elixir: "~> 1.10", start_permanent: Mix.env() == :prod, deps: deps() ]