Skip to content

Commit 28b1bd1

Browse files
committed
Document the :language setting
1 parent 0a92931 commit 28b1bd1

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

lib/mix/lib/mix/project.ex

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ defmodule Mix.Project do
1111
1212
def project do
1313
[app: :my_app,
14-
vsn: "0.6.0"]
14+
version: "0.6.0"]
1515
end
1616
end
1717
@@ -24,6 +24,16 @@ defmodule Mix.Project do
2424
function in the project, the developer can call `Mix.Project.get!/0`
2525
which fails with `Mix.NoProjectError` in case a project is not
2626
defined.
27+
28+
## Erlang projects
29+
30+
Mix can be used to manage Erlang projects that don't have any Elixir code. To
31+
ensure mix tasks work correctly for an Erlang project, `language: :erlang`
32+
has to be added to `project`.
33+
34+
The setting also makes sure Elixir is not added as a dependency to the
35+
generated .app file or to the escript generated with `mix escript.build`,
36+
etc.
2737
"""
2838

2939
@doc false

lib/mix/lib/mix/tasks/escript.build.ex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ defmodule Mix.Tasks.Escript.Build do
5656
* `:emu_args` - emulator arguments to embed in the escript file.
5757
Defaults to `""`.
5858
59+
There is one project-level option that affects how the escript is generated:
60+
61+
* `language: :elixir | :erlang` - set it to `:erlang` for Erlang projects
62+
managed by mix. Doing so will ensure Elixir is not embedded by default.
63+
Your app will still be started as part of escript loading, with the
64+
config used during build.
65+
5966
## Example
6067
6168
defmodule MyApp.Mixfile do

0 commit comments

Comments
 (0)