-
Notifications
You must be signed in to change notification settings - Fork 129
Enforce use of throwing AbsolutePath
initializer
#353
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
Enforce use of throwing AbsolutePath
initializer
#353
Conversation
@@ -72,3 +72,19 @@ extension FileSystem { | |||
} | |||
} | |||
} | |||
|
|||
public extension AbsolutePath { | |||
init(path: StaticString) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without an argument label, the String
version of the initializer seemed to always get chosen, so I ended up just adding an argument label. These initializers are a convenience for tests which often deal with static paths.
@swift-ci please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great. couple of small questions
Interesting, not sure why this didn't show up locally |
@swift-ci please test |
5b95470
to
d1e5175
Compare
@swift-ci please test |
d1e5175
to
785b81e
Compare
@swift-ci please test |
Looks like at least on macOS we're reaching the swift-driver build now. |
785b81e
to
dbdc714
Compare
@swift-ci please test |
5712700
to
7549b5d
Compare
Updated the approach slightly here, I am keeping In a future PR, we can remove the deprecated initializers and |
@swift-ci please test |
We are moving to a better model for TSC's path APIs in swiftlang/swift-tools-support-core#353. The previous API is still available (but deprecated) as much as possible, but since SourceKit-LSP was using `resolveSymlinks` (which is now throwing) quite a bit, there are some changes necessary.
7549b5d
to
83d3f52
Compare
We are moving to a better model for TSC's path APIs in swiftlang/swift-tools-support-core#353. The previous API is still available (but deprecated) as much as possible, but a small change is necessary here.
In support of swiftlang/swift-package-manager#5797