Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

hyp
Copy link
Contributor

@hyp hyp commented Aug 5, 2024

…… (#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
Copy link
Contributor Author

hyp commented Aug 5, 2024

@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
Contributor

@swift-ci test windows

@compnerd compnerd merged commit 3e5d9c8 into release/6.0 Aug 6, 2024
3 checks passed
@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