You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 extension is 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 of willMove was not being directly imported (it may also be relevant that the type of willMove is 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.
The text was updated successfully, but these errors were encountered:
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!
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!
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:extension
is not directly imported by the module that references the extensionself.mapView.rx.willMove
, and the module that defines the type ofwillMove
was not being directly imported (it may also be relevant that the type ofwillMove
is 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.
The text was updated successfully, but these errors were encountered: