Skip to content

Commit 8c76b6b

Browse files
committed
Test out erlex prerelease.
1 parent 965b292 commit 8c76b6b

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

Diff for: mix.exs

+23-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
defmodule Matcha.MixProject do
22
use Mix.Project
33

4+
@version "VERSION" |> File.read!() |> String.trim() |> Version.parse!()
5+
@erlang_version Path.join([
6+
:code.root_dir(),
7+
"releases",
8+
:erlang.system_info(:otp_release),
9+
"OTP_VERSION"
10+
])
11+
|> File.read!()
12+
|> String.trim()
13+
|> String.split(".")
14+
|> Stream.unfold(fn
15+
[] -> nil
16+
[head | tail] -> {head, tail}
17+
end)
18+
|> Stream.concat(Stream.repeatedly(fn -> 0 end))
19+
|> Enum.take(3)
20+
|> Enum.join(".")
21+
|> Version.parse!()
22+
423
@name "Matcha"
524
@description "First-class match specification and match patterns for Elixir"
625
@authors ["Chris Keele"]
@@ -22,7 +41,7 @@ defmodule Matcha.MixProject do
2241
elixir: "~> 1.14",
2342
elixirc_options: [debug_info: Mix.env() in @dev_envs],
2443
start_permanent: Mix.env() == :prod,
25-
version: "VERSION" |> File.read!() |> String.trim(),
44+
version: Version.to_string(@version),
2645
# Informational
2746
name: @name,
2847
description: @description,
@@ -144,6 +163,8 @@ defmodule Matcha.MixProject do
144163
{:benchee_html, "~> 1.0", only: @dev_envs, runtime: false},
145164
{:credo, "~> 1.6", only: @dev_envs, runtime: false},
146165
{:dialyxir, "~> 1.0", only: @dev_envs, runtime: false},
166+
{:erlex, "== 0.2.7-handoff",
167+
only: [:dev, :test], runtime: false, allow_pre: true, override: true},
147168
{:doctor, "~> 0.21", only: @dev_envs, runtime: false},
148169
{:ex_doc, "~> 0.29", only: @dev_envs, runtime: false},
149170
{:excoveralls, "~> 0.18", only: @dev_envs}
@@ -271,7 +292,7 @@ defmodule Matcha.MixProject do
271292
plt_file: {:no_warn, "priv/plts/dialyzer.plt"},
272293
flags:
273294
["-Wunmatched_returns", :error_handling, :underspecs] ++
274-
if :erlang.system_info(:otp_release) not in ~w[25 26]c do
295+
if Version.match?(@erlang_version, "< 25.0.0") do
275296
[:race_conditions]
276297
else
277298
[]

Diff for: mix.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"dialyxir": {:hex, :dialyxir, "1.4.2", "764a6e8e7a354f0ba95d58418178d486065ead1f69ad89782817c296d0d746a5", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "516603d8067b2fd585319e4b13d3674ad4f314a5902ba8130cd97dc902ce6bbd"},
1010
"doctor": {:hex, :doctor, "0.21.0", "20ef89355c67778e206225fe74913e96141c4d001cb04efdeba1a2a9704f1ab5", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}], "hexpm", "a227831daa79784eb24cdeedfa403c46a4cb7d0eab0e31232ec654314447e4e0"},
1111
"earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"},
12-
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
12+
"erlex": {:hex, :erlex, "0.2.7-handoff", "7e9054cb51d0ddef64613bab680d3cfdd3b477b00af91ee050e11b11cb891d82", [:mix], [], "hexpm", "4b8ad3a3748dc983d014a1694fbadac870b7618ad1baf886e16cb35b9792a2eb"},
1313
"ex_doc": {:hex, :ex_doc, "0.30.9", "d691453495c47434c0f2052b08dd91cc32bc4e1a218f86884563448ee2502dd2", [:mix], [{:earmark_parser, "~> 1.4.31", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "d7aaaf21e95dc5cddabf89063327e96867d00013963eadf2c6ad135506a8bc10"},
1414
"excoveralls": {:hex, :excoveralls, "0.18.1", "a6f547570c6b24ec13f122a5634833a063aec49218f6fff27de9df693a15588c", [:mix], [{:castore, "~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "d65f79db146bb20399f23046015974de0079668b9abb2f5aac074d078da60b8d"},
1515
"file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"},

0 commit comments

Comments
 (0)