fix(plugin): use binary `NameVsn` to re-build plugin avsc serde
This commit is contained in:
parent
68c601ad72
commit
25be9c2890
|
@ -157,7 +157,7 @@ get_plugin_avscs() ->
|
||||||
lists:foldl(
|
lists:foldl(
|
||||||
fun(AvscPath, AccIn) ->
|
fun(AvscPath, AccIn) ->
|
||||||
[_, NameVsn | _] = lists:reverse(filename:split(AvscPath)),
|
[_, NameVsn | _] = lists:reverse(filename:split(AvscPath)),
|
||||||
[{NameVsn, AvscPath} | AccIn]
|
[{to_bin(NameVsn), AvscPath} | AccIn]
|
||||||
end,
|
end,
|
||||||
_Acc0 = [],
|
_Acc0 = [],
|
||||||
filelib:wildcard(Pattern)
|
filelib:wildcard(Pattern)
|
||||||
|
@ -186,6 +186,8 @@ do_build_serde({NameVsn, AvscPath}) ->
|
||||||
{error, Error}
|
{error, Error}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
make_serde(NameVsn, AvscPath) when not is_binary(NameVsn) ->
|
||||||
|
make_serde(to_bin(NameVsn), AvscPath);
|
||||||
make_serde(NameVsn, AvscPath) ->
|
make_serde(NameVsn, AvscPath) ->
|
||||||
{ok, AvscBin} = read_avsc_file(AvscPath),
|
{ok, AvscBin} = read_avsc_file(AvscPath),
|
||||||
Store0 = avro_schema_store:new([map]),
|
Store0 = avro_schema_store:new([map]),
|
||||||
|
|
Loading…
Reference in New Issue