Allow schemes to add external targets specially unit tests #4837
Replies: 2 comments 2 replies
-
Regarding 2, I think that you rarely want test to import test targets of your dependencies, unless they are internal dependencies distributed as SPM. |
Beta Was this translation helpful? Give feedback.
-
Thanks for proposing this @shahzadmajeed Does Tuist need to run the tests for external dependencies? if it's for CI purposes, perhaps have the CI separately run I fear this may unnecessarily complicate the dependency feature of Tuist which was intended for external dependencies which as @danyf90 points wouldn't be typically tested as part of the project. |
Beta Was this translation helpful? Give feedback.
-
Hello,
Based on the thread here https://tuistapp.slack.com/archives/C018QG7U7SN/p1664558358448169 it seems like following would be a good addition to Tuist
Proposal:
TargetReference
representing external targetTarget
by specifying project folder path.Implementation:
.external(name: String)
onTargetReference
will be useful. This is non-breaking change and a nice addition which shouldn't have any implication on current use cases. Users can manually opt-in if they want to use this featuretestableTargetsFromPackages: [package_name]
array ortestableTargets: [package_name: [target_name]]
for users to opt-in. Another option is a filtertestableTargetsOptInFilter: ((packageName: String, targetName: String) -> String)? = nil)
which defaults to nil which means user is not opting for testing dependencies.Opening up this thread for discussion and suggestion before I start implementation. Thank you!
-Shahzad
Beta Was this translation helpful? Give feedback.
All reactions