Skip to content

Commit f9c2d32

Browse files
committed
Test on OTP-26, drop pre-OTP-23; OTP-27 not compatible yet; fix dialyzer
1 parent 9072be7 commit f9c2d32

File tree

7 files changed

+12
-11
lines changed

7 files changed

+12
-11
lines changed

.github/workflows/ci.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@ jobs:
1919
matrix:
2020
os:
2121
- "ubuntu-20.04"
22-
rebar3: ["3.18.0"]
22+
rebar3: ["3.20.0"]
2323
otp:
24-
- "25.1"
24+
- "26.2"
25+
- "25.3"
2526
- "24.3"
26-
- "23.3"
27-
- "22.3"
2827
include:
29-
- otp: "21.3"
30-
rebar3: "3.15.2"
28+
- otp: "23.3"
29+
rebar3: "3.18.0"
3130
os: "ubuntu-20.04"
3231
env:
3332
SHELL: /bin/sh # needed for erlexec

src/mtp_codec.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
try_decode_packet/2,
1717
encode_packet/2,
1818
fold_packets/4, fold_packets_if/4]).
19-
-export_type([codec/0]).
19+
-export_type([codec/0, packet_codec/0]).
2020

2121
-type state() :: any().
2222
-type crypto_codec() :: mtp_aes_cbc

src/mtp_config.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
%% gen_server callbacks
2727
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
2828
terminate/2, code_change/3]).
29-
-export_type([netloc_v4v6/0]).
29+
-export_type([dc_id/0, netloc/0, netloc_v4v6/0]).
3030

3131
-type dc_id() :: integer().
3232
-type netloc() :: {inet:ip4_address(), inet:port_number()}.

src/mtp_down_conn_sup.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
start_link() ->
2121
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
2222

23-
-spec start_conn(pid(), mtp_conf:dc_id()) -> {ok, pid()}.
23+
-spec start_conn(pid(), mtp_config:dc_id()) -> {ok, pid()}.
2424
start_conn(Pool, DcId) ->
2525
supervisor:start_child(?SERVER, [Pool, DcId]).
2626

src/mtp_handler.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ keys_str() ->
7070
[{Name, Port, hex(Secret)}
7171
|| {Name, Port, Secret} <- application:get_env(?APP, ports, [])].
7272

73-
-spec send(pid(), mtp_rpc:packet()) -> ok.
73+
-spec send(pid(), {proxy_ans, pid(), binary()} | {simple_ack, pid(), binary()} | {close_ext, pid()}) -> ok.
7474
send(Upstream, Packet) ->
7575
gen_server:cast(Upstream, Packet).
7676

src/mtp_policy_table.erl

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
%% gen_server callbacks
2323
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
2424
terminate/2, code_change/3]).
25+
-export_type([sub_tab/0]).
26+
2527
-type sub_tab() :: atom().
2628
-type value() :: mtp_policy:db_val().
2729

src/mtp_rpc.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
%% Helpers
2020
-export([inet_pton/1,
2121
encode_ip_port/2]).
22-
-export_type([codec/0]).
22+
-export_type([conn_id/0, packet/0, codec/0]).
2323

2424
-dialyzer(no_improper_lists).
2525

0 commit comments

Comments
 (0)