Skip to content

Does unused imports support @_exported? #67

@josh-arnold-1

Description

@josh-arnold-1

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions