[swift-evolution] Proposal: SwiftPM Target Access Control

Tanner Nelson me at tanner.xyz
Thu Jul 7 16:47:23 CDT 2016


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160707/cab3bac0/attachment.html>


More information about the swift-evolution mailing list