> On Jan 5, 2016, at 12:21 PM, Paul Cantrell <[email protected]> wrote:
> 
> Thanks for the clarifications. This helps me understand much better how the 
> proposal plays out.
> 
>> On Jan 5, 2016, at 2:14 PM, Max Howell <[email protected]> wrote:
>> 
>>> 1. The proposal talks in several places about “test modules” (for example, 
>>> “test-module is created per subdirectory of Tests”). How do these test 
>>> modules interact with Package.swift? Does each of them have a separate 
>>> target? If so, how is the test module name specified in the Target(…) entry?
>> 
>> There is no support for referring to test targets in the Package.swift as 
>> part of this proposal.
>> 
>>> 2. Perhaps answered by #1, how does Package.swift specify test-only 
>>> dependencies (e.g. Quick) that are necessary to build tests, but should not 
>>> be exported to downstream projects?
>> 
>> This is already a part of the package manager: 
>> https://github.com/apple/swift-package-manager/pull/74
> 
> Cool. Hadn’t seen the private dependencies yet.
> 
> Taking 1 and 2 together, does that mean that all dependencies necessary for 
> _all_ the test modules must be downloaded & compiled in order to run _any_ or 
> them? Not ideal, but not a deal-killer either

Yes, and indeed, this isn’t really acceptable, but I think any changes to how 
this work would involve a discussion on the swift-build-dev mailing list. 
Really how targets depend on each other and external dependencies in the 
Package.swift manifest needs some work in general.

>>> 3. You propose that “building a module also builds that module's 
>>> corresponding tests.” Does this apply only to the top-level package, or to 
>>> all of its dependencies? For example, if my FooApp depends on BarLib, and 
>>> BarLib’s tests depend on HugeFancyTestFramework, do I have to download and 
>>> compile HugeFancyTestFramework in order to build FooApp? (Hopefully not!)
>> 
>> HugeFancyTestFramework will not be downloaded or built.
> 
> That’s a relief!

Probably people would want an option to do this though. You should be running 
and checking the tests of your dependencies somewhat regularly.

But when developing your own software, this would be a waste of engineering 
time.

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to