Skip to content

Commit

Permalink
Test on OTP-26, drop pre-OTP-23; OTP-27 not compatible yet; fix dialyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
seriyps committed Dec 4, 2024
1 parent 9072be7 commit f9c2d32
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ jobs:
matrix:
os:
- "ubuntu-20.04"
rebar3: ["3.18.0"]
rebar3: ["3.20.0"]
otp:
- "25.1"
- "26.2"
- "25.3"
- "24.3"
- "23.3"
- "22.3"
include:
- otp: "21.3"
rebar3: "3.15.2"
- otp: "23.3"
rebar3: "3.18.0"
os: "ubuntu-20.04"
env:
SHELL: /bin/sh # needed for erlexec
Expand Down
2 changes: 1 addition & 1 deletion src/mtp_codec.erl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
try_decode_packet/2,
encode_packet/2,
fold_packets/4, fold_packets_if/4]).
-export_type([codec/0]).
-export_type([codec/0, packet_codec/0]).

-type state() :: any().
-type crypto_codec() :: mtp_aes_cbc
Expand Down
2 changes: 1 addition & 1 deletion src/mtp_config.erl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-export_type([netloc_v4v6/0]).
-export_type([dc_id/0, netloc/0, netloc_v4v6/0]).

-type dc_id() :: integer().
-type netloc() :: {inet:ip4_address(), inet:port_number()}.
Expand Down
2 changes: 1 addition & 1 deletion src/mtp_down_conn_sup.erl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).

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

Expand Down
2 changes: 1 addition & 1 deletion src/mtp_handler.erl
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ keys_str() ->
[{Name, Port, hex(Secret)}
|| {Name, Port, Secret} <- application:get_env(?APP, ports, [])].

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

Expand Down
2 changes: 2 additions & 0 deletions src/mtp_policy_table.erl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-export_type([sub_tab/0]).

-type sub_tab() :: atom().
-type value() :: mtp_policy:db_val().

Expand Down
2 changes: 1 addition & 1 deletion src/mtp_rpc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
%% Helpers
-export([inet_pton/1,
encode_ip_port/2]).
-export_type([codec/0]).
-export_type([conn_id/0, packet/0, codec/0]).

-dialyzer(no_improper_lists).

Expand Down

0 comments on commit f9c2d32

Please sign in to comment.