Repository navigation
Clear the build warnings - #31
Merged
Merged
Conversation
- ProjectImport runs on the main actor, as NSOpenPanel requires. - The undo registration says it runs on the main actor, which owns the undo manager. Marking all of EditorModel would break opening documents, which SwiftUI may do off the main thread. - A track role the validator read but never used is gone, and xattr names are decoded without the deprecated String(cString:). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Xcode Cloud reported 16 warnings on build 32. They were all still on
main, and this clears them. No behavior changes.ContentView.swift:ProjectImportis@MainActor.NSOpenPanelis main-actor-only, and the import button is the only caller. This clears 8 warnings.EditorModel.swift: undo registration runs inMainActor.assumeIsolated.UndoManagerbelongs to the main actor, and every edit comes from the UI. This clears 6 warnings.@MainActor. That breaksPatternautDocument.init(configuration:), which SwiftUI may call off the main thread.guard let undoManagercomes first, so a model with no undo manager yet, such as during document open, never reaches the assertion.Validation.swift: removed arolethat was read and never used.ProjectBundleWriter.swift: xattr names are decoded withString(decoding:as:)instead of the deprecatedString(cString:).How to test
swift buildinPatternautCorehas 0.cd PatternautCore && swift test: 162 tests pass..patternautdocument;Checklist
cd PatternautCore && swift test)App/project.ymlor sources changed (no new files)🤖 Generated with Claude Code