diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index ea8c1ea2..23f2e5cc 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -13,9 +13,9 @@ jobs: elixir-version: '1.17.2' - otp-version: '26.2' elixir-version: '1.16.3' - - otp-version: '26.2' - elixir-version: '1.15.2' - otp-version: '25.3' + elixir-version: '1.15.2' + - otp-version: '24.3' elixir-version: '1.14.5' steps: - uses: actions/checkout@v1 diff --git a/lib/zig.ex b/lib/zig.ex index eea25529..90f4030b 100644 --- a/lib/zig.ex +++ b/lib/zig.ex @@ -427,3 +427,12 @@ defmodule Zig do """ def version, do: @version end + +# check that the otp_version is 24 or greater. +otp_version = :otp_release +|> :erlang.system_info +|> List.to_integer + +if otp_version < 24 do + raise CompileError, description: "zigler requires OTP 24 or greater" +end \ No newline at end of file diff --git a/mix.lock b/mix.lock index 38512328..61c6e2b0 100644 --- a/mix.lock +++ b/mix.lock @@ -11,7 +11,7 @@ "makeup_erlang": {:hex, :makeup_erlang, "1.0.1", "c7f58c120b2b5aa5fd80d540a89fdf866ed42f1f3994e4fe189abebeab610839", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "8a89a1eeccc2d798d6ea15496a6e4870b75e014d1af514b1b71fa33134f57814"}, "markdown_formatter": {:hex, :markdown_formatter, "0.6.0", "bc822cf262f74a70dd6c76d76407b94cd19e59ee6b83248c728d00f7e75f2bd4", [:mix], [{:earmark_parser, "~> 1.4", [hex: :earmark_parser, repo: "hexpm", optional: false]}], "hexpm", "8181c6c1516061de482e24fa69e287878bab88249dae4ca489d89e914040da90"}, "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, - "pegasus": {:hex, :pegasus, "0.2.4", "3d8d5a2c89552face9c7ca14f959cc6c6d2cd645db1df85940db4c77c3b21a24", [:mix], [{:nimble_parsec, "~> 1.2", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "2d21e2b6b946fe3cd441544bf9856e7772f29050332f0255e166a13cdbe65bb4"}, + "pegasus": {:hex, :pegasus, "0.2.5", "38123461fe41add54f715ce41f89137a31cd217d353005b057f88b9b67c39b6f", [:mix], [{:nimble_parsec, "~> 1.2", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "ee80708608807f4447f1da1e6e0ebd9604f5bda4fbe2d4bdd9aa6dd67afde020"}, "protoss": {:hex, :protoss, "0.2.1", "fcf437ed65178d6cbf9a600886e3da9f7173697223972f062ee593941c2588b1", [:mix], [], "hexpm", "2261dbdc4d5913ce1e88d1410108d97f21140a118f45f6acc3edc4ecdb952052"}, "zig_doc": {:hex, :zig_doc, "0.4.0", "fdaee133165fa3c3a17e8ff7d62ab60be4ad011ff128d567151dbca2026f44d0", [:mix], [{:ex_doc, "~> 0.34.2", [hex: :ex_doc, repo: "hexpm", optional: false]}, {:zig_parser, "~> 0.4.0", [hex: :zig_parser, repo: "hexpm", optional: false]}], "hexpm", "d07c69a210d7ae3732493bf7e55628e30c4a68fec47c244e3f40f6c7323b819d"}, "zig_get": {:hex, :zig_get, "0.12.1", "2357fa498c17f526d68f2c25974878a729f8bc204c7ef43780fa59eadf7597fe", [:mix], [{:jason, "~> 1.4", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "ba2b5c4cd4f59d4ac90b0475449d04b2c0543313a021257582973d5b0e5f7eba"}, diff --git a/test/concurrency/threaded_automatic_erroring_test.exs b/test/concurrency/threaded_automatic_erroring_test.exs index 25ee7d1e..e2bca72b 100644 --- a/test/concurrency/threaded_automatic_erroring_test.exs +++ b/test/concurrency/threaded_automatic_erroring_test.exs @@ -33,7 +33,7 @@ defmodule ZiglerTest.Concurrency.ThreadedAutomaticErroringTest do assert %{payload: :BadNumber, stacktrace: [head | _] = stacktrace} = error - expected_file = Path.absname(__ENV__.file) + expected_file = Path.relative_to_cwd(__ENV__.file) assert {__MODULE__, :threaded, [:...], [file: ^expected_file, line: 15]} = head diff --git a/test/error/basic_test.exs b/test/error/basic_test.exs index bb345e4e..6e54b188 100644 --- a/test/error/basic_test.exs +++ b/test/error/basic_test.exs @@ -32,7 +32,7 @@ defmodule ZiglerTest.ErrorReturn.BasicTest do assert %{payload: :my_error, stacktrace: [head, next | _]} = error - expected_file = Path.absname(__ENV__.file) + expected_file = Path.relative_to_cwd(__ENV__.file) assert {__MODULE__, :basic_error_return, [:...], [file: ^expected_file, line: 20]} = next assert {__MODULE__, :nested_error, [:...], [file: ^expected_file, line: 15]} = head