fix(v2): select Safari WebKit by macOS deployment target - #5903
Draft
complyue wants to merge 1 commit into
Draft
Conversation
Contributor
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
27 tasks
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.
Context
On macOS Monterey 12.7.6, the system WKWebView/JavaScriptCore can be older than the WebKit that Safari has staged in:
Reasonix currently reaches JavaScript and RegExp features in markdownRemarkPlugins that Monterey's system engine cannot parse. The observed failure is:
It happens while the bundle is being parsed, before React mounts, so the user sees a black/error window. This is a native WebKit version skew, not a Reasonix application-logic bug. Adding more JavaScript shims or repeatedly rewriting individual expressions only moves the compatibility burden to every application.
What this PR changes
Wails now owns this macOS framework selection policy during the normal build:
The 12.3 boundary is intentional: the Safari staged framework set validated on Monterey declares macOS 12.3 as its minimum. Selecting it for 12.0–12.2 would produce an invalid deployment target rather than a supported binary.
The optional WAILS_MACOS_STAGED_FRAMEWORKS environment variable is available for controlled build/test environments; the default is Apple's standard staged-framework location.
Why this belongs in Wails
The policy is about how a Wails application is linked and launched, not about Reasonix's frontend. Keeping it here gives every Wails v2 application the same opt-in behavior through:
It also covers manual builds and CI builds without requiring each consumer to duplicate framework validation, -F flags, DYLD_VERSIONED_* flags, and CGO linker plumbing.
Compatibility evidence
This problem has repeatedly been addressed at the application layer:
Not every historical report has the same immediate trigger: for example, crossorigin failures are custom-scheme/CORS behavior, not JavaScript syntax. The common maintenance problem is that applications have to discover and encode WebKit-version quirks independently.
Maintenance impact
The paired Reasonix change is only five lines: it sets a 12.3 deployment-target default in its existing desktop build script and leaves all WebKit/linker policy to Wails. No Safari path, native linker flags, or Wails-specific compatibility test is added to the application.
Once this behavior is available in a released Wails version, the following Reasonix cleanup becomes possible as a separate, verifiable follow-up:
This separates permanent product behavior from compatibility debt and makes future WebKit policy fixes reusable across Wails applications.
Validation
Paired PR
Reasonix consumer PR: esengine/DeepSeek-Reasonix#7628
These two PRs should be reviewed and merged as a pair. The Reasonix PR deliberately contains only the deployment-target handoff; this PR contains the native WebKit policy.