tart/Sources/tart
Tor Arne Vestbø 0a01a4430c
Fix build warnings (#1262)
* Use let for the immutable disk image storage attachment

* Don't bind the unused error when catching connection-pool failures

* Report errors thrown inside tart run's fire-and-forget tasks

We were discarding any error thrown inside these unstructured tasks,
which silently hid failures to run the control socket or to start and
stop the VM, and which the compiler now warns about.

Wrap them in an ErrorReportingTask, which spawns the task and reports
any thrown error to stderr, rather than repeating a do/catch at every
call site. An unstructured task spawned from a synchronous context (a
signal handler or SwiftUI action) has no parent to propagate the error
to, so reporting it is the best we can do.

* Avoid blocking SwiftNIO calls in async guest agent connections

The gRPC channel setup in "tart exec" and the MAC address resolver
created a dedicated event loop group and tore both it and the channel
down with the blocking syncShutdownGracefully() and wait(), which are
unavailable from async contexts (the former is an error in the Swift 6
language mode).

Factor the connection out into a withGuestAgentChannel() helper that
uses the process-wide singleton event loop group, so there is no group
to shut down, and closes the channel with the async close().get().
2026-06-09 15:29:19 -07:00
..
CI Sentry integration (#352) 2022-12-15 13:50:21 +00:00
Commands Fix build warnings (#1262) 2026-06-09 15:29:19 -07:00
Credentials StdinCredentials: increase maxCharacters to 8,192 (#1203) 2026-02-23 18:55:52 +01:00
DeviceInfo Set User-Agent header for OCI HTTP requests (#478) 2023-04-28 18:02:57 +04:00
Formatter Suspend/resume support (#527) 2023-07-06 18:04:39 +00:00
Logging Avoid duplicate progress updates in CI logs (#1140) 2025-09-29 15:57:39 +04:00
MACAddressResolver Fix build warnings (#1262) 2026-06-09 15:29:19 -07:00
Network Fixed Swift Warning (#787) 2024-04-11 19:53:10 +04:00
OCI Remove disk v1 support (#1204) 2026-02-25 14:34:25 +00:00
Passphrase Reformat code idents and introduce the SwiftFormat linter (#339) 2022-11-29 15:56:13 +00:00
Platform tart set: support optional "pt" and "px" units for "--display" argument (#1155) 2025-10-21 21:35:42 -04:00
ShellCompletions Upgrade Swift Argument Parser to 1.6.1 (#1103) 2025-07-08 00:19:50 +04:00
VNC tart run: resolve VM's IP using ARP when using --net-bridged and --vnc (#811) 2024-05-02 18:04:26 +04:00
Config.swift Validate custom TART_HOME and provide a human-friendly error message (#1138) 2025-09-25 20:44:57 +04:00
ControlSocket.swift Bind and connect to Unix domain sockets using relative paths (#1192) 2026-02-05 15:51:14 +01:00
DiskImageFormat.swift ASIF is available only starting from macOS 26 (Tahoe) (#1096) 2025-09-14 09:40:06 -04:00
Diskutil.swift Refactor "diskutil create" and "diskutil info" into a separate class (#1172) 2026-01-22 13:00:27 +01:00
Fetcher.swift Registry: limit the text output on unexpected status code (#981) 2024-12-20 11:55:08 +04:00
FileLock.swift Reformat code idents and introduce the SwiftFormat linter (#339) 2022-11-29 15:56:13 +00:00
GuestAgentChannel.swift Fix build warnings (#1262) 2026-06-09 15:29:19 -07:00
IPSWCache.swift Reformat code idents and introduce the SwiftFormat linter (#339) 2022-11-29 15:56:13 +00:00
LocalLayerCache.swift Optimize DiskV2 Deduplication (#878) 2024-08-05 12:24:31 -04:00
OTel.swift OpenTelemetry: set default resources, service.name and service.version (#1184) 2026-01-27 16:17:05 +01:00
PIDLock.swift tart delete: return human-friendly error when local VM doesn't exist (#910) 2024-09-26 14:45:14 +04:00
Prunable.swift Show both size and actual size of files (#742) 2024-02-27 20:13:38 +04:00
Root.swift Don't run the AppKit run loop nested in Swift's async main (#1260) 2026-06-09 09:53:06 -07:00
Serial.swift Reformatted Serial.swift 2023-03-16 10:22:27 -04:00
Term.swift Introduce "tart exec" command as an alternative to SSH (#1074) 2025-05-22 17:28:14 +04:00
URL+AccessDate.swift utimes(2): use errno to explain the error (#931) 2024-10-31 16:33:03 -04:00
URL+Prunable.swift Optimize DiskV2 Deduplication (#878) 2024-08-05 12:24:31 -04:00
Utils.swift Fix build warnings (#1262) 2026-06-09 15:29:19 -07:00
VM+Recovery.swift Use MainActor to ensure we're running on main queue (#515) 2023-06-07 15:06:33 +04:00
VM.swift Fix build warnings (#1262) 2026-06-09 15:29:19 -07:00
VMConfig.swift tart set: support optional "pt" and "px" units for "--display" argument (#1155) 2025-10-21 21:35:42 -04:00
VMDirectory+Archive.swift tart import: fix import failing due to SIGBUS (#458) 2023-03-30 15:52:48 +04:00
VMDirectory+OCI.swift Remove disk v1 support (#1204) 2026-02-25 14:34:25 +00:00
VMDirectory.swift Bind and connect to Unix domain sockets using relative paths (#1192) 2026-02-05 15:51:14 +01:00
VMStorageHelper.swift Remove disk v1 support (#1204) 2026-02-25 14:34:25 +00:00
VMStorageLocal.swift Validate custom TART_HOME and provide a human-friendly error message (#1138) 2025-09-25 20:44:57 +04:00
VMStorageOCI.swift Switch to OpenTelemetry (#1179) 2026-01-23 12:04:21 +01:00