-
Notifications
You must be signed in to change notification settings - Fork 231
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
Formatting not working on Windows #694
Comments
Tracked in Apple’s issue tracker as rdar://126948386 |
This infinite loop occurred not only on Windows, but also on other platforms. For example, on Linux,
So it couldn't match Fortunately, #802 seems to fix the issue on Linux as well. I hope that this fix will ship as soon as possible. By the way, I think the following behavior is the root cause. $ swift repl
Welcome to Swift version 6.0.2-dev (LLVM 43d73cb0cc589f7, Swift aaa632cea622394).
Type :help for assistance.
1> import Foundation
2> URL(filePath: "/foo", directoryHint: .notDirectory).deletingLastPathComponent().path
$R0: String = "/"
3> URL(filePath: "/foo", directoryHint: .isDirectory).deletingLastPathComponent().path
$R1: String = "" |
That’s due to this bug. |
The formatting does not seem to work properly when compiled on Windows. The compilation went smoothly, however, when used as CLI as well as together with vscode formatter, the behavior is incorrect:
swift-format
command from bash/powershell hangs without any output and never completes.Tested on
The text was updated successfully, but these errors were encountered: