From 9dfd3f85f638be113a6867ba3e9be18487101123 Mon Sep 17 00:00:00 2001 From: elbrujohalcon Date: Wed, 30 Oct 2024 16:36:48 +0100 Subject: [PATCH] update- Add compatibility with OTP 26 and 27 --- .github/workflows/ci.yaml | 2 +- rebar.config.script | 10 ++++++++++ test/typer_core_SUITE.erl | 3 +-- 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 rebar.config.script diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b0cb372..aa6b10a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - otp: [25] + otp: [25, 26, 27] rebar: [3.24] steps: - uses: actions/checkout@v4 diff --git a/rebar.config.script b/rebar.config.script new file mode 100644 index 0000000..46d8ba1 --- /dev/null +++ b/rebar.config.script @@ -0,0 +1,10 @@ +case string:to_integer( + erlang:system_info(otp_release)) +of + {N, _} when N >= 26 -> + {value, {dialyzer, DOpts}, Config} = lists:keytake(dialyzer, 1, CONFIG), + {value, {warnings, Warnings}, OtherDOpts} = lists:keytake(warnings, 1, DOpts), + [{dialyzer, [{warnings, [no_unknown | Warnings]} | OtherDOpts]} | Config]; + _ -> + CONFIG +end. diff --git a/test/typer_core_SUITE.erl b/test/typer_core_SUITE.erl index 5eed629..c667c35 100644 --- a/test/typer_core_SUITE.erl +++ b/test/typer_core_SUITE.erl @@ -36,8 +36,7 @@ empty(_) -> bad_plt(_) -> ct:comment("With an invalid plt.. we get an error"), - [{abort, - <<"typer: Dialyzer's PLT is missing or is not up-to-date; please (re)create it">>}] = + [{abort, <<"typer: ", _Message/binary>>}] = run_typer(#{files_r => [abs_test_path("single_file")], plt => "bad.plt"}), {comment, ""}.