Skip to content

[5.6] TSCBasic: rework relative path construction on Windows (#298) #308

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
Apr 4, 2022

Conversation

compnerd
Copy link
Member

@compnerd compnerd commented Apr 1, 2022

When constructing a path relative to a root, compose the final path
before canonicalization as the canonicalization may require lookups
in the base location.

We additionally pay a small penalty to convert the slashes to native
separators. This is purely for aesthetic purposes, it ensures that the
path is computed initially rather than delayed until use.

This in conjunction with swiftlang/swift-package-manager#4237 enables the
use of header search paths in SPM which are based in other targets.

When constructing a path relative to a root, compose the final path
before canonicalization as the canonicalization may require lookups
in the base location.

We additionally pay a small penalty to convert the slashes to native
separators.  This is purely for aesthetic purposes, it ensures that the
path is computed initially rather than delayed until use.

This in conjunction with swiftlang/swift-package-manager#4237 enables the
use of header search paths in SPM which are based in other targets.
@compnerd
Copy link
Member Author

compnerd commented Apr 1, 2022

@swift-ci please test

@compnerd
Copy link
Member Author

compnerd commented Apr 1, 2022

CC: @airspeedswift @ddunbar
Nomination for 5.6

@tomerd tomerd added the swift 5.6 This PR targets the 5.6 branch label Apr 2, 2022
@tomerd tomerd changed the title TSCBasic: rework relative path construction on Windows (#298) [5.6] TSCBasic: rework relative path construction on Windows (#298) Apr 2, 2022
@abertelrud abertelrud merged commit f6c8048 into swiftlang:release/5.6 Apr 4, 2022
@compnerd compnerd deleted the relativeTo-5.6 branch April 5, 2022 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
swift 5.6 This PR targets the 5.6 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants