[Pitch] SPM: Allow targets to depend on products in the same package

I have implemented it as .product(name:), so referencing products from the same package requires not passing a package name.

Now I wonder about moduleAliases and condition. Currently I pass both through, but I started testing and realized they don’t work (at least moduleAliases, haven’t checked condition yet).

It may be possible to get both to work, now I am wondering whether they are needed.

Pro: It may simplify local package refactorings like merging two packages into one, if those are using moduleAliases and/or condition.

Con: I wonder whether this is needed in the same package, if not I would just add unneeded extra complexity.

I would love to hear opinions on this! :slight_smile:

… I missed something: moduleAliases won't help when merging packages as we would end up with targets having the same name :person_facepalming: . I'll remove it for now, and will look into condition next.