Reputation: 169
I am adding a dependency Package, and I am getting this error at build time:
error: NoSources("[...]/Tests/TestResources")
Please tell me how to get past this error. Is there a way to instruct SPM not to go into the Tests
for a specific dependency? A package-specific exclude: []
statement or something.
$ swift --version
Swift version 3.0-dev (LLVM b361b0fc05, Clang 11493b0f62, Swift 24a0c3de75)
Target: x86_64-unknown-linux-gnu
Thank you!
Upvotes: 0
Views: 150
Reputation: 3427
You have exclude
directive in Package.swift - https://github.com/apple/swift-package-manager/blob/master/Documentation/Package.swift.md
It seems you are using the snapshot of swift of March 1st, there is a defect in this version regarding excluding files in Tests https://bugs.swift.org/browse/SR-864. It is solved in the later versions, so you can switch to a newer version, the last one is of 24-th of March.
As a temporarily workaround, if you still want to use your current version of swift, you can just move TestResources
out of Test
directory.
Upvotes: 1