Add build-only mode for Xcode 15.x to fix Swift Testing macro errors#109
Conversation
Xcode 15's xcodebuild cannot resolve external macro plugins from the swift-testing package. Use build-only mode for Xcode 15.x to validate compilation while running full tests on Xcode 16.4+ and Ubuntu. This keeps Xcode 15.x in the CI matrix for build validation while avoiding the macro resolution errors during test execution.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
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 |
PR Review: Add build-only mode for Xcode 15.xSummaryThis PR addresses a legitimate issue with Xcode 15's inability to resolve external macro plugins from the swift-testing package by enabling build-only mode for Xcode 15.x builds while maintaining full test execution on newer Xcode versions. ✅ Positives
🔍 Considerations & Questions
🔒 Security & Performance
📝 Suggestions
✅ RecommendationAPPROVE with minor suggestions. The change is sound and addresses a real toolchain limitation. The suggestions above are optional improvements to make the intent clearer and avoid potential CI issues with coverage reporting. The core fix is good to merge as-is if you're comfortable with the test coverage gap for Xcode 15.x platforms. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 107-swift-testing #109 +/- ##
==================================================
Coverage 77.65% 77.65%
==================================================
Files 74 74
Lines 1553 1553
==================================================
Hits 1206 1206
Misses 347 347
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Remove all Xcode 15.0.1 (Swift 5.9) matrix entries due to incompatibility
with Swift Testing 0.5.1's type inference requirements
- Update build-only condition to only apply to Xcode 15.4 platform builds
(iOS, watchOS), not macOS builds
- Update skip-package-resolved condition to target only Xcode 15.4
- Update macro fingerprint validation condition to target only Xcode 15.4
This resolves CI failures where:
- Swift 5.9 compiler cannot infer types for .compactMapValues { $0 }
- Swift Testing macro plugins fail to load for iOS/watchOS simulator targets
Xcode 15.4 macOS builds now run tests normally, while platform builds use
build-only mode to avoid macro plugin initialization issues.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
PR Review: Build Configuration Changes for Xcode 15.xSummaryThis PR addresses Swift Testing macro resolution issues in Xcode 15.x by:
Code Quality: ✅ GoodStrengths:
Potential Issues:
|
Swift 5.9 is no longer supported due to incompatibility with Swift Testing 0.5.1. The minimum Swift version is now 5.10 (Package@swift-5.10.swift). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
PR Review: Add build-only mode for Xcode 15.xOverviewThis PR addresses Swift Testing macro resolution errors in Xcode 15.x by implementing a build-only mode for platform-specific tests while maintaining build validation. The changes are well-targeted and align with the project's CI/CD strategy. Strengths
Issues and Recommendations1. Package.swift Deletion - Needs Clarification The PR deletes Package.swift which contained the package manifest for Swift 5.9+. This is concerning because there is no explanation in the PR description for why this file is being removed. If this is the primary package manifest, deletion would break SPM builds. The deleted manifest looked legitimate with proper dependencies. Action Required: Please clarify why Package.swift is deleted, or restore it if this was unintentional. 2. Macro Fingerprint Validation Logic The condition on line 233 now only applies when matrix.type is not empty, which excludes SPM builds. Question: Should SPM-only builds on Xcode 15.4 also need macro fingerprint validation disabled? 3. Build-Only Mode Coverage Gap Platform-specific builds on Xcode 15.4 won't run tests (iOS 17.5, watchOS 10.5 missing coverage). This appears acceptable since tests run on newer OS versions and SPM builds on Xcode 15.4 should still run tests. Recommendation: Confirm that SPM tests on Xcode 15.4 are still running. Verification ChecklistBefore merging, please confirm:
Test Coverage AnalysisMaintained Full Testing: All Ubuntu builds, Windows, Android, Xcode 16.4+, and Xcode 15.4 SPM builds Build-Only (No Tests): Xcode 15.4 platform-specific builds (iOS 17.5, watchOS 10.5, macOS) This trade-off appears reasonable given the tooling constraints. Code Quality: GoodFollows GitHub Actions best practices with clear conditional logic. Security: No ConcernsPerformance: ImprovedRemoving Xcode 15.0.1 entries (6 matrix jobs) will reduce CI time and costs. Final RecommendationApprove with clarification needed on the Package.swift deletion. The workflow changes look solid, but the package manifest removal needs explanation before merging. Review generated with assistance from Claude Code |
… cleanups (#127) * Migrate lint/style/CI configs in 6 BrightDigit subrepo packages [skip ci] Apply the issue #54 config migration to the vendored BrightDigit libraries (SyndiKit, TransistorPublishPlugin, Contribute, ContributeWordPress, NPMPublishPlugin, YoutubePublishPlugin) using the MistKit/SundialKit library config variant: - .swiftlint.yml: strict library ruleset + no_unchecked_sendable custom rule - .swiftformat -> .swift-format: Apple swift-format JSON - .mise.toml: swift-format 604 (Swift 6.4-aligned), swiftlint, periphery - Scripts/lint.sh (mise-based, replaces Mint) + Scripts/header.sh - CI workflow -> brightdigit/swift-build@v1 (ubuntu + macos) + STRICT lint job - Remove obsolete .hound.yml Configs + CI only; source reformatting/headers deferred (matches main repo). SwiftTube and Spinetail skipped (slated for OpenAPI-generator migration). Committed in the monorepo only; no git subrepo push performed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * ci: trigger pipeline (config migration) * packages CI: install curl + cache mise tools in lint job * CI: test vendored BrightDigit packages via monorepo matrix Add a `test-packages` matrix job to main.yaml that builds, tests, and lints the 6 vendored BrightDigit packages in-place. In the monorepo checkout every sibling already sits at its relative-path location, so each package resolves with zero dependency reconstruction — replacing the per-package setup-deps CI. - detect-changes: add `packages` paths-filter + `packages-changed` output - remove standalone workflows + orphaned setup-deps from the 4 rel-dep packages (ContributeWordPress, Transistor, NPM, Youtube); their standalone CI was synthetic (relative deps are committed) - keep SyndiKit + Contribute standalone CIs (genuinely standalone libraries) - bump all GitHub Actions to latest: checkout v6, cache v5, upload-artifact v7, download-artifact v8, dorny/paths-filter v4 (swift-build@v1 unchanged) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Conform v1.0.0 codebase to standardized lint configs Post-rebase cleanup after replaying the config migration onto v1.0.0: - Fix swiftlint/swift-format violations surfaced by the stricter standardized configs (explicit ACLs, formatting, XCTFail messages, XCTUnwrap instead of force-unwraps, doc-comment corrections) - Inline-disable intentional exceptions in source: iTunes* type names, RSS-spec webMaster, @unchecked Sendable fallback, large test fixtures - Split files violating one_declaration_per_file - Normalize license headers via Scripts/header.sh (straight quotes) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: refresh DocC catalog for v1.0.0 - Update requirements to match Package.swift (Swift 5.10 / Xcode 15.3, iOS 13 / watchOS 6 / tvOS 13 / macOS 10.15 deployment targets) - Bump install snippet to from: "1.0.0" - Fix transposed JSONFeed column in the Feedable mapping table (siteURL -> homePageUrl, summary -> description) - Fix invalid Swift in code snippets (Data(contentsOf:) usage, missing paren in case pattern) - Fix typos and stale LICENSE link Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Migrate lint/style/CI configs to BrightDigit template patterns (#54) (#76) * Phase 4 — OpenAPI & dependency migration (#109) * SyndiKit CI: use jdx/mise-action for robust lint tool bootstrap Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Subrepos: add macOS + Windows nightly-6.4 CI legs across all 5 standalone repos Extend ButtondownKit/Spinetail/SwiftTube/Contribute/SyndiKit standalone CI to the BrightDigit multi-platform template now that a self-hosted macOS runner with /Applications/Xcode-beta.app (Swift 6.4) is available: - build-macos: [self-hosted, macOS] + swift-build xcode=Xcode-beta. Blocking on all 5. Contribute & SyndiKit migrated off macos-15; their Ubuntu + lint legs migrated swift:6.3-noble -> swiftlang/swift:nightly-6.4.x-noble. - build-windows: hosted windows-2022/2025, swift.org nightly snapshot 6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-01-a. Gated to full-matrix runs via a single-package configure job. continue-on-error on the OpenAPI repos + Contribute (unverified deps); blocking on SyndiKit. - SyndiKit also gains build-macos-platforms (iOS/watchOS/tvOS on released Xcode_26.4 — not nightly 6.4). WASM + Android deferred: no nightly 6.4 support yet. WASM is a swift-build limitation (brightdigit/swift-build#115 — no input to override the auto-derived -RELEASE wasm SDK URL); Android is blocked upstream (no nightly 6.4 SDK). Each workflow documents re-adding them. Contribute WASM is permanently N/A (Yams on the Musl/wasm SDK). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Subrepos: wire WASM + Android nightly-6.4 CI legs via swift-build SDK-bundle inputs Now that swift.org publishes nightly 6.4 SDK bundles on swift-6.4.x-branch and brightdigit/swift-build#116 adds inputs to install caller-supplied bundles, add: - build-wasm to ButtondownKit/Spinetail/SwiftTube/SyndiKit (NOT Contribute — Yams fails on the Musl/wasm SDK). Uses wasm-sdk-url + wasm-sdk-checksum pointing at the swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-15-a_wasm artifactbundle, with WASI emulation + memory flags. - build-android to all 5 repos. Uses android-sdk-url + android-sdk-id (+ matching android-swift-version) for the swift-6.4.x-DEVELOPMENT-SNAPSHOT-2026-06-15-a_android artifactbundle via skiptools custom-sdk-url; build-only (android-run-tests: false). Both legs are full-matrix-gated and continue-on-error: they reference @v1 and are inert until swift-build#116 is released and the v1 tag moved, after which they should be confirmed green and promoted to blocking (SyndiKit first). Bump the snapshot SDK URLs/checksums periodically. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Subrepos: run all Apple-platform suites on self-hosted Xcode-beta (Swift 6.4) Per the rule that Swift 6.4 builds use the self-hosted runners (the only macOS Swift 6.4 toolchain is /Applications/Xcode-beta.app = Xcode 27 / Swift 6.4): - Move SyndiKit + Contribute build-macos-platforms off hosted macos-26/Xcode_26.4 (which is only Swift 6.2) onto [self-hosted, macOS] + Xcode-beta. - Add build-macos-platforms (iOS/watchOS/tvOS) to ButtondownKit/Spinetail/SwiftTube on the same self-hosted runner — these are swift-tools-version:6.4, so hosted released-Xcode runners can't even parse their manifests. All use the iOS/watchOS/tvOS 27.0 simulator runtimes present on the runner (iPhone 17 Pro / Apple Watch Ultra 3 (49mm) / Apple TV 4K (3rd generation)), full-matrix-gated and continue-on-error (simulator-on-nightly is the most fragile leg; promote once green). lint now needs build-macos-platforms. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Subrepos: give Windows its own (stricter) matrix tier Three CI tiers instead of two: small set (build-ubuntu/build-macos/lint, always) < full-matrix (macОS-platforms/wasm/android) < +Windows. configure now emits a second output, run-windows, equal to full-matrix MINUS PRs into semver branches. build-windows (the most expensive leg — hosted windows-2022/2025 ×2) gates on run-windows; the rest keep full-matrix. So PRs into semver branches still exercise the full non-Windows matrix but skip Windows. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Subrepos: test against swift-build feature branch + fold build-wasm into build-ubuntu - Point every brightdigit/swift-build@v1 reference at @sdk-url-checksum-nightly-6.4 (PR #116) TEMPORARILY so CI exercises the new wasm-sdk-url/android-sdk-url code before it ships in @v1. Revert to @v1 once #116 is merged + the v1 tag moved. - Fold build-wasm into build-ubuntu as a continue-on-error step in the same nightly-6.4.x-noble container (one spin-up; runs on every push/PR now, not just full-matrix). Removed the standalone build-wasm job from ButtondownKit/Spinetail/ SwiftTube/SyndiKit (Contribute has no wasm — Yams on Musl/wasm). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Subrepos: only run push CI on main (drop integration branch from push trigger) Push events now trigger only on main (+ release tags). Feature/integration branches like brightdigit-com-260406 get CI through their PRs instead of a redundant branch-push run. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Subrepos: unify the 5 CI workflows to byte-identical (except name) - Windows is now blocking everywhere (dropped continue-on-error from build-windows in all 5, not just SyndiKit). - The only per-package functional difference — the wasm step (Contribute can't build Yams on wasm) — is externalized to the ENABLE_WASM repo variable: `if: ${{ vars.ENABLE_WASM != 'false' }}`. Set ENABLE_WASM=false on Contribute. - Normalized all comments to a shared template. Result: the five workflow files are byte-identical except the `name:` line; the only behavioral knob is each repo's ENABLE_WASM variable. Filed Contribute#10 to fix Yams-on-wasm and re-enable it there. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Subrepos: remove continue-on-error from all 5 CI workflows Make the WASM step, the Apple-platforms job (iOS/watchOS/tvOS), and the Android job blocking across all five subrepos. Tidy the now-stale continue-on-error comment phrases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Subrepos: gate watchOS leg on ENABLE_WATCHOS (disable where failing) watchOS-27 SDK rejects deps that infer an 8.0 deployment target (SwiftPM #10188, not fixable in-repo). Gate the build-macos-platforms watchOS leg on a new ENABLE_WATCHOS repo variable (mirrors ENABLE_WASM), keeping the 5 workflows byte-identical. ENABLE_WATCHOS=false is set on ButtondownKit/SwiftTube/ Contribute/Spinetail; SyndiKit (unaffected) keeps running watchOS. Tracked in brightdigit.com#119. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Subrepos: build-ubuntu as a [standard, wasm, wasm-embedded] matrix Mirror brightdigit/MistKit: the configure job emits ubuntu-type (gated by ENABLE_WASM), and build-ubuntu fans out over it via fromJSON. Standard ('') always runs; wasm + wasm-embedded run unless ENABLE_WASM=false (e.g. Yams on Contribute). Both wasm variants share the nightly-6.4.x SDK bundle. Replaces the single folded WASM step. Byte-identical across all 5. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Subrepos: make wasm/wasm-embedded legs build-only The wasm/embedded BUILD passes (OpenAPIURLSession is guarded out on WASI), but running the suite under WasmKit fails: Foundation resource bundles (test Fixtures) aren't mounted in the WASI sandbox, and embedded hits OpenAPIRuntime keypath-demangling limits at runtime. Neither is our bug. Build-only validates wasm/embedded compilation (the goal); the standard leg still runs the full suite + coverage. Mirrors the Android leg's build-only stance. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Add tests for uncovered EntryID/SiteCollection/media-properties branches Covers the 9 patch-coverage gaps flagged on PR #127: - EntryID: init(string:)/init?(_:)/description/Codable for all four cases - SiteCollectionDirectoryBuilder: init() + directory(fromCollection:) - PodcastEpisodeProperties.init?(rssItem:) nil branch (no enclosure) - YouTubeIDProperties.init?(entry:) nil branch (non-YouTube Atom entry) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * CI: revert swift-build action to @v1 (temp sdk-url-checksum-nightly-6.4 branch deleted) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Xcode 15's xcodebuild cannot resolve external macro plugins from the swift-testing package. Use build-only mode for Xcode 15.x to validate compilation while running full tests on Xcode 16.4+ and Ubuntu.
This keeps Xcode 15.x in the CI matrix for build validation while avoiding the macro resolution errors during test execution.
Perform an AI-assisted review on