Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5683aa36a | ||
|
|
707455dcfb | ||
|
|
17ee5d6717 | ||
|
|
2295bcdbae | ||
|
|
c9bff50a1a | ||
|
|
1b3d3dd821 | ||
|
|
55dee0f0cd | ||
|
|
45fd2b988f |
@@ -5,7 +5,10 @@ let package = Package(
|
||||
name: "ICCeryCore",
|
||||
platforms: [.macOS(.v12)],
|
||||
products: [
|
||||
.library(name: "ICCeryCore", targets: ["ICCeryCore"]),
|
||||
// Static so app + test bundles each link ICCeryCore directly —
|
||||
// a dynamic package product framework is not embedded in the
|
||||
// .app and dyld kills the app at launch on macOS 12 (#117).
|
||||
.library(name: "ICCeryCore", type: .static, targets: ["ICCeryCore"]),
|
||||
],
|
||||
targets: [
|
||||
.target(name: "ICCeryCore"),
|
||||
|
||||
@@ -110,7 +110,8 @@ final class PrintSessionViewModel: ObservableObject {
|
||||
isPrinting = true
|
||||
let task = Task { @MainActor [weak self] in
|
||||
guard let self else { return }
|
||||
defer { self.printTask = nil }
|
||||
// `defer` cannot mutate isolated state under Swift 5.7
|
||||
// (Xcode 14.2 / macOS 12 runner), so clear explicitly (#113).
|
||||
var printed = 0
|
||||
for page in result.pages {
|
||||
do {
|
||||
@@ -123,6 +124,7 @@ final class PrintSessionViewModel: ObservableObject {
|
||||
+ error.localizedDescription
|
||||
)
|
||||
isPrinting = false
|
||||
self.printTask = nil
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -132,6 +134,7 @@ final class PrintSessionViewModel: ObservableObject {
|
||||
autoHideAfter: nil
|
||||
)
|
||||
isPrinting = false
|
||||
self.printTask = nil
|
||||
}
|
||||
printTask = task
|
||||
}
|
||||
@@ -141,7 +144,6 @@ final class PrintSessionViewModel: ObservableObject {
|
||||
isPrinting = true
|
||||
let task = Task { @MainActor [weak self] in
|
||||
guard let self else { return }
|
||||
defer { self.printTask = nil }
|
||||
do {
|
||||
try await spool(page, index: page.index, pageSize: pageSize)
|
||||
printNotice = Notice(
|
||||
@@ -156,6 +158,7 @@ final class PrintSessionViewModel: ObservableObject {
|
||||
)
|
||||
}
|
||||
isPrinting = false
|
||||
self.printTask = nil
|
||||
}
|
||||
printTask = task
|
||||
}
|
||||
|
||||
@@ -138,6 +138,9 @@ struct Stage4View: View {
|
||||
.textFieldStyle(.roundedBorder)
|
||||
.accessibilityIdentifier("colprofCopyright")
|
||||
|
||||
// Nested VStack keeps the parent at the Swift 5.7 ViewBuilder
|
||||
// 10-child limit (Xcode 14.2 / macOS 12 CI runner, #111).
|
||||
VStack(alignment: .leading, spacing: 12) {
|
||||
Toggle("Apply calibration curve", isOn: $model.applyCalibration)
|
||||
.accessibilityIdentifier("colprofApplyCalibration")
|
||||
|
||||
@@ -151,6 +154,7 @@ struct Stage4View: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(16)
|
||||
.background(Theme.panel)
|
||||
}
|
||||
|
||||
@@ -21,7 +21,9 @@ final class ProcessRunSupportTests: XCTestCase {
|
||||
setRunning: { running.append($0) },
|
||||
resetLog: { resets += 1 },
|
||||
onLog: { batch in
|
||||
MainActor.assertIsolated()
|
||||
// MainActor.assertIsolated() needs Swift 5.9; the runner is
|
||||
// on Xcode 14.2 (Swift 5.7) (#115).
|
||||
XCTAssertTrue(Thread.isMainThread)
|
||||
received.append(contentsOf: batch)
|
||||
}
|
||||
) { onLog in
|
||||
|
||||
Reference in New Issue
Block a user