Hello Swift community,
The review of SE-0444: Member import visibility ran from September 11...23, 2024.
Discussion was universally positive on the feature itself; reviewers described the existing behavior as "weird", "leaky", and "spooky-imports-at-a-distance". Several also mentioned that it had impeded the development of tools.
The most prominent point of discussion was about other situations where the contents of modules that haven't been explicitly imported by a specific source file can still affect how the compiler processes it, such as:
- Conformances, particularly retroactive conformances
- Custom operator and precedence group declarations
- Uses of unimported types through type inference (i.e. the type is used without explicitly mentioning it)
- Other situations where the compiler internally uses its knowledge of declarations that have not been explicitly imported for e.g. optimization
- Promiscuous clang re-exports
The Language Steering Group believes these topics are best left for future proposals. Fixing conformance visibility would require significant additional technical work; fixing operator and precedence group visibility might require a holistic rework of the language rules and compiler subsystems used for them; and for the others, it is not even necessarily clear whether we should consider the behavior to be incorrect or what should be done to address it. In all such cases, though, we believe it is appropriate to sever the work from this proposal. SE-0444 makes significant headway on the overall project; we invite pitches and discussion on further steps to take.
The Language Steering Group has therefore chosen to accept the proposal. Thank you all for your participation in the discussion!
Becca Royal-Gordon
SE-0444 Review Manager