Host
Host OS: macOS 26.5.2
Host CPU: aarch64 (Apple Silicon)
zig version: 0.16.0
elixir -v: Elixir 1.20.3 (compiled with Erlang/OTP 29)
Burrito: 1.6.0 (Hex)
Target
Same as host.
src/erlang_launcher.zig passes -mode embedded to the emulator as a single argv element:
erl does not split argv elements, so init never recognizes the flag and the VM boots in interactive mode. #225 fixed exactly this class of bug for "-s elixir start_cli" and "-elixir ansi_enabled true" ("passing them as single strings caused..."), and #229 documents the 1.5.0 consequence of the joined -s — but -mode was missed.
Repro (no project needed)
$ erl "-mode embedded" -noshell -eval 'io:format("~p ~p~n",[code:get_mode(), init:get_argument(mode)]),halt().'
interactive error
$ erl -mode embedded -noshell -eval 'io:format("~p ~p~n",[code:get_mode(), init:get_argument(mode)]),halt().'
embedded {ok,[["embedded"]]}
Inside a Burrito 1.6.0 binary, :init.get_argument(:mode) returns :error and code:get_mode() returns :interactive.
Consequences
Releases silently lose embedded-mode semantics:
- Modules are loaded lazily instead of preloaded at boot, so
function_exported?/3 returns false for modules that haven't been called yet. We hit this as real user-visible misbehavior: a framework that gates optional callbacks on function_exported?/3 silently skipped an app's mount callback only inside the Burrito binary.
- The fail-fast guarantee of embedded mode (boot errors on missing modules) is lost.
Fix
Split the element:
Verified locally by patching deps/burrito: the flag is parsed and code:get_mode() returns :embedded.
Host
Host OS: macOS 26.5.2
Host CPU: aarch64 (Apple Silicon)
zig version:0.16.0elixir -v:Elixir 1.20.3 (compiled with Erlang/OTP 29)Burrito:
1.6.0(Hex)Target
Same as host.
src/erlang_launcher.zigpasses-mode embeddedto the emulator as a single argv element:"-mode embedded",erldoes not split argv elements, soinitnever recognizes the flag and the VM boots in interactive mode. #225 fixed exactly this class of bug for"-s elixir start_cli"and"-elixir ansi_enabled true"("passing them as single strings caused..."), and #229 documents the 1.5.0 consequence of the joined-s— but-modewas missed.Repro (no project needed)
Inside a Burrito 1.6.0 binary,
:init.get_argument(:mode)returns:errorandcode:get_mode()returns:interactive.Consequences
Releases silently lose embedded-mode semantics:
function_exported?/3returnsfalsefor modules that haven't been called yet. We hit this as real user-visible misbehavior: a framework that gates optional callbacks onfunction_exported?/3silently skipped an app'smountcallback only inside the Burrito binary.Fix
Split the element:
Verified locally by patching
deps/burrito: the flag is parsed andcode:get_mode()returns:embedded.