[swift-evolution] Proposal: SwiftPM Target Access Control
Ankit Agarwal
ankit at ankit.im
Fri Jul 8 03:23:12 CDT 2016
I agree with Tanner, an AccessControl enum clearly defines the access of a
target and provides flexibility for future.
On Fri, Jul 8, 2016 at 3:17 AM, Tanner Nelson <me at tanner.xyz> wrote:
> Really happy to see this proposal. It will cut build times for packages
> that use my library significantly.
>
> The only point I would bring up is about using a `Bool` for `isPrivate`.
> This obviously only gives us 2 levels of access control. Something like
> this would give more flexibility:
>
> enum AccessControl {
> case .public
> case .private
> }
>
> Target(name: "SampleCLI", dependencies: ["FooCore"], access: .private)
>
>
> Packages could possibly want more fine grained control over the access
> control. e.g, Package Foo wants only packages that *directly* depend on
> Foo to receive a module, but not packages that depend on a package Bar that
> depends on Foo. This would be much easier to add as an additional case to
> the `enum AccessControl` but impossible to add for `isPrivate: Bool`
>
> Thanks Ankit for the great proposal!
> Tanner
>
--
Ankit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160708/941eba5c/attachment.html>
More information about the swift-evolution
mailing list