Currently, the Remove unused imports code action only removes import declarations that are at the top level and not nested inside #if clauses. We should be able to also remove import declarations from those #if branches that are active in the current build configuration. For that, SourceKit-LSP needs to know which #if branches are active. While we could use the active regions sourcekitd requests, I think the cleaner design would be to implement a SwiftIfConfig.BuildConfiguration that gets its results from sourcekitd, similar to CompilerBuildConfiguration in the compiler’s repo.