Skip to content

Progressively migrate to strict concurrency - #1759

Merged
cyanzhong merged 1 commit into
mainfrom
develop
Sep 23, 2026
Merged

cyanzhong merged 1 commit into
mainfrom
develop

Conversation

@cyanzhong

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Critical build and concurrency issues, plus developer-specific signing settings, remain unresolved.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 3 High severity · 2 Medium severity

Open (5)
What changed in this PR

This pull request progressively migrates Swift code toward strict concurrency while expanding hosted tests, package schemes, generated bridges, and CI coverage.

Changes:

  • Adds Sendable conformances and @MainActor isolation.
  • Adds concurrency-focused tests and test schemes.
  • Updates code-generation templates, Xcode configuration, and CI.
File Summary
UpdateInstaller/​UpdaterCore/​Tests/​UpdaterCoreTests.swift Adds Swift Testing concurrency coverage.
UpdateInstaller/​UpdaterCore/​Sources/​InstallerArguments.swift Makes installer arguments Sendable.
UpdateInstaller/​UpdaterCore/​README.md Documents package test execution.
UpdateInstaller/​UpdaterCore/​.swiftpm/​xcode/​xcshareddata/​xcschemes/​UpdaterCoreTests.xcscheme Adds the UpdaterCore test scheme.
UpdateInstaller/​UpdaterCore/​.swiftpm/​xcode/​package.xcworkspace/​contents.xcworkspacedata Adds package workspace metadata.
UpdateInstaller/​main.swift Adjusts global isolation.
MarkEditMac/​Tests/​EditorDocumentTests.swift Adds hosted document tests. Critical (1 vote; lines 7 and 12): XCTestCase.setUp() must override with class, not static.
MarkEditMac/​Sources/​Updater/​AppVersion.swift Makes update models Sendable.
MarkEditMac/​Sources/​Updater/​AppUpdater.swift Main-actor isolates updater operations.
MarkEditMac/​Sources/​Panels/​Replace/​EditorReplaceButtons.swift Isolates UI constants.
MarkEditMac/​Sources/​Main/​AppRuntimeConfig.swift Makes configuration models Sendable.
MarkEditMac/​Sources/​Main/​AppPreferences.swift Isolates test preferences and closures.
MarkEditMac/​Sources/​Main/​Application/​Application.swift Adds hosted-test environment support.
MarkEditMac/​Sources/​Main/​Application/​AppDelegate.swift Bypasses normal lifecycle work during tests.
MarkEditMac/​Sources/​Main/​AppDocumentController.swift Prevents test document side effects.
MarkEditMac/​Sources/​Main/​AppCustomization.swift Redirects test customization files and preferences.
MarkEditMac/​Sources/​Editor/​Views/​EditorStatusView.swift Isolates UI constants.
MarkEditMac/​Sources/​Editor/​Models/​EditorDocument.swift Uses isolated preferences and sendable closures.
MarkEditMac/​Sources/​Editor/​EditorHistoryStorage.swift Main-actor isolates history storage.
MarkEditMac/​Sources/​Editor/​Controllers/​EditorViewController+UI.swift Updates deferred UI isolation.
MarkEditMac/​Modules/​Tests/​RuntimeTests.swift Uses async test delays.
MarkEditMac/​Modules/​Tests/​MaterialViewTests.swift Uses async material realization tests.
MarkEditMac/​Modules/​Sources/​TextCompletion/​Unchecked.swift Removes obsolete unchecked conformance.
MarkEditMac/​Modules/​Sources/​TextCompletion/​TextCompletionContext.swift Main-actor isolates completion context.
MarkEditMac/​Modules/​Sources/​TextCompletion/​Internal/​TextCompletionView.swift Main-actor isolates the completion view.
MarkEditMac/​Modules/​Sources/​TextCompletion/​Internal/​TextCompletionState.swift Main-actor isolates observable state.
MarkEditMac/​Modules/​Sources/​TextCompletion/​Internal/​TextCompletionPanel.swift Updates completion callback isolation.
MarkEditMac/​Modules/​Sources/​Statistics/​Views/​StatisticsView.swift Main-actor isolates the statistics view.
MarkEditMac/​Modules/​Sources/​Statistics/​StatisticsResult.swift Makes statistics results Sendable.
MarkEditMac/​Modules/​Sources/​Statistics/​StatisticsController.swift Main-actor isolates statistics UI. Critical (1 vote; lines 78–95): snapshot sendable inputs before Task.detached and perform UI updates on the main actor.
MarkEditMac/​Modules/​Sources/​Previewer/​Unchecked.swift Removes obsolete WebKit unchecked conformance.
MarkEditMac/​Modules/​Sources/​FontPicker/​Internal/​FontManagerDelegate.swift Updates font callback isolation.
MarkEditMac/​Modules/​Sources/​FontPicker/​FontPickerHandlers.swift Main-actor isolates font handlers.
MarkEditMac/​Modules/​Sources/​FontPicker/​FontPicker.swift Main-actor isolates the font picker.
MarkEditMac/​Modules/​Sources/​FileVersion/​FileVersionPicker.swift Main-actor isolates file-version UI.
MarkEditMac/​Modules/​Sources/​AppKitExtensions/​UI/​NSColor+Extension.swift Documents actor assumptions.
MarkEditMac/​Modules/​Sources/​AppKitExtensions/​Foundation/​RunLoop+Extension.swift Documents main-run-loop scheduling.
MarkEditMac/​Modules/​.swiftpm/​xcode/​xcshareddata/​xcschemes/​ModulesTests.xcscheme Adds the Modules test scheme.
MarkEditKit/​Tests/​TokenizerTests.swift Adds tokenizer concurrency tests.
MarkEditKit/​Tests/​FoundationModelsConcurrencyTests.swift Tests asynchronous model callbacks.
MarkEditKit/​Tests/​FileVersionConcurrencyTests.swift Tests file-version async operations.
MarkEditKit/​Tests/​EditorTextEncodingTests.swift Tests encoding across child tasks.
MarkEditKit/​Sources/​EditorTextEncoding.swift Makes encodings Sendable.
MarkEditKit/​Sources/​EditorMessageHandler.swift Main-actor isolates the bridge handler.
MarkEditKit/​Sources/​Bridge/​Web/​Generated/​WebBridgeTableOfContents.swift Makes generated payloads Sendable.
MarkEditKit/​Sources/​Bridge/​Web/​Generated/​WebBridgeSelection.swift Makes generated payloads Sendable.
MarkEditKit/​Sources/​Bridge/​Web/​Generated/​WebBridgeSearch.swift Makes generated payloads Sendable.
MarkEditKit/​Sources/​Bridge/​Web/​Generated/​WebBridgeLineEndings.swift Makes generated enums Sendable.
MarkEditKit/​Sources/​Bridge/​Web/​Generated/​WebBridgeFoundationModels.swift Makes generated payloads Sendable.
MarkEditKit/​Sources/​Bridge/​Web/​Generated/​WebBridgeFormat.swift Makes generated enums Sendable.
MarkEditKit/​Sources/​Bridge/​Web/​Generated/​WebBridgeCore.swift Makes generated payloads Sendable.
MarkEditKit/​Sources/​Bridge/​Web/​Generated/​WebBridgeConfig.swift Makes generated enums Sendable.
MarkEditKit/​Sources/​Bridge/​Web/​Generated/​WebBridgeAPI.swift Makes generated payloads Sendable.
MarkEditKit/​Sources/​Bridge/​Native/​Modules/​EditorModuleTranslation.swift Main-actor isolates translation.
MarkEditKit/​Sources/​Bridge/​Native/​Modules/​EditorModuleTokenizer.swift Main-actor isolates tokenization.
MarkEditKit/​Sources/​Bridge/​Native/​Modules/​EditorModuleFoundationModels.swift Main-actor isolates model access.
MarkEditKit/​Sources/​Bridge/​Native/​Modules/​EditorModuleCore.swift Main-actor isolates core module access.
MarkEditKit/​Sources/​Bridge/​Native/​Modules/​EditorModuleCompletion.swift Main-actor isolates completion.
MarkEditKit/​Sources/​Bridge/​Native/​Modules/​EditorModuleAPI.swift Main-actor isolates API access.
MarkEditKit/​Sources/​Bridge/​Native/​Generated/​NativeModuleFoundationModels.swift Makes options Sendable.
MarkEditKit/​Sources/​Bridge/​Native/​Generated/​NativeModuleCore.swift Makes generated payloads Sendable.
MarkEditKit/​Sources/​Bridge/​Native/​Generated/​NativeModuleAPI.swift Makes generated payloads Sendable.
MarkEditKit/​Package.swift Adds the MarkEditKit test target. Critical (2 votes; line 33): add MarkEditCore as a test-target dependency because TokenizerTests.swift imports it directly.
MarkEditKit/​.swiftpm/​xcode/​xcshareddata/​xcschemes/​MarkEditKitTests.xcscheme Adds the MarkEditKit test scheme.
MarkEditCore/​Sources/​Extensions/​WebKit+Extension.swift Main-actor isolates WebKit SPI.
MarkEditCore/​Sources/​EditorSharedTypes.swift Makes shared types Sendable.
MarkEditCore/​Sources/​EditorLocalizable.swift Makes localization data Sendable.
MarkEditCore/​Sources/​EditorImageLoader.swift Main-actor isolates image loading.
MarkEditCore/​Sources/​EditorConfig.swift Makes editor configuration Sendable.
MarkEditCore/​.swiftpm/​xcode/​xcshareddata/​xcschemes/​MarkEditCoreTests.xcscheme Adds the MarkEditCore test scheme.
MarkEdit.xcodeproj/​xcshareddata/​xcschemes/​MarkEditMac.xcscheme Configures hosted Mac tests.
MarkEdit.xcodeproj/​project.pbxproj Adds the hosted test target. Moderate (3 votes; line 1169): Debug hard-codes a developer signing team, overriding Build.xcconfig:14. Moderate (3 votes; line 1243): Release has the same developer-specific team ID; both should retain the inherited or empty setting.
CoreEditor/​src/​@codegen/​swift-native-module.mustache Generates Sendable native payloads.
CoreEditor/​src/​@codegen/​swift-named-type.mustache Generates Sendable named types.
CoreEditor/​src/​@codegen/​swift-config.mustache Generates Sendable configurations.
CoreEditor/​src/​@codegen/​README.md Documents bridge concurrency requirements.
Build.xcconfig Disables coverage by default.
.github/​workflows/​build-and-test.yml Runs the expanded test suites in CI.
Files not reviewed (1)
  • UpdateInstaller/UpdaterCore/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread MarkEditKit/Package.swift Outdated
Comment thread MarkEditMac/Modules/Sources/Statistics/StatisticsController.swift
Comment thread MarkEditMac/Tests/EditorDocumentTests.swift
Comment thread MarkEdit.xcodeproj/project.pbxproj Outdated
Comment thread MarkEdit.xcodeproj/project.pbxproj Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Two moderate concurrency issues remain unresolved.

Review effort: Lite
Findings: None

Resolved since last review (5)
Files not reviewed (1)
  • UpdateInstaller/UpdaterCore/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata: Generated file

@cyanzhong
cyanzhong merged commit 130eb0f into main Sep 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants