-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Reduce use of AbsolutePath
with precondition failure
#5797
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
Reduce use of AbsolutePath
with precondition failure
#5797
Conversation
ef50e94
to
f68a78a
Compare
@swift-ci please smoke test |
Moved to draft since I'll be addressing the remaining call sites as well as discussed. |
f68a78a
to
9a04192
Compare
9a04192
to
1c9a81e
Compare
swiftlang/swift-tools-support-core#353 |
Since it comes up regularly as a perceived user facing crash, we should reduce our use of the plain `AbsolutePath` initializer. I actually don't think it makes sense to even provide a non-throwing initializer that takes anything but a `StaticString` and even that's debatable. This doesn't resolve all possible uses and specifically excludes uses in tests, but does fix several user facing issues, e.g. ``` ❯ export SWIFTPM_TESTS_MODULECACHE=blah ❯ swift test zsh: illegal hardware instruction swift test ```
1c9a81e
to
136ffef
Compare
swiftlang/swift-tools-support-core#353 |
Self-hosted jobs are expected to fail because they don't support cross-repo testing. |
swiftlang/swift-driver#1204 |
In #5797, I introduced the outer `do`-block here, but did not move the existing `defer` from the now inner `do`-block. Related to rdar://101956252
Since it comes up regularly as a perceived user facing crash, we should reduce our use of the plain
AbsolutePath
initializer. I actually don't think it makes sense to even provide a non-throwing initializer that takes anything but aStaticString
and even that's debatable.This doesn't resolve all possible uses and specifically excludes uses in tests, but does fix several user facing issues, e.g.