diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9220d1b..1b55b21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/src/mtp_codec.erl b/src/mtp_codec.erl index 8ff4b69..fc86cfe 100644 --- a/src/mtp_codec.erl +++ b/src/mtp_codec.erl @@ -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 diff --git a/src/mtp_config.erl b/src/mtp_config.erl index 933724d..6d6477d 100644 --- a/src/mtp_config.erl +++ b/src/mtp_config.erl @@ -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()}. diff --git a/src/mtp_handler.erl b/src/mtp_handler.erl index b3ae299..3446634 100644 --- a/src/mtp_handler.erl +++ b/src/mtp_handler.erl @@ -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). diff --git a/src/mtp_policy_table.erl b/src/mtp_policy_table.erl index f58efd8..a2bf47f 100644 --- a/src/mtp_policy_table.erl +++ b/src/mtp_policy_table.erl @@ -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(). diff --git a/src/mtp_rpc.erl b/src/mtp_rpc.erl index 9562a37..7d77763 100644 --- a/src/mtp_rpc.erl +++ b/src/mtp_rpc.erl @@ -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).