Skip to content

Report killed evals as errors and show UTF-8 as text - #5

Merged
bbatsov merged 4 commits into
mainfrom
dialtone-fixes
Nov 7, 2026
Merged

bbatsov merged 4 commits into
mainfrom
dialtone-fixes

Conversation

@bbatsov

@bbatsov bbatsov commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

An eval whose worker got killed by anything other than an interrupt (e.g. exit(self(), kill)) came back as interrupted, as if the client had stopped it. And bin/dialtone showed <<"здравей"/utf8>> as a list of bytes, since ~tp prints UTF-8 as text only with +pc unicode. An embedded server keeps whatever its node uses.

The forms before one that fails keep their bindings now, as they would in the shell, where each form is a line of its own.

A worker that died with reason killed was always answered with
interrupted, so an eval that ran exit(self(), kill), or got killed by
something else on the node, looked as if the client had interrupted it.
The session now remembers that it killed the worker for an interrupt,
and any other kill is an eval-error.
Values go through ~tp, which prints <<"здравей"/utf8>> as a list of
bytes unless the node runs with +pc unicode. bin/dialtone owns its
node, so it turns that on. An embedded server keeps the node's setting.
A worker that died of something else just before an interrupt reached
it, with its DOWN still on its way, was answered with interrupted, so
its error got lost.
When a later form in an eval failed, the session went back to its state
from before the eval, so `X = 1. error(boom).` left X unbound, although
the client had already seen its value. In the shell each form is a line
of its own, and X would stay. Now the forms that ran keep their
bindings.
@bbatsov
bbatsov merged commit 6f392df into main Nov 7, 2026
10 checks passed
@bbatsov
bbatsov deleted the dialtone-fixes branch November 7, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant