Just made an account to say the same thing. Please, please, please Apple, this needs to be fixed. This is clearly a bug that's causing a lot more harm than it's theoretically trying to prevent and this thread is proof of it. Unbelievable.
Post
Replies
Boosts
Views
Activity
This is indeed undesirable behavior. I'm not sure whether Apple is aware but you should file a feedback for it.
In the meantime, there's a workaround you can propose to your third party libraries' maintainers to adopt, and it consists on using an xcworkspace as the scheme container as opposed to .swiftpm. Example: https://github.com/sideeffect-io/AsyncExtensions/pull/29.
As I said, unfortunately this is up to the maintainers to adopt, not you, as Xcode reads the checked in .swiftpm folder from your dependencies and grabs the schemes from there without you having a say in it. Again, probably undersirable behavior and an oversight from the Xcode team, so worth filing a radar.
Are these packages of yours dependencies in Package.swift, or do they live locally alongside your project? If the former, then my answer applies (make sure to .gitignore .swiftpm from whatever repo you're storing your packages in). If the latter, then this is standard behavior from Xcode as it autogenerates schemes for all local package products.