Here is the initial implementation plan:
Bootstrapping and CI infrastructure:
We want tools-support-core to be a Swift package but we also want to leverage Swift CI infrastructure to add CI support. We need a way to bootstrap this library on the CI without using SwiftPM as we need a cross platform solution to easily bootstrap for all platforms that are currently supported and the new platforms that might be added in the future. To solve this problem, we will add a new backend in SwiftPM to emit a Makefile. The Makefile support will be only accessible using an hidden flag and will be intended to be used only for Swift related projects. We will check-in the Makefile to tools-support-code and execute it on the CI using Swift's build-script to build and test the project. Most of the time, a contributor is expected to only require a recent trunk toolchain to build the repository using the SwiftPM that is present in the toolchain.
Makefile location and layout:
TBD.
Module prefix:
Currently, Swift requires module names to be unique across the package graph. To avoid conflict with other modules in the package graph, we will use the prefix "TSC" in all of the modules in this repository.
Git history:
Git history is usually a very useful feature but re-writing it could be annoying. Given that we don't really have huge amount of code that we want to factor out, we will do a "best effort" of preserving the git history.
ToolsSupportCore product:
We will create a "ToolsSupportCore" library product in the Swift package. This product will re-export all library targets that the package wants to make "public".