Dot-nesting framework names for usage in Swift remains impossible, right?

Using SPM, we can put dots in targets, which is nice for e.g. test target names:

12%20AM

But vended as a product, a dot will become an underscore. :face_vomiting:

I want this sort of thing:

import QuartzCore.CAAnimation

Now that I'm using SPM (which seems pretty great! :smiley_cat:), I'm revisiting the problem, which I've never solved before. I'm just checking to make sure that it is indeed unsolvable, even in these days of SPM, which is so great about dependency resolution that one might think maybe it'd be easy to build a Parent.Child off of a Parent, even without real namespaces.

1 Like

Some related discussion in Pitch: Fully qualified name syntax

AFAIK there isn't anything currently available that will do what you're looking for. The only thing I can think of that comes close is having multiple targets (importable modules) in one package. However there is no parent/child relationship.

I'm expecting "Sub"/"Child" Packages will be added at some point. I can't speak to how that's prioritized or whether there is progress being made toward a full proposal.

2 Likes