From 2c049c6e8ba82043cf6e71bb44a955f74054fa70 Mon Sep 17 00:00:00 2001 From: Andrew Watt <100192+watt@users.noreply.github.com> Date: Thu, 3 Oct 2024 15:28:25 -0700 Subject: [PATCH] fix: explicit test dependencies (#304) These weren't being picked up on CI but could fail to build locally. The Tuist option to enforce dependencies should help detect similar stuff in the future. --- Package.swift | 2 +- Samples/Project.swift | 10 ++++++++-- Samples/Tuist/Config.swift | 8 ++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 Samples/Tuist/Config.swift diff --git a/Package.swift b/Package.swift index b66b8675..352115c7 100644 --- a/Package.swift +++ b/Package.swift @@ -173,7 +173,7 @@ let package = Package( ), .testTarget( name: "WorkflowRxSwiftTests", - dependencies: ["WorkflowRxSwiftTesting"], + dependencies: ["WorkflowRxSwiftTesting", "WorkflowReactiveSwift"], path: "WorkflowRxSwift/Tests" ), .target( diff --git a/Samples/Project.swift b/Samples/Project.swift index 69a8bc4f..625dce25 100644 --- a/Samples/Project.swift +++ b/Samples/Project.swift @@ -179,7 +179,10 @@ let project = Project( .unitTest( for: "WorkflowConcurrency", sources: "../WorkflowConcurrency/Tests/**", - dependencies: [.external(name: "WorkflowConcurrency")] + dependencies: [ + .external(name: "WorkflowConcurrency"), + .external(name: "WorkflowTesting"), + ] ), .unitTest( for: "WorkflowConcurrencyTesting", @@ -201,7 +204,10 @@ let project = Project( .unitTest( for: "WorkflowRxSwift", sources: "../WorkflowRxSwift/Tests/**", - dependencies: [.external(name: "WorkflowRxSwift")] + dependencies: [ + .external(name: "WorkflowRxSwift"), + .external(name: "WorkflowReactiveSwift"), + ] ), .unitTest( for: "WorkflowRxSwiftTesting", diff --git a/Samples/Tuist/Config.swift b/Samples/Tuist/Config.swift new file mode 100644 index 00000000..e52eb110 --- /dev/null +++ b/Samples/Tuist/Config.swift @@ -0,0 +1,8 @@ +import ProjectDescription + +let config = Config( +// This breaks snapshot tests, because iOSSnapshotTestCase depends on XCTest. +// ENABLE_TESTING_SEARCH_PATHS should sufficient but doesn't seem to work with +// enforceExplicitDependencies enabled. +// generationOptions: .options(enforceExplicitDependencies: true) +)