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
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.
dependencies: [ .package( path: "../../../../Printer" ), ],
Are there any plans to introduce a syntax to reference the targets in local
Package.swift files in a cleaner way? Perhaps, something like
dependencies: [ .package( pathRelativeToRepositoryRoot: "Libraries/Printer" ), ],