Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2021-07-15 02:29:35 +0300
committerBadlop <badlop@process-one.net>2021-07-16 17:43:08 +0300
commit937e1c2e373e360fe47e455886d186492248f31f (patch)
tree1d68d301f3fc72bc9ea5609c8ac5f577218300b5 /lib
parent91763bbc611884c9e115b9f5dddde63f1d2c0dbc (diff)
Add workaround so rebar2 can use Elixir 1.12.0
Notice that Elixir 1.12.0 requires Erlang/OTP 21 or higher BTW, this workaround works only with rebar2... unfortunately rebar3 doesn't compile the elixir files from lib/
Diffstat (limited to 'lib')
-rw-r--r--lib/elixir.app.src11
-rw-r--r--lib/rebar.config21
2 files changed, 32 insertions, 0 deletions
diff --git a/lib/elixir.app.src b/lib/elixir.app.src
new file mode 100644
index 000000000..b53cbdefc
--- /dev/null
+++ b/lib/elixir.app.src
@@ -0,0 +1,11 @@
+{application, elixir,
+[{description, "elixir"},
+ {vsn, "1.12.0"},
+ {modules, [
+ elixir
+ ]},
+ {registered, [elixir_config, elixir_code_server]},
+ {applications, [kernel,stdlib,compiler]},
+ {mod, {elixir,[]}},
+ {env, [{ansi_enabled, false}]}
+]}.
diff --git a/lib/rebar.config b/lib/rebar.config
new file mode 100644
index 000000000..9154464fa
--- /dev/null
+++ b/lib/rebar.config
@@ -0,0 +1,21 @@
+%% Using Elixir as a Rebar dependency
+
+%% This configuration file only exists so Elixir can be used
+%% as a Rebar dependency, the same happens for the file
+%% src/elixir.app.src.
+
+%% In practice, Elixir is structured as OTP where many applications
+%% are placed in the lib directory. Since this structure is not
+%% supported by default by Rebar, after adding Elixir as a dependency
+%% you need to explicitly add it to lib_dirs:
+%%
+%% {lib_dirs, [
+%% "deps/elixir/lib"
+%% ]}.
+%%
+
+%% Run "make" as the proper compilation step
+{post_hooks, [{compile, "make compile"}]}.
+
+%% This prevents rebar_elixir_plugin from recompiling Elixir
+{ex_opts, [{src_dirs, [".PHONY"]}]}.