Skip to content

Commit

Permalink
fix: OTP27 dialyzer issues
Browse files Browse the repository at this point in the history
  • Loading branch information
kivra-pergus committed Jul 15, 2024
1 parent 961eb41 commit 5429dd5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/s2_pn_counters.erl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
%%%_* Code =============================================================
%%%_ * Types -----------------------------------------------------------
-define(M , s2_vclocks).
-opaque pn_counter() :: {?M:new(), ?M:new()}.
-opaque pn_counter() :: {?M:v_clock(), ?M:v_clock()}.

%%%_ * gen_lattice callbacks -------------------------------------------
new() -> {?M:new(), ?M:new()}.
Expand Down
7 changes: 6 additions & 1 deletion src/s2_util.erl
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@

%%%_* Exports ==========================================================
-export([ consult_string/1
, init_folsom/1
, ensure_map/1
, report_failed/1
, report_exception/1
]).

-ifdef(S2_USE_FOLSOM).
-export([init_folsom/1]).
-endif.

-ignore_xref([init_folsom/1]).

%%%_* Includes =========================================================
Expand All @@ -53,6 +56,7 @@ consult_string_test() ->
{error, _} = consult_string([12345]).
-endif.

-ifdef(S2_USE_FOLSOM).
init_folsom(Metrics) ->
?lift([begin
F = s2_atoms:catenate(['new_', Type]),
Expand All @@ -63,6 +67,7 @@ init_folsom(Metrics) ->
folsom_metrics:tag_metric(A, {func, Func}),
[folsom_metrics:tag_metric(A, {ret, Ret}) || Ret <- Rest]
end || {Type, [App, Mod, Func|Rest] = Name} <- Metrics]).
-endif.

-spec ensure_map(map() | list({atom(),any()})) -> map().
%% @doc Ensure parameters to OTP logger is a map
Expand Down
2 changes: 1 addition & 1 deletion src/stdlib2.app.src
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{application, stdlib2, [ {description, "stdlib2"}
, {vsn, git}
, {registered, []}
, {applications, [kernel, stdlib]}
, {applications, [kernel, stdlib, compiler]}
, {modules, []}
]}.

0 comments on commit 5429dd5

Please sign in to comment.