Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 May 2022 16:01:43 +0000
From:      bugzilla-noreply@freebsd.org
To:        erlang@FreeBSD.org
Subject:   maintainer-feedback requested: [Bug 264046] lang/elixir-devel: doesn't produce self-contained mix releases
Message-ID:  <bug-264046-38768-CbhxPjLA8Z@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-264046-38768@https.bugs.freebsd.org/bugzilla/>
References:  <bug-264046-38768@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
Bugzilla Automation <bugzilla@FreeBSD.org> has asked freebsd-erlang (Nobody)
<erlang@FreeBSD.org> for maintainer-feedback:
Bug 264046: lang/elixir-devel: doesn't produce self-contained mix releases
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264046



--- Description ---
Problem: lang/elixir-devel produces mix releases that require an Erlang run=
time
to be installed. This occurs because it patches the `elixir` startup script=
 to
replace ERTS_BIN. It specifies a path that's hard-coded to a file in the
lang/erlang-runtime* that was used to build elixir, as described in
https://lists.freebsd.org/archives/freebsd-erlang/2022-May/000629.html

---

Goal: Build a mix release, and then run it on a FreeBSD system with no Erla=
ng
or Elixir runtime.

>From mix release docs:
https://hexdocs.pm/mix/Mix.Tasks.Release.html#module-why-releases

> Self-contained. A release does not require the source code to be included=
 in
your production artifacts. All of the code is precompiled and packaged.
Releases do not even require Erlang or Elixir in your servers, as it includ=
es
the Erlang VM and its runtime by default. Furthermore, both Erlang and Elix=
ir
standard libraries are stripped to bring only the parts you are actually us=
ing.

In other words, you should be able to:

pkg install -y elixir-devel
mix new my_app
cd my_app && mix release
pkg remove -y elixir-devel
pkg autoremove -y
./_build/dev/rel/my_app/bin/my_app start_iex

---

What happens: `exec: /usr/local/lib/erlang24/bin/erl: not found`

What should happen: an IEX console



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-264046-38768-CbhxPjLA8Z>