From the swift.org forums, this solution was presented:
Inside of PackageA, replace all
import PackageB
with
@_implementationOnly import PackageB
There may be some side-effects, but so far it has worked exactly as desired in several different scenarios.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: