Skip to content

6.0 [windows] path: drop the trailing backslash before invoking PathCchRe…#480

Merged
compnerd merged 1 commit into
release/6.0from
eng/6-tsc-windows-dirname-fix
Aug 6, 2024
Merged

6.0 [windows] path: drop the trailing backslash before invoking PathCchRe…#480
compnerd merged 1 commit into
release/6.0from
eng/6-tsc-windows-dirname-fix

Conversation

@hyp

@hyp hyp commented Aug 5, 2024

Copy link
Copy Markdown
Contributor

…… (#479)

(cherry picked from commit a76104d)

Explanation: After new swift-foundation was adopted on windows, swiftpm failed to build a project when your SDKROOT environment variable had a trailing '\' on windows. This was due to Info.plist not being found that was needed for the XCTest include paths. This was because dirname on a windows path now returned the original path without going up a level if the path had a trailing '\' as PathCchRemoveFileSpec doesn't remove the dirname in that case. This regression was addressed by dropping the trailing '' before calling PathCchRemoveFileSpec.
Scope: windows path handling, tools like SwiftPM that use TSC.
Risk: Low, only impacts paths that have a trailing '\'.
Testing: Unit tests, manual testing of SwiftPM locally and in a github workflow
Reviewer: @compnerd
Main branch PR: #479

@hyp

hyp commented Aug 5, 2024

Copy link
Copy Markdown
Contributor Author

@swift-ci please test

@MaxDesiatov MaxDesiatov changed the title [windows] path: drop the trailing backslash before invoking PathCchRe… 6.0 [windows] path: drop the trailing backslash before invoking PathCchRe… Aug 5, 2024
@MaxDesiatov

Copy link
Copy Markdown
Contributor

@swift-ci test windows

@compnerd compnerd merged commit 3e5d9c8 into release/6.0 Aug 6, 2024
@compnerd compnerd deleted the eng/6-tsc-windows-dirname-fix branch August 6, 2024 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants