Skip to content

refactor windows path implementation out of UnixPath and into WindowsPath #343

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 2 commits into from
Jul 14, 2022

Conversation

tomerd
Copy link
Contributor

@tomerd tomerd commented Jul 13, 2022

motivation: every method on UnixPath has an #if os(Windows)

changes:

  • define WindowsPath, peer to UnixPath
  • move all windows code to WindowsPath, and all POSIX code to UnixPath
  • set PathImpl type alias accordingly

motivation: every method on UnixPath has an #if os(Windows)

changes:
* define WindowsPath, peer to UnixPath
* move all windows code to WindowsPath, and all POSIX code to UnixPath
* set PathImpl type alias accordingly
@tomerd
Copy link
Contributor Author

tomerd commented Jul 13, 2022

@swift-ci test

@tomerd tomerd requested review from compnerd July 13, 2022 21:04
@tomerd tomerd changed the title refactor windows path implmentation refactor windows path implementation out of UnixPath and into WindowsPath Jul 13, 2022
let string: String

static let root = UNIXPath(string: "/")
static let root = WindowsPath(string: "/")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this should be \.

Suggested change
static let root = WindowsPath(string: "/")
static let root = WindowsPath(string: "\\")
Suggested change
static let root = WindowsPath(string: "/")
static let root = WindowsPath(string: "/")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@compnerd
Copy link
Member

We probably should ensure that this doesn't regress SPM ... at the very least, please do a cross-repo test for building the toolchain with this.

@tomerd
Copy link
Contributor Author

tomerd commented Jul 13, 2022

@compnerd yes I kicked one off: swiftlang/swift-package-manager#5661

@tomerd
Copy link
Contributor Author

tomerd commented Jul 14, 2022

@swift-ci test

@tomerd tomerd enabled auto-merge (squash) July 14, 2022 03:00
@tomerd tomerd merged commit 1c44814 into swiftlang:main Jul 14, 2022
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