Skip to content

fix(deps): guard sibling-detection against .build/checkouts false-positive#27

Merged
gsdali merged 1 commit into
mainfrom
fix/sibling-detection-guard
Jul 1, 2026
Merged

fix(deps): guard sibling-detection against .build/checkouts false-positive#27
gsdali merged 1 commit into
mainfrom
fix/sibling-detection-guard

Conversation

@gsdali

@gsdali gsdali commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

The occtDep helper takes a local .package(path: "../<name>") whenever ../<name>/Package.swift exists. SwiftPM lays every transitive checkout out flat under one .build/checkouts/, so when this package is resolved as a dependency, ../<name> spuriously exists and the dep flips to a path — conflicting with the same package resolved by URL elsewhere, producing SwiftPM Conflicting identity warnings that are slated to become hard errors.

Fix: guard the sibling branch with !manifestDir.contains("/.build/") so only a real local dev clone uses the path dep. Mirrors SecondMouseAU/OCCTSwiftScripts#70.

Refs SecondMouseAU/ecosystem#14.

🤖 Generated with Claude Code

…itive

The occtDep helper used a local `.package(path: "../<name>")` whenever
`../<name>/Package.swift` existed. SwiftPM lays every transitive checkout out
flat under one `.build/checkouts/`, so when this manifest is itself resolved as
a dependency, `../<name>` spuriously exists and flips the dep to a path — which
conflicts with the same package resolved by URL elsewhere in the graph, so
SwiftPM emits a "Conflicting identity" warning (slated to become a hard error).

Guard the sibling branch with `!manifestDir.contains("/.build/")` so only a real
local dev clone takes the path dep. Mirrors SecondMouseAU/OCCTSwiftScripts#70.

Refs SecondMouseAU/ecosystem#14.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@gsdali gsdali merged commit f0100d3 into main Jul 1, 2026
@gsdali gsdali deleted the fix/sibling-detection-guard branch July 1, 2026 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant