Compare commits

...
6 Commits
Author SHA1 Message Date
james.maes 634dc9f688 Merge pull request 'ci: build on the shared ci-workflows macOS workflow (build only)' (#2) from ci/shared-macos into master
macos / macos (push) Successful in 51s
build / macos (push) Successful in 51s
2026-11-08 23:33:40 +00:00
James MaesandClaude Opus 5.5 da5779f872 fix: capture weakly in the outer resolve closures (Swift 6.3 ImplicitStrongCapture)
macos / macos (push) Successful in 52s
build / macos (push) Successful in 52s
The background closures in ExceptionsTab.applyContent and
ExceptionEditorView.resolveHeaderAsync captured row/self strongly while the
inner main-queue closure asked for weak; Xcode 27's Swift diagnoses the
mismatch (#ImplicitStrongCapture), an error under warnings-as-errors. Both
closures now capture weakly, so neither keeps the row or view alive while
the app info resolves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 17:32:05 -06:00
James MaesandClaude Opus 5.5 874971aa47 ci: one-line Release build command
macos / macos (push) Failing after 17s
build / macos (push) Failing after 17s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 17:30:44 -06:00
James MaesandClaude Opus 5.5 756943f2b5 ci: compile the Release scheme at macOS 12.0 on Xcode 27
macos / macos (push) Failing after 2s
build / macos (push) Failing after 2s
grogu has only Xcode 27.2, which rejects the 10.13 deployment target. The
CI build is a compile check at 12.0 with the deprecation group downgraded
(as config/test-base.xcconfig); the shipping build stays on the GitHub
mirror with Xcode 26.0.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 17:29:44 -06:00
James MaesandClaude Opus 5.5 c675f1817f ci: select Xcode 26.0.1, as ci_cd.yml does
macos / macos (push) Failing after 1s
build / macos (push) Failing after 2s
Xcode 27.2 rejects the app's macOS 10.13 deployment target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 17:28:37 -06:00
James MaesandClaude Opus 5.5 c2be713446 ci: build on the shared ci-workflows macOS workflow (build only)
macos / macos (push) Failing after 6s
build / macos (push) Failing after 6s
Gitea CI on grogu (kof-macos-arm64): Guards B and C from guard.yml (the
de-paywall marker and if-false wrap in computeState(), no conflict markers),
an unsigned Release build, and build-for-testing of the Test scheme. The
tests (Guard A) are not run on CI: the runner has no GUI session for
testmanagerd; docs/contributing.md documents running scripts/run_tests.sh
locally before merging.

config/test-base.xcconfig takes the unit-test-only Xcode 27 fix from PR #1
(test target 12.0, deprecation group downgraded, every other warning still
an error); the shipping app keeps 10.13. The .github workflows stay for the
GitHub mirror.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 17:27:40 -06:00
5 changed files with 44 additions and 4 deletions

No files matched your search

+31
View File
@@ -0,0 +1,31 @@
# Gitea CI on the shared KofTwentyTwo/ci-workflows macOS workflow (grogu). The .github workflows keep
# running on the GitHub mirror (release, notarization, appcast); this one is build only and unsigned.
#
# Guard B the de-paywall marker and the if-false wrap are still in computeState() (docs/PLAN-maintained-fork.md §4.4)
# Guard C no unresolved merge conflict markers in the tree
# build the Release scheme, unsigned (a compile check at macOS 12.0: grogu has only Xcode 27)
# Guard A the Test scheme is compiled (build-for-testing) but not run: the grogu runner has no GUI session for
# testmanagerd. Run scripts/run_tests.sh locally before merging (docs/contributing.md).
name: build
on:
push:
branches: ['**']
jobs:
macos:
uses: self:KofTwentyTwo/ci-workflows/.gitea/workflows/macos.yaml@v1
with:
commands: |
F=src/pro/license/LicenseManager.swift
[ -f "$F" ] || { echo "::error::Guard B: $F not found; chokepoint moved? Refresh the de-paywall patch (§6.2)."; exit 1; }
grep -q 'depaywall' "$F" || { echo "::error::PAYWALL RELOCKED: 'depaywall' marker missing from $F (§6.2)."; exit 1; }
grep -Eq 'guard[[:space:]]+false[[:space:]]+else' "$F" || { echo "::error::PAYWALL RELOCKED: 'if false { … }' wrap missing from $F (§6.2)."; exit 1; }
echo "Guard B OK"
if git -c grep.lineNumber=false grep -nE '^(<<<<<<<|=======|>>>>>>>)' -- . ':(exclude)docs/'; then
echo "::error::UNRESOLVED CONFLICT MARKERS present; resolve before merge (§4.4 Guard C)."; exit 1
fi
echo "Guard C OK"
# grogu has only Xcode 27.2, which rejects the app's 10.13 deployment target (the shipping build is the GitHub
# mirror's, on Xcode 26.0.1). This compile check builds at 12.0 with the same deprecation downgrade as
# config/test-base.xcconfig; every other Swift warning stays an error.
xcodebuild -quiet -project alt-tab-macos.xcodeproj -scheme Release -derivedDataPath DerivedData CODE_SIGN_IDENTITY=- CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO MACOSX_DEPLOYMENT_TARGET=12.0 SWIFT_TREAT_WARNINGS_AS_ERRORS=NO 'OTHER_SWIFT_FLAGS=$(inherited) -warnings-as-errors -Wwarning DeprecatedDeclaration' build
xcodebuild -quiet -project alt-tab-macos.xcodeproj -scheme Test -configuration Release -derivedDataPath DerivedData build-for-testing
+5 -2
View File
@@ -1,8 +1,11 @@
// docs: https://help.apple.com/xcode/mac/11.4/#/itcaec37c2a6
SWIFT_VERSION = 5.8
SWIFT_TREAT_WARNINGS_AS_ERRORS = YES
MACOSX_DEPLOYMENT_TARGET = 10.13
SWIFT_TREAT_WARNINGS_AS_ERRORS = NO // replaced by the explicit flags below so the deprecation group can be downgraded after them
// Raising the unit-test target to 12.0 turns uses of APIs deprecated in macOS 11/12 (kept for the 10.13 app) into warnings; only that
// group is downgraded here (after -warnings-as-errors, which would otherwise win); every other warning stays an error.
OTHER_SWIFT_FLAGS = $(inherited) -warnings-as-errors -Wwarning DeprecatedDeclaration
MACOSX_DEPLOYMENT_TARGET = 12.0 // unit-tests only: Xcode 27 supports 12.0+; the shipping app keeps 10.13 in base.xcconfig
CODE_SIGNING_REQUIRED = NO // no need for codesign
CODE_SIGNING_ALLOWED = NO // no need for codesign
ONLY_ACTIVE_ARCH = YES // only need to run on the host machine
+6
View File
@@ -11,6 +11,12 @@ This project has minimal dependency on Xcode-only features (e.g. InterfaceBuilde
* `scripts/codesign/setup_local.sh` to generate a local self-signed certificate, to avoid having to re-check the `System Preferences > Security & Privacy` permissions on every build
* Either open `alt-tab-macos.xcodeproj` with Xcode, or use the CLI: `xcodebuild -project alt-tab-macos.xcodeproj -scheme Debug` to build the .app with the `Debug` build configuration
### Tests (run locally before merging)
The Gitea CI (`.gitea/workflows/build.yaml`) runs Guards B and C (the de-paywall markers and conflict markers), builds the `Release` scheme unsigned and compiles the `Test` scheme (`build-for-testing`), but does not run the tests: its macOS runner has no GUI session, so `xcodebuild test` cannot reach `testmanagerd`. Run them, including the anti-relock tests in `src/pro/license/LicenseManagerTests.swift` (Guard A, `docs/PLAN-maintained-fork.md` §4.4), locally before merging, especially an upstream sync:
* `scripts/run_tests.sh` (the `Test` scheme, `-configuration Release`)
## Mac development
Mac development ecosystem is pretty terrible in general. They keep piling on the tech stacks on top of each other, so you have C APIs, ObjC APIs, Swift APIs, Interface builder, Playgrounds, Swift UI, Mac Catalyst. All these are bridging with each other with a bunch of macros, SDKs glue, compiler flags, compatibility mode, XCode legacy build system, etc. For alt-tab, we are on Swift 5.0. Note that swift just recently started being stable, but overall any change of version breaks a lot of stuff. Swift itself is the mainstream language with the worst governance I’ve seen in modern times.
@@ -291,7 +291,7 @@ class ExceptionEditorView: NSView {
}
private func resolveHeaderAsync(for bundleId: String) {
DispatchQueue.global(qos: .userInitiated).async {
DispatchQueue.global(qos: .userInitiated).async { [weak self] in
let info = AppDisplayInfo.resolve(bundleId: bundleId)
DispatchQueue.main.async { [weak self] in
guard let self, self.entry.bundleIdentifier == bundleId else { return }
@@ -319,7 +319,7 @@ class ExceptionsTab {
// BundleId changed (or first paint): show a synchronous placeholder, then resolve async.
row.setIcon(AppDisplayInfo.genericIcon, size: iconSize)
row.setContent(bundleId, summary)
DispatchQueue.global(qos: .userInitiated).async {
DispatchQueue.global(qos: .userInitiated).async { [weak row] in
let info = AppDisplayInfo.resolve(bundleId: bundleId)
DispatchQueue.main.async { [weak row] in
guard let row else { return }