Hello,
How hard would it be for this unused imports script to support the usage of @_exported?
For example, say I have a module X that does this:
// My custom module `X`
@_exported import SwiftUI
Then in some other module, Y, we reference the exported module, but no symbols in the actual module `X:
// Inside module `Y`
import X
print(String(describing: Text("Hello world")) // usage of SwiftUI, but no usage of module `X` symbols
Would the unused imports job remove import X because it thinks its "unused", when in reality, its exported symbols/module is still referenced, therefore it shouldn't be removed?
|
let alwaysKeepImports: Set<String> |
Any help or guidance would be greatly appreciated, thanks!
Hello,
How hard would it be for this unused imports script to support the usage of
@_exported?For example, say I have a module
Xthat does this:Then in some other module,
Y, we reference the exported module, but no symbols in the actual module `X:Would the unused imports job remove
import Xbecause it thinks its "unused", when in reality, its exported symbols/module is still referenced, therefore it shouldn't be removed?swift-index-store/Sources/unused-imports/main.swift
Line 26 in 9cd7ac9
Any help or guidance would be greatly appreciated, thanks!