Skip to content

fix(deps): guard sibling-path detection against SwiftPM's own checkout layout#29

Open
gsdali wants to merge 1 commit into
mainfrom
fix/occtdep-checkouts-guard
Open

fix(deps): guard sibling-path detection against SwiftPM's own checkout layout#29
gsdali wants to merge 1 commit into
mainfrom
fix/occtdep-checkouts-guard

Conversation

@gsdali

@gsdali gsdali commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Fleet-wide fix following the root cause discovered in OCCTSwiftScripts#69 / PR #70 (and matching OCCTSwiftIO's own 2026-06-23 fix): occtDep's sibling probe is a plain filesystem check with no guard against SwiftPM's own flat .build/checkouts/ layout, so this manifest's own dependency declaration can flip from url to path mid-resolution whenever this package is consumed transitively -- breaking resolution for any lean consumer with no root override. Adds the guard: only trust a sibling when this manifest's own directory is not inside a .build/ tree. Verified: swift build succeeds unchanged.

…t layout

occtDep's sibling probe (../<name>/Package.swift) is filesystem-based and fires whenever a same-named directory happens to exist next to this manifest — including when THIS manifest is itself a transitively-resolved SwiftPM checkout under a consumer's .build/checkouts/, where SwiftPM lays every dependency out as a flat sibling. Once a sibling checkout exists (a side effect of resolving it), ../<name> spuriously matches, flipping this manifest's own dependency declaration from url to path mid-resolution -- SwiftPM then reports the whole graph unresolvable for any lean consumer. Root-caused + verified via OCCTSwiftScripts#69/#70; matches the guard OCCTSwiftIO already adopted 2026-06-23.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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