`import A` transitively imports B, half way

In my app I am importing module A which has a dependency on module B. Without directly writing import B from my app, I could still see public methods in extensions (of, say, Int) that B defines, but not public types or standalone functions that B defines. Is this disparity a bug or a feature? FTM A doesn't use @_implementationOnly for its B usage.

This looks like exactly the issue that SE-0444: Member Import Visibility addresses. What changes when you enable/disable the MemberImportVisibility upcoming feature flag (assuming you're on Swift 6.1)?

2 Likes