diff --git a/.github/workflows/erlang.yml b/.github/workflows/erlang.yml index 1aa8894..c7cd909 100644 --- a/.github/workflows/erlang.yml +++ b/.github/workflows/erlang.yml @@ -6,15 +6,16 @@ env: ERL_FLAGS: "-enable-feature all" jobs: - build: - - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: - otp: ['25.2.1'] - rebar: ['3.20.0'] + include: + - otp: '25.2.1' + rebar: '3.20.0' + - otp: '27.3.4' + rebar: '3.24.0' steps: - uses: actions/checkout@v3 @@ -22,9 +23,9 @@ jobs: id: setup-beam with: otp-version: ${{matrix.otp}} - rebar3-version: '3.20.0' + rebar3-version: ${{matrix.rebar}} - name: Restore _build - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: _build key: "_build-cache-for\ @@ -33,7 +34,7 @@ jobs: -rebar3-${{steps.setup-beam.outputs.rebar3-version}}\ -hash-${{hashFiles('rebar.lock')}}" - name: Restore rebar3's cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/rebar3 key: "rebar3-cache-for\ diff --git a/.gitignore b/.gitignore index 7cb45c8..697b7ea 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ _build/ *.beam *.plt erl_crash.dump +.idea/ +*.iml diff --git a/src/mero_cluster.erl b/src/mero_cluster.erl index 20ba9d6..658ff4a 100644 --- a/src/mero_cluster.erl +++ b/src/mero_cluster.erl @@ -119,6 +119,28 @@ {mero_cluster_util, worker_by_index, 3}, {mero_cluster_util, module_info, 1}]). +%% OTP 27 improved dialyzer and now it's complaining +%% about functions of a dynamic compiled module. +-if(?OTP_RELEASE >= 27). + +-dialyzer({[no_unknown], + [child_definitions/1, + sup_by_cluster_name/1, + cluster_shards/1, + workers_per_shard/1, + pool_worker_module/1, + sharding_algorithm/1, + one_pool_of_each_shard_of_cluster/1, + random_pool_of_shard/2, + total_workers/1, + shard_identifier/2, + version/0, + clusters/0]}). + +- else . + +-endif. + -type child_definitions() :: [{Host :: string(), Port :: pos_integer(), diff --git a/test/mero_conf_SUITE.erl b/test/mero_conf_SUITE.erl index 78a5e5d..19f2013 100644 --- a/test/mero_conf_SUITE.erl +++ b/test/mero_conf_SUITE.erl @@ -89,7 +89,7 @@ init_per_testcase(_, Conf) -> end_per_testcase(diff, _Conf) -> ok; end_per_testcase(_, _Conf) -> - dbg:stop_clear(), + dbg:stop(), meck:unload([mero_elasticache]), ok.