Skip to content

Commit 1aa2975

Browse files
Stijn Willemsclaude
andcommitted
fix: Use explicit Package.Dependency type to avoid Swift 6.2.3 circular reference bug
The pattern `.package(url:...)` inside `package.dependencies.append()` causes Swift 6.2.3 to confuse the member lookup with the `package` variable, resulting in a "circular reference" error. The fix uses the explicit type `Package.Dependency.package(url:...)` to avoid this ambiguity. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 039af24 commit 1aa2975

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Package.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ for index in package.targets.indices {
107107

108108
#if !os(Windows)
109109
// Add the documentation compiler plugin if possible
110+
// NB: Use explicit type to avoid Swift 6.2.3 circular reference bug
110111
package.dependencies.append(
111-
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
112+
Package.Dependency.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
112113
)
113114
#endif

0 commit comments

Comments
 (0)