Skip to content

Commit

Permalink
Internal refactoring for j2cl_util.bzl
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 687033056
  • Loading branch information
gkdn authored and copybara-github committed Oct 17, 2024
1 parent e752e1a commit 069aee0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build_defs/internal_do_not_use/j2cl_util.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ def to_parallel_targets(key, args, name_fun):

def to_parallel_target(label, name_fun):
if type(label) == "string":
return name_fun(_absolute_label(label))
return name_fun(absolute_label(label))

# Label Object
return label.relative(":%s" % name_fun(label.name))

def _absolute_label(label):
def absolute_label(label):
if label.startswith("//") or label.startswith("@"):
if ":" in label:
return label
Expand Down

0 comments on commit 069aee0

Please sign in to comment.