Skip to content

Commit 26ddcdb

Browse files
authored
[RTI-16013] Add support for OTP 27 (#123)
* Supress warnings * Add IntelliJ to .gitinore file * Update pipeline to run with OTP 27 * Supress warnings only for OTP 27 * Simplify pipeline * Add comment * Add comment
1 parent a1bd5ae commit 26ddcdb

4 files changed

Lines changed: 34 additions & 9 deletions

File tree

.github/workflows/erlang.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,26 @@ env:
66
ERL_FLAGS: "-enable-feature all"
77

88
jobs:
9-
109
build:
11-
12-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-24.04
1311

1412
strategy:
1513
matrix:
16-
otp: ['25.2.1']
17-
rebar: ['3.20.0']
14+
include:
15+
- otp: '25.2.1'
16+
rebar: '3.20.0'
17+
- otp: '27.3.4'
18+
rebar: '3.24.0'
1819

1920
steps:
2021
- uses: actions/checkout@v3
2122
- uses: erlef/setup-beam@v1
2223
id: setup-beam
2324
with:
2425
otp-version: ${{matrix.otp}}
25-
rebar3-version: '3.20.0'
26+
rebar3-version: ${{matrix.rebar}}
2627
- name: Restore _build
27-
uses: actions/cache@v3
28+
uses: actions/cache@v4
2829
with:
2930
path: _build
3031
key: "_build-cache-for\
@@ -33,7 +34,7 @@ jobs:
3334
-rebar3-${{steps.setup-beam.outputs.rebar3-version}}\
3435
-hash-${{hashFiles('rebar.lock')}}"
3536
- name: Restore rebar3's cache
36-
uses: actions/cache@v3
37+
uses: actions/cache@v4
3738
with:
3839
path: ~/.cache/rebar3
3940
key: "rebar3-cache-for\

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ _build/
55
*.beam
66
*.plt
77
erl_crash.dump
8+
.idea/
9+
*.iml

src/mero_cluster.erl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,28 @@
119119
{mero_cluster_util, worker_by_index, 3},
120120
{mero_cluster_util, module_info, 1}]).
121121

122+
%% OTP 27 improved dialyzer and now it's complaining
123+
%% about functions of a dynamic compiled module.
124+
-if(?OTP_RELEASE >= 27).
125+
126+
-dialyzer({[no_unknown],
127+
[child_definitions/1,
128+
sup_by_cluster_name/1,
129+
cluster_shards/1,
130+
workers_per_shard/1,
131+
pool_worker_module/1,
132+
sharding_algorithm/1,
133+
one_pool_of_each_shard_of_cluster/1,
134+
random_pool_of_shard/2,
135+
total_workers/1,
136+
shard_identifier/2,
137+
version/0,
138+
clusters/0]}).
139+
140+
- else .
141+
142+
-endif.
143+
122144
-type child_definitions() ::
123145
[{Host :: string(),
124146
Port :: pos_integer(),

test/mero_conf_SUITE.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ init_per_testcase(_, Conf) ->
8989
end_per_testcase(diff, _Conf) ->
9090
ok;
9191
end_per_testcase(_, _Conf) ->
92-
dbg:stop_clear(),
92+
dbg:stop(),
9393
meck:unload([mero_elasticache]),
9494
ok.
9595

0 commit comments

Comments
 (0)