Skip to content

Terminal: Rework type#692

Open
dcantah wants to merge 1 commit intoapple:mainfrom
dcantah:term-rework
Open

Terminal: Rework type#692
dcantah wants to merge 1 commit intoapple:mainfrom
dcantah:term-rework

Conversation

@dcantah
Copy link
Copy Markdown
Member

@dcantah dcantah commented Apr 20, 2026

To try and purge Foundation from the Linux builds I've been making the rounds on our types. This one is a breaking change, but I'd been wanting to do this for ages. Terminal (to me) should be as lightweight as possible and not be tied to any FileHandle semantics. I think we should expose the raw fd, but exposing a handle parameter was always a bit odd to me. This change:

  • Gets rid of the handle var.
  • Keeps Terminal a value type, so if you did want some double close protection or synchronization on the type you can decide to wrap it if you need to.
  • Exposes a fileDescriptor public var.
  • Adds unit tests for Terminal finally..

To try and purge Foundation from the Linux builds I've been making
the rounds on our types. This one is a breaking change, but I'd been
wanting to do this for ages. `Terminal` (to me) should be as lightweight
as possible and not be tied to any `FileHandle` semantics. I think we
should expose the raw fd, but exposing a handle parameter was always
a bit odd to me. This change:

- Gets rid of the `handle` var.
- Keeps `Terminal` a value type, so if you did want some double close
protection or synchronization on the type you can decide to wrap it
if you need to.
- Exposes a `fileDescriptor` public var.
- Adds unit tests for Terminal finally..
@dcantah dcantah marked this pull request as ready for review April 23, 2026 20:17
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