Skip to content

TSCBasic: special case a few leading character cases for Path #324

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
Jun 3, 2022

Conversation

compnerd
Copy link
Member

The UNIX implementation special cases / and ~ which SPM depends on.
Handle the invalid file system character ~ specially on Windows as
well. As we are now getting closer to normalized path spellings, we
need to add a special case for the leading path separator character. On
UNIX, this signifies the root of the singular unified file system view.
However, Windows presents a forest to the user with 26 roots.
Consequently, a path headed by the path separator is a relative path
rather than an absolute path. However, we treat the root-relative path
as an invalid relative path for the time being as the representation is
not flexible enough to account for this model.

The UNIX implementation special cases `/` and `~` which SPM depends on.
Handle the invalid file system character `~` specially on Windows as
well.  As we are now getting closer to normalized path spellings, we
need to add a special case for the leading path separator character.  On
UNIX, this signifies the root of the singular unified file system view.
However, Windows presents a forest to the user with 26 roots.
Consequently, a path headed by the path separator is a relative path
rather than an absolute path.  However, we treat the root-relative path
as an invalid relative path for the time being as the representation is
not flexible enough to account for this model.
@compnerd
Copy link
Member Author

@swift-ci please test

@tomerd tomerd merged commit 332afc8 into swiftlang:main Jun 3, 2022
@compnerd compnerd deleted the special-relativity branch June 5, 2022 15:22
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.

3 participants