@@ -2,23 +2,7 @@ defmodule Matcha.MixProject do
22 use Mix.Project
33
44 @ 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! ( )
5+ @ erlang_version :otp_release |> :erlang . system_info |> List . to_string ( ) |> String . to_integer ( )
226
237 @ name "Matcha"
248 @ description "First-class match specification and match patterns for Elixir"
@@ -163,8 +147,6 @@ defmodule Matcha.MixProject do
163147 { :benchee_html , "~> 1.0" , only: @ dev_envs , runtime: false } ,
164148 { :credo , "~> 1.6" , only: @ dev_envs , runtime: false } ,
165149 { :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 } ,
168150 { :doctor , "~> 0.21" , only: @ dev_envs , runtime: false } ,
169151 { :ex_doc , "~> 0.29" , only: @ dev_envs , runtime: false } ,
170152 { :excoveralls , "~> 0.18" , only: @ dev_envs }
@@ -321,7 +303,7 @@ defmodule Matcha.MixProject do
321303 plt_file: { :no_warn , "priv/plts/dialyzer.plt" } ,
322304 flags:
323305 [ "-Wunmatched_returns" , :error_handling , :underspecs ] ++
324- if Version . match? ( @ erlang_version , " < 25.0.0" ) do
306+ if @ erlang_version < 25 do
325307 [ :race_conditions ]
326308 else
327309 [ ]
0 commit comments