[swift-build-dev] Namespacing SPM modules (was Re: [swift-dev] Right list?)

Jason Dusek jason.dusek at gmail.com
Thu Mar 3 02:12:08 CST 2016


The law of Demeter would seem to argue against modules exposing submodules;
or against packages exposing sub-packages. But I am not sure which.

On Mon, 29 Feb 2016 at 14:08, Max Howell <max.howell at apple.com> wrote:

> 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.
>>
>
> Does that allow us to refer to the names of modules qualified by their
> package name? It seems weird to not have hierarchical names for
> packages/modules (though I recognize these are not really the same thing,
> many languages/systems conflate the package namespace with the module
> namespace).
>
>
> The current system does not allow Package name to be used as a namespace,
> unless it is a package of one module and that module uses the same name as
> the Package.
>
> Not that I’m saying this wouldn’t be a good thing.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-build-dev/attachments/20160303/3a427d3e/attachment.html>


More information about the swift-build-dev mailing list