Skip to content

Allow opting into immediate UI aborts - #110

Merged
floitsch merged 1 commit into
cli-unwind-abortsfrom
cli-immediate-abort-ui
Aug 1, 2026
Merged

Allow opting into immediate UI aborts#110
floitsch merged 1 commit into
cli-unwind-abortsfrom
cli-immediate-abort-ui

Conversation

@floitsch

@floitschfloitsch commented Aug 1, 2026

Copy link
Copy Markdown
Member

Summary

  • Add an explicit --exit-on-abort policy to Ui constructors for callers that require legacy immediate termination.
  • Preserve or override that policy through Ui.with.
  • Document the escape hatch and verify in a subprocess that immediate mode exits with status 1 without unwinding the child finalizer.

The default remains unwind-safe.

Testing

  • make test — 16/16 passed

Stack created with GitHub Stacks CLIGive Feedback 💬

Comment threadsrc/ui.toit Outdated
constructor.from-args args/List:
return create-ui-from-args_ args
constructor.from-args args/List --exit-on-abort/bool=false:
return (create-ui-from-args_ args).with --exit-on-abort=exit-on-abort

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Give the 'exit-on-abort' to the create-ui-from-args_ function?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@floitsch
floitschforce-pushed the cli-immediate-abort-ui branch from 8c54342 to fa5db74CompareAugust 1, 2026 18:49
@floitsch
floitsch merged commit 8d7e0e2 into mainAug 1, 2026
7 checks passed
@floitsch
floitsch deleted the cli-immediate-abort-ui branch August 1, 2026 20:19
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@floitsch