fix(deps): guard sibling-path detection against SwiftPM's own checkout layout#29
Open
gsdali wants to merge 1 commit into
Open
fix(deps): guard sibling-path detection against SwiftPM's own checkout layout#29gsdali wants to merge 1 commit into
gsdali wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.