Not all transitive references are corrected by require_explicit_imports
Describe the bug
We use require_explicit_imports: true, and have some found some cases where SwiftLint does not add imports for transitively used swift modules. The ones I've seen so far are:
- Use of functions defined on extensions, where the module that defines the
extensionis not directly imported by the module that references the extension - Calling functions that have parameters with default values, and where the function/initializer of the default is defined in a module not directly imported
- References to type metadata from modules not directly referenced. For example, one case was
self.mapView.rx.willMove, and the module that defines the type ofwillMovewas not being directly imported (it may also be relevant that the type ofwillMoveis a generic and it conformed to a protocol)
In these cases, if the import does exist, the unused_import rule will remove it, which prevents manual fixes.
The main purpose of this issue is to see if these have been discussed, and to see if these implicit references are visible from SourceKit. These cases were identified when switching to dynamic linking, instead of static linking.
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!
Still relevant
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!