summaryrefslogtreecommitdiff
path: root/Hutch/Views/Repositories
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-08-07 17:11:52 -0500
committerChristian Cleberg <[email protected]>2026-08-07 17:11:52 -0500
commitb2a1265cadccc34cbdab71b9ed638b908cac9f62 (patch)
tree5f8c64d535883f0487d4f8ba1f71291835e64fcb /Hutch/Views/Repositories
parent9d85bc7c154843693913bf0cc67c6e9ff0d8f897 (diff)
downloadhutch-b2a1265cadccc34cbdab71b9ed638b908cac9f62.tar.gz
hutch-b2a1265cadccc34cbdab71b9ed638b908cac9f62.tar.bz2
hutch-b2a1265cadccc34cbdab71b9ed638b908cac9f62.zip
Fix Swift 6-mode isolation and attribute warnings
Under SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor these are warnings in Swift 5 mode and errors in Swift 6 mode: - Drop @retroactive from 'extension LookupType: AppEnum'; LookupType is declared in this module, so the attribute never applied. - Mark SyntaxHighlightTheme and SyntaxHighlighter nonisolated. They were inferred @MainActor but are built and used from the nonisolated markdown renderers in Task.detached; nonisolated makes the off-main confinement correct (Highlightr's JSContext was being driven off the main actor).
Diffstat (limited to 'Hutch/Views/Repositories')
-rw-r--r--Hutch/Views/Repositories/SyntaxHighlighter.swift4
1 files changed, 2 insertions, 2 deletions
diff --git a/Hutch/Views/Repositories/SyntaxHighlighter.swift b/Hutch/Views/Repositories/SyntaxHighlighter.swift
index 5ae8f58..f8b2cbb 100644
--- a/Hutch/Views/Repositories/SyntaxHighlighter.swift
+++ b/Hutch/Views/Repositories/SyntaxHighlighter.swift
@@ -3,7 +3,7 @@ import Highlightr
import SwiftUI
import UIKit
-enum SyntaxHighlightTheme {
+nonisolated enum SyntaxHighlightTheme {
case light
case dark
@@ -31,7 +31,7 @@ enum SyntaxHighlightTheme {
/// instance must stay on the thread/task that created it. Callers that fail to
/// resolve a language — or hit an unavailable engine — get `nil` and should
/// fall back to plain, escaped text.
-final class SyntaxHighlighter {
+nonisolated final class SyntaxHighlighter {
private let highlightr: Highlightr?
private let supportedLanguages: Set<String>