<commit_before>ts_filetype = FileType([".ts"])

def get_transitive_files(ctx):
  s = set()
  for dep in ctx.attr.deps:
    s += dep.transitive_files
  s += ctx.files.srcs
  return s

def ts_library_impl(ctx):
  return struct(
      files=set(),
      transitive_files=get_transitive_files(ctx))

def ts_binary_impl(ctx):
  files = list(get_transitive_files(ctx))
  output = ctx.outputs.out

  ctx.action(
      inputs=files,
      outputs=[output, ctx.outputs.sourcemap],
      executable=ctx.executable.tsc_,
      arguments=["%s" % (output.path)] + \
          ["%s" % f for f in ctx.attr.flags] + \
          ["%s" % x.path for x in files])

ts_library = rule(
    attrs = {
        "srcs": attr.label_list(allow_files = ts_filetype),
        "deps": attr.label_list(allow_files = False),
    },<commit_msg>Update to work with Bazel 0.6.1<commit_after>ts_filetype = FileType([".ts"])

def get_transitive_files(ctx):
  s = depset()
  for dep in ctx.attr.deps:
    s += dep.transitive_files
  s += ctx.files.srcs
  return s

def ts_library_impl(ctx):
  return struct(
      files=depset(),
      transitive_files=get_transitive_files(ctx))

def ts_binary_impl(ctx):
  files = list(get_transitive_files(ctx))
  output = ctx.outputs.out

  ctx.action(
      inputs=files,
      outputs=[output, ctx.outputs.sourcemap],
      executable=ctx.executable.tsc_,
      arguments=["%s" % (output.path)] + \
          ["%s" % f for f in ctx.attr.flags] + \
          ["%s" % x.path for x in files])

ts_library = rule(
    attrs = {
        "srcs": attr.label_list(allow_files = ts_filetype),
        "deps": attr.label_list(allow_files = False),
    },
{'fraction_non_alphanumeric': 0.1435523114355231, 'fraction_numerical': 0.0018248175182481751, 'mean_word_length': 3.031862745098039, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6771013', 'n_tokens_mistral': 597, 'n_tokens_neox': 592, 'n_words': 117}