Skip to content

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Sep 9, 2025

Not sure exactly what paths are triggering this on Windows, as all the
logs in swiftlang#2174 are within `C:\`. But the stacktrace seems to strongly
imply that we have an infinite loop here, so let's see if switching to
the native check fixes this now that
swiftlang/swift-foundation#976 is in.

Resolves swiftlang#2174

(cherry picked from commit ad69881)
@bnbarham bnbarham requested a review from a team as a code owner September 9, 2025 21:36
@bnbarham
Copy link
Contributor Author

bnbarham commented Sep 9, 2025

@swift-ci please test

@bnbarham
Copy link
Contributor Author

@swift-ci please test Windows platform

`containingXCToolchain` loops infinitely when given eg. `C:\foo\..\bar`.
The underlying cause is that `deletingLastPathComponent` does not remove
the `..` on Windows. On macOS it's potentially worse - it *adds* `..`.
We don't see the infinite loop on macOS/Linux though because
`AbsolutePath` already removes them (which is not the case on Windows).

Resolves swiftlang#2174.

(cherry picked from commit a082d41)
@bnbarham
Copy link
Contributor Author

@swift-ci please test

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