Conversation
… only (#1) - Remove `import Perception` from FetchSubscription.swift (was unused) - Add explicit `import ConcurrencyExtras` for LockIsolated - Remove swift-perception package dependency from Package.swift - Update platforms to macOS 15+ only (drop iOS/tvOS/watchOS) - Update Package@swift-6.0.swift similarly The Perception import was never actually used - the file only uses LockIsolated (from ConcurrencyExtras) and SharedReader (from Sharing). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR addresses a Swift 6.2.3 compiler bug where the .package(url:...) pattern inside package.dependencies.append() causes a circular reference error due to ambiguous member lookup. The fix uses explicit type qualification to disambiguate the reference.
- Uses
Package.Dependency.package(url:...)instead of.package(url:...)when appending dependencies - Adds explanatory comment documenting the Swift 6.2.3 workaround
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| #if !os(Windows) | ||
| // Add the documentation compiler plugin if possible | ||
| // NB: Use explicit type to avoid Swift 6.2.3 circular reference bug |
There was a problem hiding this comment.
The comment references Swift 6.2.3 as the version with the circular reference bug, but the swift-tools-version at the top of the file is still set to 6.2.1. If this fix is specifically for Swift 6.2.3, consider updating the swift-tools-version to match, or clarify in the comment whether this fix is forward-compatible for users who might upgrade to 6.2.3 while this package remains at 6.2.1.
| // NB: Use explicit type to avoid Swift 6.2.3 circular reference bug | |
| // NB: Use explicit type as a forward-compatible workaround for the circular reference | |
| // bug observed when building this package with Swift 6.2.3 toolchains. |
Updates dependency to use fix/swift-623-optimizer-crash branch which includes compiler guards to work around the Swift 6.2.3 optimizer crash in SharedChangeTracker deinit.
Pull Request Review: Swift 6.2.3 Compatibility FixesSummaryThis PR addresses Swift 6.2.3 compiler compatibility issues through targeted workarounds. The changes are well-documented and appropriately scoped. Code Quality & Best Practices - APPROVEDStrengths:
Key Changes:
Potential Issues & Concerns1. API Availability Impact (Medium Severity) 2. Inconsistent Issue Tracking (Low Severity) 3. Package.resolved Changes (Low Impact) Performance Considerations - APPROVEDNo performance impact. Compiler guards are compile-time decisions with zero runtime cost. Security Concerns - APPROVEDNo security issues. Changes are defensive, no new attack surface, dependency pins prevent supply chain issues. Test Coverage - ADEQUATEManual verification confirmed. Existing tests cover functionality. Tests for disabled methods skip on affected versions. Recommendations
Final Verdict - APPROVESuccessfully addresses Swift 6.2.3 compatibility while maintaining quality standards, using minimal workarounds, fixing critical bugs, and preserving security/performance. Critical fixes: Unterminated comment, missing dependencies, malformed dependency reference Risk level: Low (defensive changes, well-documented temporary workarounds) |
c8c6224 to
84323a6
Compare
Pull Request Review: Swift 6.2.3 Compiler WorkaroundsSummaryThis PR addresses Swift 6.2.3 compiler issues through two key changes:
Code Quality & Best Practices ✅Package.swift ChangesPositive:
Minor Observation:
Statement+GRDB.swift & Table+GRDB.swift ChangesPositive:
Concerns:
Potential Bugs or Issues
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // NB: Fork with Swift 6.3 fixes (uses doozMen/swift-perception) | ||
| .package(url: "https://github.com/doozMen/swift-sharing", branch: "main"), | ||
| // NB: Fork with Swift 6.3 fixes | ||
| .package(url: "https://github.com/doozMen/swift-sharing", branch: "fix/swift-623-optimizer-crash"), |
There was a problem hiding this comment.
The dependency on the third-party package swift-sharing is pinned to a mutable Git branch (branch: "fix/swift-623-optimizer-crash"), which means future builds will automatically pick up any new commits pushed to that branch. If the doozMen/swift-sharing repository or this branch is ever compromised, an attacker can silently inject malicious code into your build artifacts without any change to this repository. To mitigate this supply-chain risk, pin the dependency to an immutable reference such as a specific tagged version or commit SHA and only update it intentionally after review.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
d1a5b59 to
24097cc
Compare
PR Review: Fix Swift 6.2.3 Circular Reference BugSummaryThis PR addresses a Swift 6.2.3 compiler bug by using explicit Code Quality ✅Strengths:
Best Practices:
Potential Issues
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // NB: Swift 6.2.3 and 6.3-dev guard Select.find(_:) in swift-structured-queries due to compiler crashes. | ||
| // This extension depends on that method, so it must also be guarded. | ||
| // Tracking: https://github.com/swiftlang/swift/issues/82529 | ||
| #if !compiler(>=6.2.3) | ||
| extension SelectStatement where QueryValue == (), From: PrimaryKeyedTable, Joins == () { |
There was a problem hiding this comment.
PR description/title focus on the SwiftPM circular-reference fix, but this file also introduces a new compiler-version guard that removes SelectStatement.find(_:key:) on Swift 6.2.3+. Please update the PR description to mention this behavioral/API availability change (or split it into a separate PR) so reviewers/users understand why the method disappears on newer compilers.
| // NB: Fork with Swift 6.3 fixes | ||
| .package(url: "https://github.com/doozMen/swift-sharing", branch: "fix/swift-623-optimizer-crash"), | ||
| .package(url: "https://github.com/pointfreeco/swift-snapshot-testing", from: "1.18.4"), |
There was a problem hiding this comment.
This PR also changes the swift-sharing dependency to a different branch, but the PR description only mentions the SwiftPM member-lookup/circular-reference fix. Please document why this dependency branch change is required here (or move it to a dedicated PR) to keep the change scoped and traceable.

Problem
The pattern
.package(url:...)insidepackage.dependencies.append()causes Swift 6.2.3 to confuse the member lookup with thepackagevariable, resulting in a "circular reference" error.Solution
Use the explicit type
Package.Dependency.package(url:...)to avoid this ambiguity.Testing