utils: comply with elixir 1.19 soft-requirement for parallel compiles

Elixir 1.19 now requires (with a deprecation warning) return_diagnostics
to be set to true for parallel compiles. However, this parameter was only
added in Elixir 1.15, so this raises our base requirement.
Since Elixir 1.14 is EOL anyway now this shoulöd be fine though.
This commit is contained in:
Oneric 2025-12-05 00:00:00 +00:00
commit ae17ad49ff
5 changed files with 8 additions and 4 deletions

View file

@ -6,6 +6,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## Unreleased
### BREAKING
- Elixir 1.14 is no longer suported, but EOL anyway. Upgrade to Elixir 1.15+
### REMOVED
### Added

View file

@ -1,7 +1,7 @@
## Required dependencies
* PostgreSQL 12+
* Elixir 1.14.1+ (currently tested up to 1.18)
* Elixir 1.15+ (currently tested up to 1.19)
* Erlang OTP 25+ (currently tested up to OTP27)
* git
* file / libmagic

View file

@ -16,7 +16,7 @@ defmodule Pleroma.Utils do
def compile_dir(dir) when is_binary(dir) do
dir
|> elixir_files()
|> Kernel.ParallelCompiler.compile()
|> Kernel.ParallelCompiler.compile(return_diagnostics: true)
end
defp elixir_files(dir) when is_binary(dir) do

View file

@ -5,7 +5,7 @@ defmodule Pleroma.Mixfile do
[
app: :pleroma,
version: version("3.17.0"),
elixir: "~> 1.14.1 or ~> 1.15",
elixir: "~> 1.15",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: Mix.compilers(),
xref: [exclude: [:eldap]],

View file

@ -15,7 +15,8 @@ defmodule Pleroma.UtilsTest do
describe "compile_dir/1" do
test "recursively compiles directories" do
{:ok, [DynamicModule.First, DynamicModule.Second], []} =
{:ok, [DynamicModule.First, DynamicModule.Second],
%{runtime_warnings: [], compile_warnings: []}} =
Pleroma.Utils.compile_dir("test/fixtures/runtime_modules")
end
end