On the road to Swift 6

On the subject of tooling, there are 2 things I would really like:

  1. Ship swift-format with the official toolchain.

There was a huge discussion about this last time, but @tkremenek's last post indicates that it's still considered important for the project to offer a formatting tool. swift-format is already kind-of part of the toolchain, because it drives SourceKit-LSP's formatting functionality. Unfortunately, the executable tool itself is not available (at least on Apple's toolchains).

Even if we have different formatting preferences, it's really nice to have a tool that is available everywhere. It really helps when collaborating on open-source projects, where every project has its own style, and everybody uses different IDEs with different levels of support for Swift.

  1. Documentation lookup/generation.

I can't tell you how useful this would be. I don't feel that we do enough with our documentation comments, and the level of information that can be obtained by integrating this with the compiler is really great. @owenv posted a demo here, and I would love to see it also become part of the toolchain eventually. If it had a markdown renderer, this would be a really nice way to generate documentation pages for your packages. Again, not everybody uses IDEs with great Swift support built-in.

12 Likes