After a seven month hiatus exploring things like SwiftUI and multi-threaded development I’ve had some time to take a second run at this concept over the vacation break and filed a new PR. A 5.2 toolchain is available: http://johnholdsworth.com/swift-LOCAL-2020-01-17-a-osx.tar.gz with a fairly complete implementation if you want to explore the possibilities.
As a potential new feature for Swift it's both powerful yet easy to understand though the full ramifications take a while to appreciate. It’s the proverbial double edged sword where not only is behaviour from all inherited protocols adopted by protocol being extended but also all protocols and nominals (classes, structs) that adopt the protocol are extended by inference. I’m sure in the wrong hands that will lead to some pretty exasperating code but rest assured you can still alt-click in Xcode to get to the actual implementation.
One feature of the toolchain is that while it works across modules it cannot currently access-control adoption of inherited protocols so the extension must be public to indicate this. Right now I’m looking for more test data and crash reports with code you would expect to work so I can round the implementation out as a proof of concept with a view to eventually putting it up for review.
I’ve made a small SPM app GitHub - johnno1962/ExtApp: Example SPM app with conforming protocol extensions available with some examples if you want to kick the tires with the toolchain.
$ curl http://johnholdsworth.com/swift-LOCAL-2020-01-17-a-osx.tar.gz | tar tfvz - -C ~
$ git clone https://github.com/johnno1962/ExtApp
$ cd ExtApp
$ ~/Library/Developer/Toolchains/swift-LOCAL-2020-01-17-a.xctoolchain/usr/bin/swift build
$ .build/debug/ExtApp