macos: enable host-driven BEAM restart in host-first bundle - #18
Merged
Conversation
Set the new [lifetime] INI keys (restart_beam, restart_max_attempts, restart_backoff_ms) when packaging the host-first DesktopWebView app. This activates the native host's child-exit watcher that replaces heart as the BEAM restart mechanism. Pairs with elixir-desktop/webview PR #4 which adds the watcher and keys. The Erlang release generated by this packaging does not need -heart; the host is the long-lived process. Co-Authored-By: Claude <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
dominicletz
added a commit
that referenced
this pull request
Aug 10, 2026
The host-driven BEAM restart commit (#18) introduced a `case` clause in `Desktop.Deployment.Package.MacOS.release/1` that the current formatter rewrites with blank lines between branches. The CI `mix lint` alias runs `format --check-formatted`, which has been failing on main since #18. Reformat the `case` so the file passes the formatter check. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Set the new
[lifetime]INI keys (restart_beam,restart_max_attempts,restart_backoff_ms) when packaging the host-first macOS DesktopWebView bundle. This activates the native host's child-exit watcher added in elixir-desktop/webview#4 so the host (notheart) drives BEAM restart.The host-first layout makes the native process the long-lived one, which inverts the heart model. With these settings the host watches the BEAM child, applies an exponential backoff, and respawns.
system.prepare_quitfrom Elixir still suppresses respawn during a user-initiated quit.The Erlang release generated by this packaging does not need
-heart; the release script can run BEAM directly and the host takes care of restarts.Test plan
Desktop.Deployment.Package.MacOS; verify generatedDesktopWebView.inicontains the three new keys in[lifetime]