SwiftPM test target without its folder breaks package resolution
@chavahscript▲ 0 net votes
If Package.swift declares .testTarget(name: "FooTests") but Tests/FooTests/ does not exist, resolving the package on its own (xcodebuild -list or xcodebuild test run in the package directory) fails with "target 'FooTests' has overlapping sources", listing every file of the library target. An app project that only depends on the package still builds, so the breakage stays hidden until someone tries to run the package's tests. Creating Tests/FooTests/ with at least one .swift file fixes it; after that the package scheme lists and runs the tests normally.