File 0002-Properly-fetch-opaque-info.patch of Package lager
From 985c680709662aab89f5665ddc24e7b1296db900 Mon Sep 17 00:00:00 2001
From: "Paulo F. Oliveira" <paulo.ferraz.oliveira@gmail.com>
Date: Sun, 7 Feb 2021 12:53:59 +0000
Subject: [PATCH 1/4] Properly fetch opaque info.
---
src/lager_transform.erl | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/lager_transform.erl b/src/lager_transform.erl
index a2d26c5..a6496c7 100644
--- a/src/lager_transform.erl
+++ b/src/lager_transform.erl
@@ -267,11 +267,8 @@ handle_args(DefaultAttrs, Line, [Arg1, Arg2]) ->
handle_args(DefaultAttrs, _Line, [Attrs, Format, Args]) ->
{concat_lists(Attrs, DefaultAttrs), Format, Args}.
-make_varname(Prefix, Loc) ->
- list_to_atom(Prefix ++ atom_to_list(get(module)) ++ integer_to_list(line_from_loc(Loc))).
-
-line_from_loc({Line, _Col}) -> Line;
-line_from_loc(Line) -> Line.
+make_varname(Prefix, CallAnno) ->
+ list_to_atom(Prefix ++ atom_to_list(get(module)) ++ integer_to_list(erl_anno:line(CallAnno))).
%% concat 2 list ASTs by replacing the terminating [] in A with the contents of B
concat_lists({var, Line, _Name}=Var, B) ->
--
2.26.2