[swift-dev] swift-format editor integration
kremenek at apple.com
Thu Apr 27 02:48:10 CDT 2017
My apologies for the delay.
Generally speaking, doesn't feel to me that these kinds of enhancements should be going into the 'swift' repository. We have some basic support files for editors in the repository, but largely those are there for historical reasons (largely convenience when the scope of the project was smaller) and their proper home should be probably reconsidered. To me the repository should really just be the compiler (and related infrastructure) and Standard Library sources — not a grab bag of anything related to Swift.
That said, it raises the question of where should such things go. Should we have one repository at all for editor support stuff that is a peer to the 'swift' repository? Would such an approach even work with the package mechanisms that exists in various editors? I vaguely recall from a prior discussion something about vim and packages needing to be in their own repository. Note that I don't use vim myself, so I'm not familiar with what vim users do these days as far as packages.
There is also a larger question of whether or not we need or should have "official" editor integration stuff in the main Swift repositories at all. I know it's a convenient place to put stuff, but the support model is not clear. Do we have an expectation that those files are relatively maintained and updated? And if so, by whom? The current files we do have there were added by folks working on the standard library or the compiler, and they use such files on a regular basis and because of that maintain them (at least for the use cases they care about). But I don't see a good path forward with the the 'utils' folder cluttered up with support files for all the different editors that are out there — which is why I think that ultimately even what we have today should probably move somewhere else.
> On Apr 24, 2017, at 4:07 PM, Saleem Abdulrasool <compnerd at compnerd.org> wrote:
> Jordan asked me to check with you about adding a simple helper for integrating swift-format into vim since the repository hasn't really added any editor integration stuff previously. It's just a python wrapper for invoking swift-format (much like clang-format).
> It is on GitHub as PR8610.
> Saleem Abdulrasool
> compnerd (at) compnerd (dot) org
More information about the swift-dev