Skip to content

Commit

Permalink
Fix compatibility with OTP 26
Browse files Browse the repository at this point in the history
  • Loading branch information
cabol committed May 25, 2024
1 parent 82560f5 commit 4b0ee00
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ jobs:
fail-fast: false
matrix:
include:
- otp: '25.x'
- otp: '26.x'
os: 'ubuntu-latest'
coverage: true
xref: true
dialyzer: true
- otp: '25.x'
os: 'ubuntu-latest'
- otp: '24.x'
os: 'ubuntu-latest'
- otp: '23.x'
os: 'ubuntu-20.04'

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ doc
docs
/priv/plts
/bench
rebar3
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
erlang 26.2
10 changes: 10 additions & 0 deletions src/shards.erl
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,15 @@ maybe_register(Name, Pid, Options) ->
ok
end.

-ifndef(OTP_RELEASE).
%% OTP 20 or lower.
-define(OTP_RELEASE, 20).
-endif.

-if(?OTP_RELEASE >= 26).
%% @private
wrap_exit() -> ok.
-else.
%% @private
wrap_exit() ->
% We wait for the 'EXIT' signal from the partition supervisor knowing
Expand All @@ -978,6 +987,7 @@ wrap_exit() ->
receive
{'EXIT', _Pid, _Reason} -> ok
end.
-endif.

%% @equiv next(Tab, Key1, shards_meta:get(Tab))
next(Tab, Key1) ->
Expand Down
15 changes: 0 additions & 15 deletions test/shards_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,6 @@
t_table_creation_errors/1
]).

% %% Test Cases Helpers
% -export([
% t_basic_ops_/1,
% t_match_ops_/1,
% t_select_ops_/1
% ]).

% %% Helpers
% -export([
% init_shards/0,
% init_shards/1,
% cleanup_shards/0,
% delete_shards/0
% ]).

-define(EXCLUDED_FUNS, [
module_info,
all,
Expand Down

0 comments on commit 4b0ee00

Please sign in to comment.