[swift-build-dev] Proposal: SwiftPM Test Naming Conventions

Ankit Agarwal ankit at ankit.im
Tue Jul 19 16:32:28 CDT 2016


Hi,

Great to see this proposal! Looks awesome! Just have couple of doubts:


>    1.
>
>    For now, make it an error to have executables or libraries under Tests (for
>    technical reasons, a LinuxMain.swiftsource file is permitted, and
>    indeed expected, under the Tests top-level directory). The intent is
>    to loosen this restriction in a future proposal, to allow test-specific
>    libraries and test executables under Tests.
>
>
Is there a reason we want to not allow library modules under Tests right
now? I think keeping test-specific library modules under Tests makes more
sense. With the convention change in this proposal all modules that do not
end in Test can just act as normal modules on which Test targets can depend
on.
And Test targets would be able to define dependency on modules under
Sources or Tests folder.

>
>    1.
>
>    For now, make it an error to have tests under Sources. We may loosen
>    this this restriction at some point, but would need to define what it would
>    mean from a conceptual point of view to have tests under Sources instead
>    of Tests.
>
> This mean that a module name that ends in `Tests` under `Sources` (even
though its not an actual test) will not be allowed. I am not sure if that
should be enforced, it might be too much magic.



-- 
Ankit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-build-dev/attachments/20160720/5223613b/attachment.html>


More information about the swift-build-dev mailing list