Skip to content
This repository has been archived by the owner on Aug 5, 2024. It is now read-only.

Commit

Permalink
[fix] do not omit targets that contain dots | #BAZEL-651 Done
Browse files Browse the repository at this point in the history
Merge-request: BAZEL-MR-511
Merged-by: Marcin Kocot <[email protected]>
  • Loading branch information
mrkocot authored and Space Team committed Sep 12, 2023
1 parent bb47e49 commit 1c51f02
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ class TargetInfoReader {

private fun addExtensionInfo(uri: URI, builderMap: ConcurrentHashMap<String, TargetInfo.Builder>) {
val path = uri.toPath()
val targetPathPrefix = "${path.parent}/${path.name.substringBefore('.')}"
val cleanPathName = path.name.substringBefore(".bsp-info.textproto")

val ruleName = path.name.substringAfter('.').substringBefore(".bsp-info.textproto")
val targetPathPrefix = "${path.parent}/${cleanPathName.substringBeforeLast('.')}"

val ruleName = cleanPathName.substringAfterLast('.')

val builder = builderMap.getOrPut(targetPathPrefix) { TargetInfo.newBuilder() }
addExtensionInfoToTarget(ruleName, uri, builder)
Expand Down

0 comments on commit 1c51f02

Please sign in to comment.