Skip to content

Commit

Permalink
Merge pull request #64 from keynslug/fix/EMQX-13447/bump-deps
Browse files Browse the repository at this point in the history
chore: enable Erlang/OTP 27 compatibility
  • Loading branch information
zhongwencool authored Dec 23, 2024
2 parents ba2b1df + becfaf7 commit 968719b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
name: Erlang/OTP ${{matrix.otp}}
strategy:
matrix:
otp: ['23', '24', '25']
otp: ['24', '25', '26', '27']

services:
etcd0:
Expand Down Expand Up @@ -73,8 +73,11 @@ jobs:
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
rebar3-version: '3.20.0'
rebar3-version: '3.22.1'
version-type: strict
hexpm-mirrors: |
https://cdn.jsdelivr.net/hex
https://builds.hex.pm
- run: rebar3 do xref, dialyzer, gradualizer, ct -v -c, cover -v
env:
TERM: xterm-color
8 changes: 6 additions & 2 deletions rebar.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{erl_opts, [{i, "./_build/default/plugins/gpb/include"}]}.
{deps, [
{gun, "2.0.0"}
{gun, "2.1.0"}
]}.

{gpb_opts, [
Expand All @@ -24,14 +24,18 @@
]}.

{plugins, [
{rebar3_gpb_plugin, "2.13.1"},
{rebar3_gpb_plugin, "2.23.2"},
{rebar3_eetcd_plugin, "0.3.2"}
]}.

{project_plugins, [
{gradualizer, {git, "https://github.com/josefs/Gradualizer.git", {branch, "master"}}}
]}.

{dialyzer, [
{plt_extra_apps, [ssl, public_key]}
]}.

{gradualizer_opts, [
{include, ["include"]},

Expand Down
6 changes: 3 additions & 3 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{"1.2.0",
[{<<"cowlib">>,{pkg,<<"cowlib">>,<<"2.11.0">>},1},
{<<"gun">>,{pkg,<<"gun">>,<<"2.0.0">>},0}]}.
{<<"gun">>,{pkg,<<"gun">>,<<"2.1.0">>},0}]}.
[
{pkg_hash,[
{<<"cowlib">>, <<"0B9FF9C346629256C42EBE1EEB769A83C6CB771A6EE5960BD110AB0B9B872063">>},
{<<"gun">>, <<"2326BC0FD6D9CF628419708270D6FE8B02B8D002CF992E4165A77D997B1DEFD0">>}]},
{<<"gun">>, <<"B4E4CBBF3026D21981C447E9E7CA856766046EFF693720BA43114D7F5DE36E87">>}]},
{pkg_hash_ext,[
{<<"cowlib">>, <<"2B3E9DA0B21C4565751A6D4901C20D1B4CC25CBB7FD50D91D2AB6DD287BC86A9">>},
{<<"gun">>, <<"6613CB7C62930DC8D58263C44DDA72F8556346BA88358FC929DCBC5F76D04569">>}]}
{<<"gun">>, <<"52FC7FC246BFC3B00E01AEA1C2854C70A366348574AB50C57DFE796D24A0101D">>}]}
].
5 changes: 1 addition & 4 deletions src/eetcd_conn.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
sync/1, check_health/1, flush_token/2]).

-export([init/1, handle_event/4, terminate/3,
code_change/4, callback_mode/0, format_status/2]).
code_change/4, callback_mode/0]).

-define(ready, ready).
-define(reconnect, reconnect).
Expand Down Expand Up @@ -137,9 +137,6 @@ init({Name, Hosts, Options}) ->

callback_mode() -> [handle_event_function].

format_status(_Opt, [_PDict, StateName, Data]) ->
#{'StateName' => StateName, 'StateData' => Data}.

handle_event({call, From}, {?flush_token, Gun, Token}, _StateName, Data) ->
{NewToken, NewData} = do_flush_token(Gun, Token, Data),
{keep_state, NewData, [{reply, From, NewToken}]};
Expand Down

0 comments on commit 968719b

Please sign in to comment.