iAvro swift migration - #3
Open
aumi-sudo wants to merge 8 commits into
Open
Conversation
- Update Xcode 4-era project settings to current recommendations (removes ZERO_LINK, GCC_MODEL_TUNING and other obsolete settings) - Relink sqlite3 and icucore as SDK .tbd stubs; the old absolute /usr/lib dylib paths no longer exist on modern macOS - Set minimum deployment target to macOS 11.0, sign to run locally - Migrate localized resources from English.lproj to Base/en.lproj - Move bundle identifier into PRODUCT_BUNDLE_IDENTIFIER build setting Source code needed no changes; builds as a universal (arm64 + x86_64) input method and verified working on Apple Silicon. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add Swift ports of the transliteration engine: AvroParser and RegexParser (shared PatternTableParser base), AutoCorrect, Database (SQLite3 module instead of FMDatabase), CacheManager, and Suggestion (with Levenshtein folded in). Objective-C call sites now import the generated Avro_Keyboard-Swift.h header. Not yet buildable: the old .h/.m engine files still need to be removed from the Xcode target and the .swift files added (Xcode UI step), after which FMDatabase and NSString+Levenshtein go away entirely. RegexKitLite stays until batch 2 (controller migration). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Remove old Objective-C engine (AvroParser, RegexParser, AutoCorrect, Database, CacheManager, Suggestion) plus FMDatabase and NSString+Levenshtein from the target - Mark Swift singletons @unchecked Sendable for Swift 6 language mode (same main-thread usage as the original code) - Mark ObjC-facing classes and methods public so they appear in the generated Avro_Keyboard-Swift.h (no bridging header in this target) Verified via code snippets: transliteration (ami banglay gan gai -> আমি বাংলায় গান গাই), case-sensitive patterns, autocorrect (2106 entries), SQLite dictionary lookups, and suffix table. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Port AvroKeyboardController (IMKInputController), Candidates (IMKCandidates), and PreferencesController to Swift - Replace RegexKitLite's buffer-splitting regex with a compiled NSRegularExpression (verified identical prefix/term/suffix splits) - Unlink libicucore: the app no longer touches private ICU - Wrap candidate-panel access in MainActor.assumeIsolated for Swift 6 isolation checking (IMK calls arrive on the main thread) - PreferencesController keeps the underscore outlet names the 2012 nib connects to Only main.m and MainMenuAppDelegate remain Objective-C (batch 3). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Port main.m to main.swift (modern loadNibNamed, keeping the nib's top-level objects alive) and MainMenuAppDelegate to Swift - Remove the now-unused Objective-C prefix header - Silence remaining Swift 6 isolation warnings (assumeIsolated in awakeFromNib and menu(), restate @unchecked Sendable on parsers) The app now builds with no Objective-C sources, no third-party code, and no warnings. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 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.
No description provided.