Skip to content

Commit 11c6e70

Browse files
committed
Fix dialyzer warnings about unknown type ered:host/0
Add the missing type export and re-enable the unknown type warning disabled for OTP 26. The fixed warnings was found in: - src/ered_client.erl Line 80 Column 24: Unknown type ered:host/0 - src/ered_connection.erl Line 60 Column 17: Unknown type ered:host/0 Additionally add plt_extra_apps to handle the warnings: - test/ered_client_tests.erl Line 0: Unknown function eunit:test/1 - ./ssl.erl Line 927 Column 77: Unknown type public_key:oid/0 Signed-off-by: Björn Svensson <[email protected]>
1 parent e3d337d commit 11c6e70

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,11 @@ jobs:
6868
- name: Run common tests
6969
run: rebar3 ct
7070
- name: Run dialyzer
71-
run: rebar3 as test dialyzer
71+
run: |
72+
# Remove remnants from "rebar3 ct" that creates problems for the dialyzer.
73+
# rebar3 might add ct_hooks that are not found by the dialyzer and will
74+
# create warnings if not rebuilt. Example of a warning:
75+
# test/ered_cluster_SUITE.erl
76+
# Line 72 Column 13: Unknown function cthr:pal/1
77+
rebar3 as test clean
78+
rebar3 as test dialyzer

rebar.config

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,4 @@
1010

1111
{profiles, [{check, [{plugins, [{rebar3_fmt, "1.18.0"}]}]}]}.
1212

13-
%% In OTP-26 the 'unknown function or type' warning is on by default.
14-
%% We disable this again due to missing supervisor types in OTP-26, see:
15-
%% https://github.com/erlang/otp/pull/6893
16-
{dialyzer, [{warnings, [no_unknown]}]}.
13+
{dialyzer, [{plt_extra_apps, [common_test, eunit, public_key]}]}.

src/ered.erl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
-export_type([opt/0,
1313
addr/0,
14+
host/0,
1415
command/0,
1516
reply/0,
1617
reply_fun/0,

0 commit comments

Comments
 (0)