Swift-format hangs without configuration

Basically the title. If I run swift format -ir Sources/, it maxes out one CPU core and does nothing. I let it sit like this for a full two minutes. Then, I killed it and added --configuration "{}" and it finished in under a second.

This has to be a bug, right? Has anyone else encountered this before?

Which version of Swift are you using? This sounds like an issue we had in Swift 6.0 but it should be fixed in 6.1, maybe even 6.0.2 or 6.0.3, I don’t quite remember.

I just ran it in a docker container with 6.0.3 (Ubuntu Noble) and it appears to have worked:

root@e805d7528610:/tmp# git clone https://github.com/apple/swift-nio
Cloning into 'swift-nio'...
remote: Enumerating objects: 27372, done.
remote: Counting objects: 100% (113/113), done.
remote: Compressing objects: 100% (85/85), done.
remote: Total 27372 (delta 64), reused 28 (delta 28), pack-reused 27259 (from 3)
Receiving objects: 100% (27372/27372), 10.96 MiB | 16.01 MiB/s, done.
Resolving deltas: 100% (21365/21365), done.
root@e805d7528610:/tmp# cd swift-nio/
root@e805d7528610:/tmp/swift-nio# swift format -ir Sources/
root@e805d7528610:/tmp/swift-nio# swift format -v
main
root@e805d7528610:/tmp/swift-nio# swift -version
Swift version 6.0.3 (swift-6.0.3-RELEASE)
Target: x86_64-unknown-linux-gnu

Yeah, I'm on 6.0.2. Good to know it's been fixed.