Keep :erts in release applications without colliding with the ERTS copy - #15935
Merged
Merged
Conversation
bea1c6c removed :erts from release.applications to avoid the copy race in elixir-lang#14236, but :erts stays in the boot modes, so any release where an application lists :erts (for example a dependency on horus) now fails with "Unknown application :erts". Keep :erts in release.applications and tag application copies as {:app, app}, so an application named :erts no longer dispatches to the ERTS binaries copy step.
josevalim
reviewed
Sep 23, 2026
josevalim
reviewed
Sep 23, 2026
Co-authored-by: José Valim <jose.valim@gmail.com>
Member
|
💚 💙 💜 💛 ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #15934.
bea1c6c (for #14236) removed
:ertsfromrelease.applications, but:ertsstays in the boot modes. So any release where an application lists:erts(for example a dependency on horus, used by khepri) fails withUnknown application :erts.#14236 itself came from a name collision in
Mix.Tasks.Release.assemble/1: the application:ertswas dispatched tocopy(:erts, release), the ERTS binaries step. That rancopy_erts/1twice concurrently and never copiedlib/erts-VSN. This PR keeps:ertsinrelease.applicationsand tags application copies as{:app, app}, so the two can no longer collide.Tests:
Mix.ReleaseTest: the unit test added in bea1c6c now asserts:ertsis present when requested.Mix.Tasks.ReleaseTest: new test that assembles and boots a release withapplications: [erts: :permanent], and asserts botherts-VSN/bin/erlandlib/erts-VSN/ebin/erts.app. It fails onmainwithUnknown application :ertsand passes with this change.Also checked outside the suite on OTP 28.4.3: a project depending on
{:horus, "0.3.1"}assembles and boots with this change (Application.ensure_all_started(:horus)returns{:ok, [:erts, :tools, :horus]}).