fix(darwin): update minimum macOS version from 10.15 to 12.0#5253
fix(darwin): update minimum macOS version from 10.15 to 12.0#5253leaanthony wants to merge 3 commits into
Conversation
Since Go 1.25, the linker embeds LC_BUILD_VERSION with minos 12.0, making binaries incompatible with macOS < 12. Update templates to match so macOS shows a clear version requirement dialog instead of silently failing. Fixes #5161
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
WalkthroughThis PR raises the macOS minimum deployment target from 10.15 to 12.0 in Darwin build templates and adds tests that verify Info.plist templates and Taskfile.yml reflect the 12.0 requirement. Changes
Sequence Diagram(s)(no sequence diagrams generated for these changes) Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 golangci-lint (2.11.4)level=error msg="[linters_context] typechecking error: pattern ./...: directory prefix . does not contain main module or its selected dependencies" 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. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
There was a problem hiding this comment.
Pull request overview
Updates Wails v3 macOS (darwin) build/template assets to declare a minimum supported macOS version of 12.0, aligning template metadata and build flags with Go 1.25+ Mach-O minimum OS behavior (so users on older macOS get a clear “requires macOS 12 or later” dialog instead of a silent failure).
Changes:
- Bump
LSMinimumSystemVersionin darwin Info.plist templates to 12.0. - Bump darwin build Taskfile
-mmacosx-version-minandMACOSX_DEPLOYMENT_TARGETto 12.0. - Add a regression test ensuring templates/Taskfile no longer reference 10.15 and do reference 12.0.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| v3/internal/commands/updatable_build_assets/darwin/Info.plist.tmpl | Raises LSMinimumSystemVersion to 12.0 in the release plist template. |
| v3/internal/commands/updatable_build_assets/darwin/Info.dev.plist.tmpl | Raises LSMinimumSystemVersion to 12.0 in the dev plist template. |
| v3/internal/commands/build_assets/darwin/Taskfile.yml | Updates native build env flags to target macOS 12.0 minimum. |
| v3/test/5161/darwin_min_version_test.go | Adds coverage to prevent regressions back to 10.15 in templates/Taskfile. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| {{- end}} | ||
| <key>LSMinimumSystemVersion</key> | ||
| <string>10.15.0</string> | ||
| <string>12.0</string> |
There was a problem hiding this comment.
LSMinimumSystemVersion was previously expressed as a 3-segment version (e.g. 10.15.0), but is now 12.0. Elsewhere in the repo (eg v3/examples/dev/build/Info.plist) the value uses a major.minor.patch format; consider using 12.0.0 for consistency and to avoid any potential parsing differences across macOS versions.
| <string>12.0</string> | |
| <string>12.0.0</string> |
| {{- end}} | ||
| <key>LSMinimumSystemVersion</key> | ||
| <string>10.15.0</string> | ||
| <string>12.0</string> |
There was a problem hiding this comment.
LSMinimumSystemVersion was previously expressed as a 3-segment version (e.g. 10.15.0), but is now 12.0. Elsewhere in the repo (eg v3/examples/dev/build/Info.plist) the value uses a major.minor.patch format; consider using 12.0.0 for consistency and to avoid any potential parsing differences across macOS versions.
| <string>12.0</string> | |
| <string>12.0.0</string> |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
v3/test/5161/darwin_min_version_test.go (1)
37-44: Remove or fix the dead plist parsing that cannot succeed on unrendered templates.The templates contain Go template syntax (e.g.,
{{.ProductName}}), soplist.Unmarshal()will always fail silently, causing lines 40–42 to be skipped regardless of the actual LSMinimumSystemVersion value. The string-based checks on lines 29–35 do validate that "12.0" exists in the template, so remove the misleading plist block entirely or parse only after rendering (if template rendering is part of the test scope).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@v3/test/5161/darwin_min_version_test.go` around lines 37 - 44, Remove the dead plist parsing block that attempts plist.Unmarshal into plistDict and checks LSMinimumSystemVersion (the code that references plist.Unmarshal, plistDict, minVer and expectedVersion) because template placeholders (e.g., {{.ProductName}}) make unmarshalling always fail; either delete the entire if-block checking plist.Unmarshal/LSMinimumSystemVersion or modify the test to render the template before unmarshalling so plist.Unmarshal can succeed — ensure you remove references to plist.Unmarshal, plistDict, minVer and the subsequent t.Errorf check if you choose deletion.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@v3/test/5161/darwin_min_version_test.go`:
- Around line 37-44: Remove the dead plist parsing block that attempts
plist.Unmarshal into plistDict and checks LSMinimumSystemVersion (the code that
references plist.Unmarshal, plistDict, minVer and expectedVersion) because
template placeholders (e.g., {{.ProductName}}) make unmarshalling always fail;
either delete the entire if-block checking
plist.Unmarshal/LSMinimumSystemVersion or modify the test to render the template
before unmarshalling so plist.Unmarshal can succeed — ensure you remove
references to plist.Unmarshal, plistDict, minVer and the subsequent t.Errorf
check if you choose deletion.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d00b2139-84cb-48cd-bf6f-f2716c8881f1
📒 Files selected for processing (4)
v3/internal/commands/build_assets/darwin/Taskfile.ymlv3/internal/commands/updatable_build_assets/darwin/Info.dev.plist.tmplv3/internal/commands/updatable_build_assets/darwin/Info.plist.tmplv3/test/5161/darwin_min_version_test.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Summary
LC_BUILD_VERSIONwithminos 12.0, making binaries physically incompatible with macOS < 12LSMinimumSystemVersion: 10.15.0caused macOS to allow launch but the kernel would reject the binary silentlyFiles Changed
v3/internal/commands/updatable_build_assets/darwin/Info.plist.tmpl-LSMinimumSystemVersion→ 12.0v3/internal/commands/updatable_build_assets/darwin/Info.dev.plist.tmpl-LSMinimumSystemVersion→ 12.0v3/internal/commands/build_assets/darwin/Taskfile.yml-CGO_CFLAGS,CGO_LDFLAGS,MACOSX_DEPLOYMENT_TARGET→ 12.0Test
v3/test/5161/darwin_min_version_test.go- Verifies templates contain 12.0 and not 10.15Fixes #5161
Summary by CodeRabbit
Chores
Tests