So I have been working more and more with the SwiftPM and updating both personal and work projects to use it. Lately I’ve seen quite a few pitches that rely on every
SomeSwiftPackageManagerConfigFile.swift to be a top level file in a project. I was thinking it might be helpful to keep things organized if there was a way to use a directory to contain the support files that are likely going to become part of the package manager at some point.
My thought being that then a
Package.swift or maybe
Workspace.swift (if such a file comes to exist) can optionally be the only allowed top file that is part of the build system with the rest nested below.
I think it should be similar to the
pkgConfig property of a
Package in its usage. The naming here is
configDirectory just for simplicity, I don’t imagine it is a good name in the long term.
let package = Package( name: "Example", configDirectory: "SwiftPMConfig/", products: ... )