From 2895108a9ef4d640d7a9bb8f3dbf42e8680742e4 Mon Sep 17 00:00:00 2001 From: Matt <85322+mattmassicotte@users.noreply.github.com> Date: Thu, 21 Mar 2024 14:00:28 -0400 Subject: [PATCH] Attempt to restore Xcode 15.2 builds... --- .github/workflows/docc.yml | 2 +- .../Document/OpenPanelAccessoryViewController.swift | 3 ++- Edit/Modules/Document/TextDocument.swift | 8 +++----- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docc.yml b/.github/workflows/docc.yml index 74a29ff..69b57d8 100644 --- a/.github/workflows/docc.yml +++ b/.github/workflows/docc.yml @@ -45,7 +45,7 @@ jobs: echo "DEVELOPMENT_TEAM = $DEVELOPMENT_TEAM" >> User.xcconfig echo "BUNDLE_ID_PREFIX = com.chimehq" >> User.xcconfig - name: Build DocC - run: xcodebuild docbuild -scheme Edit -derivedDataPath /tmp/docbuild -destination 'generic/platform=macOS' | xcbeautify + run: xcodebuild docbuild -scheme Edit -derivedDataPath /tmp/docbuild -destination 'generic/platform=macOS' - name: Process Archive run: xcrun docc process-archive transform-for-static-hosting /tmp/docbuild/Build/Products/Debug/Chime.doccarchive --output-path docs --hosting-base-path 'Chime' - name: Add Redirect diff --git a/Edit/Modules/Document/OpenPanelAccessoryViewController.swift b/Edit/Modules/Document/OpenPanelAccessoryViewController.swift index 806b92f..02d02fa 100644 --- a/Edit/Modules/Document/OpenPanelAccessoryViewController.swift +++ b/Edit/Modules/Document/OpenPanelAccessoryViewController.swift @@ -1,4 +1,5 @@ import AppKit +import MainOffender final class OpenPanelAccessoryViewController: NSViewController { private let hiddenFilesButton: NSButton @@ -50,7 +51,7 @@ final class OpenPanelAccessoryViewController: NSViewController { hiddenFilesButton.state = panel.showsHiddenFiles ? .on : .off kvoObservation = panel.observe(\.showsHiddenFiles, changeHandler: { [unowned self] (obj, _) in - MainActor.assumeIsolated { + MainActor.runUnsafely { self.hiddenFilesButton.state = obj.showsHiddenFiles ? .on : .off } }) diff --git a/Edit/Modules/Document/TextDocument.swift b/Edit/Modules/Document/TextDocument.swift index 9d2daac..4ce6c77 100644 --- a/Edit/Modules/Document/TextDocument.swift +++ b/Edit/Modules/Document/TextDocument.swift @@ -108,7 +108,7 @@ public final class TextDocument: ContainedDocument { } public override func read(from url: URL, ofType typeName: String) throws { - try MainActor.assumeIsolated { + try MainActor.runUnsafely { let config = state.context.configuration let theme = projectWindowController.theme let context = Theme.Context(window: projectWindowController.window) @@ -147,10 +147,8 @@ public final class TextDocument: ContainedDocument { public override var fileURL: URL? { didSet { // this can be set on a non-main thread - DispatchQueue.main.asyncUnsafe { - MainActor.assumeIsolated { - self.state.update(url: self.fileURL) - } + DispatchQueue.main.async { + self.state.update(url: self.fileURL) } } }