[swift-build-dev] Namespacing SPM modules (was Re: [swift-dev] Right list?)
max.howell at apple.com
Mon Feb 29 13:55:48 CST 2016
> Consider the case where Erica has packages SwiftString, HTMLString, PGString, IBMString… These modules all have somewhat different dependencies — so you would not necessarily want to download and build all of them — but they do form a coherent whole under EricaString. Would this proposal allow for names like EricaString.Swift, EricaString.HTML and EricaString.IBM
In the current system a package can contain multiple modules. But a module cannot have submodules.
So you can have EricaSwiftString and EricaHTMLString modules or you could have a module called Erica that contained classes or structs called SwiftString and HTMLString, and thus you would (well, *could*) refer to them as Erica.SwiftString and Erica.HTMLString.
Your suggestion is perhaps similar to clang submodules (which Swift does not support afaik) coupled with a new capability in Package.swift to allow a user to declare that certain modules/submodules in certain packages should not be built.
Both things could be done. Though I don’t think it should be put in this particular namespacing proposal.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-build-dev