Przeglądaj źródła

Merge pull request #5375 from k32/update_snabbkaffe

Set snk_kind define for all dependencies
k32 4 lat temu
rodzic
commit
4e94858ccf
3 zmienionych plików z 11 dodań i 7 usunięć
  1. 1 1
      apps/emqx/rebar.config
  2. 3 2
      rebar.config
  3. 7 4
      rebar.config.erl

+ 1 - 1
apps/emqx/rebar.config

@@ -18,7 +18,7 @@
     , {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.11.0"}}}
     , {pbkdf2, {git, "https://github.com/emqx/erlang-pbkdf2.git", {tag, "2.0.4"}}}
     , {recon, {git, "https://github.com/ferd/recon", {tag, "2.5.1"}}}
-    , {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "0.13.0"}}}
+    , {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "0.14.1"}}}
     ]}.
 
 {plugins, [rebar3_proper]}.

+ 3 - 2
rebar.config

@@ -10,7 +10,8 @@
 {edoc_opts, [{preprocess,true}]}.
 {erl_opts, [warn_unused_vars,warn_shadow_vars,warn_unused_import,
             warn_obsolete_guard,compressed, nowarn_unused_import,
-            {d, snk_kind, msg}]}.
+            {d, snk_kind, msg}
+           ]}.
 
 {xref_checks,[undefined_function_calls,undefined_functions,locals_not_used,
               deprecated_function_calls,warnings_as_errors,deprecated_functions]}.
@@ -59,7 +60,7 @@
     , {recon, {git, "https://github.com/ferd/recon", {tag, "2.5.1"}}}
     , {observer_cli, "1.6.1"} % NOTE: depends on recon 2.5.1
     , {getopt, "1.0.2"}
-    , {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "0.13.0"}}}
+    , {snabbkaffe, {git, "https://github.com/kafka4beam/snabbkaffe.git", {tag, "0.14.1"}}}
     , {hocon, {git, "https://github.com/emqx/hocon.git", {tag, "0.11.0"}}}
     , {emqx_http_lib, {git, "https://github.com/emqx/emqx_http_lib.git", {tag, "0.4.0"}}}
     , {esasl, {git, "https://github.com/emqx/esasl", {tag, "0.1.0"}}}

+ 7 - 4
rebar.config.erl

@@ -52,13 +52,17 @@ overrides() ->
     [ {add, [ {extra_src_dirs, [{"etc", [{recursive,true}]}]}
             , {erl_opts, [{compile_info, [{emqx_vsn, get_vsn()}]}]}
             ]}
-    , {add, snabbkaffe,
-       [{erl_opts, common_compile_opts()}]}
-    ] ++ community_plugin_overrides().
+    ] ++ snabbkaffe_overrides() ++ community_plugin_overrides().
 
 community_plugin_overrides() ->
     [{add, App, [ {erl_opts, [{i, "include"}]}]} || App <- relx_plugin_apps_extra()].
 
+%% Temporary workaround for a rebar3 erl_opts duplication
+%% bug. Ideally, we want to set this define globally
+snabbkaffe_overrides() ->
+    Apps = [snabbkaffe, ekka],
+    [{add, App, [{erl_opts, [{d, snk_kind, msg}]}]} || App <- Apps].
+
 config(HasElixir) ->
     [ {cover_enabled, is_cover_enabled()}
     , {profiles, profiles()}
@@ -132,7 +136,6 @@ common_compile_opts() ->
     AppNames = app_names(),
     [ debug_info % alwyas include debug_info
     , {compile_info, [{emqx_vsn, get_vsn()}]}
-    , {d, snk_kind, msg}
     ] ++
     [{d, 'EMQX_DEP_APPS', AppNames -- [emqx, emqx_machine]}] ++
     [{d, 'EMQX_ENTERPRISE'} || is_enterprise()] ++