Importing Code into Package.swift

Swift itself doesn’t have the syntax for that yet. The most recent thread about that I can find is here.

Certainly.

To make the above proposal also reliable for use in a manifest with a relative path, you would need to codify some additional specifications about how SwiftPM treats a package repository. For example, at the moment SwiftPM is allowed to fetch the manifest on its own without the rest of the repository while it figures out which version of the rest it actually needs. Something would need to be done to ensure the relative path doesn’t end up pointing into a void.

1 Like