build(desktop): pass macOS deployment target to Wails - #7628
Draft
complyue wants to merge 1 commit into
Draft
Conversation
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.
Background
On macOS Monterey 12.7.6, the system WKWebView/JavaScriptCore is older than the WebKit version Safari has staged on the same installation. Reasonix's modern frontend bundle can therefore fail during JavaScript parsing before React mounts. The current failure reported in issue #7624 is:
It points at markdownRemarkPlugins and is caused by an old Monterey WebKit rejecting modern RegExp syntax. The result is the familiar black/error window and a large amount of misleading downstream React noise. This is a native runtime-version skew, not a Reasonix feature bug.
Reasonix has accumulated several app-local workarounds for this class of problem:
These fixes made individual releases work, but they leave the application responsible for tracking the capabilities of the native engine.
Change
Set the existing standard desktop build script's macOS deployment-target default to 12.3:
For a direct/manual Wails invocation, the equivalent is:
The 12.3 floor is deliberate: the Safari staged framework set validated on Monterey declares macOS 12.3 as its minimum. Targets 12.0–12.2 cannot safely link that framework set and retain Wails' normal system-WebKit behavior.
Why the implementation is in Wails
This consumer PR intentionally contains no Safari path discovery, framework validation, DYLD flags, CGO flags, or JavaScript engine patch. Wails owns the native WebKit selection and applies it consistently to any Wails v2 application. Reasonix only supplies its supported macOS build target.
That keeps the final Reasonix maintenance surface to one environment default and makes the manual build, the standard packaging script, and the release CI path use the same contract.
Maintenance reduction
After the paired Wails change is available in a released dependency, the old engine-specific frontend workarounds can be reviewed for removal in a follow-up:
The cleanup is intentionally not mixed into this PR: removing those guards before the Wails build behavior is available would make older release paths less safe and would obscure the actual dependency boundary.
Validation
Documentation-impact: none - the existing desktop build documentation remains correct; the new target is applied by the existing standard packaging script and the direct/manual override is shown above.
Sister PR
Wails implementation: wailsapp/wails#5903
This PR should be reviewed together with that Wails PR. The local verification used a temporary Go workspace pointing github.com/wailsapp/wails/v2 at the corresponding local fork; no permanent application-specific Wails fork or replace directive is added here.