Skip to content

Commit 0d5aff2

Browse files
committed
Fix compatibility with OTP 26
1 parent 82560f5 commit 0d5aff2

File tree

5 files changed

+18
-20
lines changed

5 files changed

+18
-20
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,23 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
include:
20-
- otp: '25.x'
20+
- otp: '26.x'
2121
os: 'ubuntu-latest'
2222
coverage: true
2323
xref: true
2424
dialyzer: true
25+
- otp: '25.x'
26+
os: 'ubuntu-latest'
2527
- otp: '24.x'
2628
os: 'ubuntu-latest'
27-
- otp: '23.x'
28-
os: 'ubuntu-20.04'
2929

3030
env:
3131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3232
OTP_VERSION: ${{ matrix.otp }}
33+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3334

3435
steps:
35-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v4
3637

3738
- name: Install OTP and Elixir
3839
uses: erlef/setup-beam@v1
@@ -82,7 +83,7 @@ jobs:
8283
if: ${{ matrix.dialyzer && steps.plt-cache.outputs.cache-hit != 'true' }}
8384

8485
- name: Upload coverage to Codecov
85-
uses: codecov/codecov-action@v3
86+
uses: codecov/codecov-action@v4
8687
with:
8788
file: _build/test/covertool/shards.covertool.xml
8889
flags: otp-${{ matrix.otp }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ doc
3535
docs
3636
/priv/plts
3737
/bench
38+
rebar3

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
erlang 26.2

src/shards.erl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,15 @@ maybe_register(Name, Pid, Options) ->
970970
ok
971971
end.
972972

973+
-ifndef(OTP_RELEASE).
974+
%% OTP 20 or lower.
975+
-define(OTP_RELEASE, 20).
976+
-endif.
977+
978+
-if(?OTP_RELEASE >= 26).
979+
%% @private
980+
wrap_exit() -> ok.
981+
-else.
973982
%% @private
974983
wrap_exit() ->
975984
% We wait for the 'EXIT' signal from the partition supervisor knowing
@@ -978,6 +987,7 @@ wrap_exit() ->
978987
receive
979988
{'EXIT', _Pid, _Reason} -> ok
980989
end.
990+
-endif.
981991

982992
%% @equiv next(Tab, Key1, shards_meta:get(Tab))
983993
next(Tab, Key1) ->

test/shards_SUITE.erl

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,6 @@
4040
t_table_creation_errors/1
4141
]).
4242

43-
% %% Test Cases Helpers
44-
% -export([
45-
% t_basic_ops_/1,
46-
% t_match_ops_/1,
47-
% t_select_ops_/1
48-
% ]).
49-
50-
% %% Helpers
51-
% -export([
52-
% init_shards/0,
53-
% init_shards/1,
54-
% cleanup_shards/0,
55-
% delete_shards/0
56-
% ]).
57-
5843
-define(EXCLUDED_FUNS, [
5944
module_info,
6045
all,

0 commit comments

Comments
 (0)