Repository navigation
fix(desktop): query Vision's OCR languages through the request instance (unbreaks release compile on main) - #12932
nathanchengx wants to merge 1 commit into
Conversation
#12888 resolved Rewind OCR languages via the class-level `VNRecognizeTextRequest.supportedRecognitionLanguages(for:revision:)`, which is deprecated since macOS 12. The executable target compiles with `-warnings-as-errors`, so under CI's Xcode 16.4 the release compile, the Swift test build, and the launcher sentinel build all fail on main and on every PR's merge ref (#12931). The instance method is the supported replacement and answers for the same level and revision. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01FDiUGZjXHZBEzDQbCqLMeB
|
Thanks @nathanjcx — sharp catch and a clean fix. Closing as superseded (details below); the diagnosis lives on in #12931. What I verified on this head (8a29af0):
Why this is being closed rather than merged: while the PR was in review, the same instance-query fix landed on main directly in 83d6e6e ("fix(desktop): use current Vision OCR language API"), about an hour after you opened this. Desktop Swift CI on main has been green since f4afb82, and this branch now conflicts with main — resolving the conflict would just reproduce what is already there, so there is nothing left to take from this PR. Credit where it is due: the root-cause analysis in #12931 — the pinned error line, #12888 provenance, the pre-push debug-gate gap, and #12910/#12911 as untouched witnesses — is what made a one-line fix land with confidence, and your changelog fragment convention was spot on. Please keep contributing; this is exactly the kind of report-plus-fix the repo needs. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Hey @nathanjcx 👋 Thank you so much for taking the time to contribute to Omi! We truly appreciate you putting in the effort to submit this pull request. After careful review, we've decided not to merge this particular PR. Please don't take this personally — we genuinely try to merge as many contributions as possible, but sometimes we have to make tough calls based on:
Before your next PR, please skim:
If this was declined for direction or taste, maintainers should cite an invariant ID or open a proposed one — ask if that citation is missing. Your contribution is still valuable to us, and we'd love to see you contribute again in the future! If you'd like feedback on how to improve this PR or want to discuss alternative approaches, please don't hesitate to reach out. Thank you for being part of the Omi community! |
What changed and why
mainhas failedDesktop Swift Release Compile, the Swift test build, and the launcher sentinel build since #12888 (see #12931). That PR resolved Rewind OCR languages through the class-levelVNRecognizeTextRequest.supportedRecognitionLanguages(for:revision:), deprecated since macOS 12; the executable target compiles with-warnings-as-errors, so under CI's pinned Xcode 16.4 the deprecation is a hard error on every PR's merge ref. This swaps in the instance query,VNRecognizeTextRequest().supportedRecognitionLanguages(), on a probe request set to the same recognition level. Same fallback toen-USon failure.Product invariants affected
none
How it was verified
xcrun swiftc -warnings-as-errors -target arm64-apple-macos14.0on a two-line file calling the old API fails with the identical'supportedRecognitionLanguages(for:revision:)' was deprecated in macOS 12.0error; the same file with the instance call compiles clean.DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer swift build -c debugfor the full package (the executable target carries-warnings-as-errorsin every configuration) → Build complete, no warnings onRewindOCRService.swiftswift test --filter RewindOCRQualityTests→ 11 tests, 0 failuresTests
No test change.
RewindOCRQualityTestsalready coversresolveRecognitionLanguages(preferred:supported:), the pure part; the Vision query is a one-line platform call whose behavior (languages for the request's level) is unchanged.Failure class (fixes)
Failure-Class: none
🤖 Generated with Claude Code
https://claude.ai/code/session_01FDiUGZjXHZBEzDQbCqLMeB