Open davdroman opened 2 years ago
Thanks for the PR. I'll review it ASAP
Hi,
I’ve just learned about @_implementationOnly
. I think it allows to hide the internal deps from the consumer. Perhaps it could address the issue you’re describing?
Have you already used such a statement?
AFAIK that only helps ensure that internal modules aren't visible to consumers, but schemes are still exported because they're included in the .swiftpm
folder so Xcode sees them regardless of module visibility.
This is a nice addition! Without this Xcode selects AsyncExtension
as active scheme because it starts with "A" instead of my host SPM project Foo
which has a dependency on AsyncExtension
. The effect of this is when I open Xcode and press CMD U to test, Xcode tries to test AsyncExtension which fails.
Description
When consuming this library as a dependency in my project, I noticed Xcode autogenerated a scheme for the library among my local schemes, which is not desirable behavior.
As a workaround, this PR gitignores .swiftpm altogether and introduces an xcworkspace as a scheme container that disallows SPM from leaking schemes onto consumers.
Libraries as big as TCA use this approach to effectively hide away all its schemes (and subdependency schemes) from users.
Checklist
unit tests cover the new feature or the bug fixthe feature is documented in the README.md if it makes sense