In other build systems like Bazel and Buck, you can reference other build targets by using a notation that indicates a path to target describing file relative to some base folder. E.g. in Buck, you'd do
//libraries/core/log:log
Which will look for BUCK file at libraries/core/log/BUCK and then use log target from it as dependency. This works relative to .buckconfig file which is usually added to the root of the repo.
In SPM, there is a path based target dependency present, but in order to use it, you have to use relative paths which is annoying a bit.
The general idea seems reasonable to me. I'd prefer to configure this using the existing path: parameter though. Maybe something like path: .repositoryRoot("Libraries/Printer"). The existing semantics and .repositoryRoot will be equivalent when the package is already at the repo root so maybe SwiftPM should allow only one of them in that case.
The existing semantics and .repositoryRoot will be equivalent when the package is already at the repo root so maybe SwiftPM should allow only one of them in that case.
Didn’t get you, could you elaborate with a sample case please?