diff --git a/.github/workflows/docc.yml b/.github/workflows/docc.yml index 69b57d8..74a29ff 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' + run: xcodebuild docbuild -scheme Edit -derivedDataPath /tmp/docbuild -destination 'generic/platform=macOS' | xcbeautify - 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 02d02fa..806b92f 100644 --- a/Edit/Modules/Document/OpenPanelAccessoryViewController.swift +++ b/Edit/Modules/Document/OpenPanelAccessoryViewController.swift @@ -1,5 +1,4 @@ import AppKit -import MainOffender final class OpenPanelAccessoryViewController: NSViewController { private let hiddenFilesButton: NSButton @@ -51,7 +50,7 @@ final class OpenPanelAccessoryViewController: NSViewController { hiddenFilesButton.state = panel.showsHiddenFiles ? .on : .off kvoObservation = panel.observe(\.showsHiddenFiles, changeHandler: { [unowned self] (obj, _) in - MainActor.runUnsafely { + MainActor.assumeIsolated { self.hiddenFilesButton.state = obj.showsHiddenFiles ? .on : .off } }) diff --git a/Edit/Modules/Document/TextDocument.swift b/Edit/Modules/Document/TextDocument.swift index 4ce6c77..9d2daac 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.runUnsafely { + try MainActor.assumeIsolated { let config = state.context.configuration let theme = projectWindowController.theme let context = Theme.Context(window: projectWindowController.window) @@ -147,8 +147,10 @@ public final class TextDocument: ContainedDocument { public override var fileURL: URL? { didSet { // this can be set on a non-main thread - DispatchQueue.main.async { - self.state.update(url: self.fileURL) + DispatchQueue.main.asyncUnsafe { + MainActor.assumeIsolated { + self.state.update(url: self.fileURL) + } } } }