From 5a927049efb5157447ebf55b34b39709e01ab5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Fri, 12 Jul 2019 13:02:10 +0200 Subject: [PATCH 1/3] Bump jose version --- rebar.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebar.config b/rebar.config index acf3ebb02..94a936b7e 100644 --- a/rebar.config +++ b/rebar.config @@ -30,7 +30,7 @@ {jiffy, ".*", {git, "https://github.com/davisp/jiffy", {tag, "0.14.8"}}}, {p1_oauth2, ".*", {git, "https://github.com/processone/p1_oauth2", {tag, "0.6.5"}}}, {pkix, ".*", {git, "https://github.com/processone/pkix", {tag, "1.0.2"}}}, - {jose, ".*", {git, "https://github.com/potatosalad/erlang-jose", {tag, "1.8.4"}}}, + {jose, ".*", {git, "https://github.com/potatosalad/erlang-jose", {tag, "1.9.0"}}}, {eimp, ".*", {git, "https://github.com/processone/eimp", "172fae666e8da40142e9a17d9f9a154c6b697c9b"}}, {mqtree, ".*", {git, "https://github.com/processone/mqtree", {tag, "1.0.3"}}}, {if_var_true, stun, {stun, ".*", {git, "https://github.com/processone/stun", {tag, "1.0.28"}}}}, From 948578b55be67743c10fac6ac68e973c5f935eff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Fri, 12 Jul 2019 14:55:01 +0200 Subject: [PATCH 2/3] Downgrade jose to version that works with rebar2 and del warning_as_error from it's config --- plugins/override_opts.erl | 7 +++++++ rebar.config | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/override_opts.erl b/plugins/override_opts.erl index 1d321fc87..818f53e87 100644 --- a/plugins/override_opts.erl +++ b/plugins/override_opts.erl @@ -9,6 +9,11 @@ override_opts(add, Config, Opts) -> lists:foldl(fun({Opt, Value}, Conf) -> V = rebar_config:get_local(Conf, Opt, []), rebar_config:set(Conf, Opt, V ++ Value) + end, Config, Opts); +override_opts(del, Config, Opts) -> + lists:foldl(fun({Opt, Value}, Conf) -> + V = rebar_config:get_local(Conf, Opt, []), + rebar_config:set(Conf, Opt, V -- Value) end, Config, Opts). preprocess(Config, _Dirs) -> @@ -24,6 +29,8 @@ preprocess(Config, _Dirs) -> lists:foldl(fun({Type, AppName2, Opts}, Conf1) when AppName2 == AppName -> override_opts(Type, Conf1, Opts); + ({Type, Opts}, Conf1a) -> + override_opts(Type, Conf1a, Opts); (_, Conf2) -> Conf2 end, C, TopOverrides); diff --git a/rebar.config b/rebar.config index 94a936b7e..08042444d 100644 --- a/rebar.config +++ b/rebar.config @@ -30,7 +30,7 @@ {jiffy, ".*", {git, "https://github.com/davisp/jiffy", {tag, "0.14.8"}}}, {p1_oauth2, ".*", {git, "https://github.com/processone/p1_oauth2", {tag, "0.6.5"}}}, {pkix, ".*", {git, "https://github.com/processone/pkix", {tag, "1.0.2"}}}, - {jose, ".*", {git, "https://github.com/potatosalad/erlang-jose", {tag, "1.9.0"}}}, + {jose, ".*", {git, "https://github.com/potatosalad/erlang-jose", {tag, "1.8.4"}}}, {eimp, ".*", {git, "https://github.com/processone/eimp", "172fae666e8da40142e9a17d9f9a154c6b697c9b"}}, {mqtree, ".*", {git, "https://github.com/processone/mqtree", {tag, "1.0.3"}}}, {if_var_true, stun, {stun, ".*", {git, "https://github.com/processone/stun", {tag, "1.0.28"}}}}, @@ -148,6 +148,9 @@ {cover_export_enabled, true}. {recursive_cmds, ['configure-deps']}. +{overrides, [ + {del, [{erl_opts, [warnings_as_errors]}]}]}. + {post_hook_configure, [{"fast_tls", []}, {"stringprep", []}, {"fast_yaml", []}, From f0bbc05b7a5f5bae003efc5c03679e06040dfec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Fri, 12 Jul 2019 15:00:12 +0200 Subject: [PATCH 3/3] Make sure that configure is run before pc:compile on rebar3 --- rebar.config.script | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rebar.config.script b/rebar.config.script index 694d6879f..0023c25f3 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -299,7 +299,7 @@ fun(Hooks) -> lists:map(fun({Pkg, Flags}) -> DepPath = ResolveDepPath("deps/" ++ Pkg ++ "/"), Line = lists:flatten(GenDepConfigureLine(DepPath, Flags)), - {add, list_to_atom(Pkg), [{pre_hooks, [{'compile', Line}, {'configure-deps', Line}]}]} + {add, list_to_atom(Pkg), [{pre_hooks, [{{pc, compile}, Line}, {'compile', Line}, {'configure-deps', Line}]}]} end, Hooks) end,