Skip to content

Commit

Permalink
filtering out libraries with no interface jars | #BAZEL-759 Done
Browse files Browse the repository at this point in the history
check for non-empty outputs

check for non-empty sources

filter out libraries with no interface jars


Merge-request: BAZEL-MR-863
Merged-by: Katarzyna Mielnik <katarzyna.mielnik@jetbrains.com>
  • Loading branch information
mielnikk authored and Space Team committed Feb 23, 2024
1 parent c13c02f commit ec41697
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -300,6 +300,7 @@ class BazelProjectMapper(
interfaceJars = getTargetInterfaceJars(targetInfo).map { it.toUri() }.toSet(),
)
}
.filterValues { it.interfaceJars.isNotEmpty() || it.sources.isNotEmpty() || it.outputs.isNotEmpty() }
}

private fun List<FileLocation>.resolveUris() =
Expand Down Expand Up @@ -332,7 +333,7 @@ class BazelProjectMapper(
): Sequence<TargetInfo> =
tree.allTargetsAtDepth(-1, rootTargets).asSequence().filter { !isWorkspaceTarget(it) && isRustTarget(it) }

private fun selectTargetsToImport(
private fun selectTargetsToImport(
workspaceContext: WorkspaceContext, rootTargets: Set<String>, tree: DependencyTree
): Sequence<TargetInfo> = tree.allTargetsAtDepth(
workspaceContext.importDepth.value, rootTargets
Expand Down

0 comments on commit ec41697

Please sign in to comment.