Xcode bundles all of swift-collection's products even though only one is selected

I've added swift-collections to a project and I only selected OrderedCollections to be added to my target.

Coincidentally, I was investigating the size of my apps binary (built and archived with Xcode for App Store Connect) with bloaty and I saw that every package product of swift-collections was somehow linked to the binary (HeapModule, RopeModule, ...).

This was the command: bloaty -d compileunits --debug-file=Path_to_dsym_file.dSYM/Contents/Resources/DWARF/{YOUR_APP_NAME} path_to_your_app_binary -n 0

After that I tried importing one of these packages, which just worked, even though as mentioned I did not select them when adding the package. Is this a limitation/bug/feature of Swift Package Manager, or even Xcode? Is this to be expected?

I am using Xcode 15.4.

Xcode bundles all of swift-collection's products even though only one is selected
 
 
Q