kythe.io@v0.0.68-0.20240422202219-7225dbc01741/kythe/go/util/schema/BUILD (about)

     1  # The checked-in generated files confuse gazelle.
     2  # gazelle:ignore
     3  load("//tools:build_rules/shims.bzl", "go_library", "go_test")
     4  load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_file")
     5  
     6  package(default_visibility = ["//kythe:default_visibility"])
     7  
     8  go_library(
     9      name = "schema",
    10      srcs = [
    11          "schema.go",
    12          "schema_index.go",
    13      ],
    14      importpath = "kythe.io/kythe/go/util/schema",
    15      deps = [
    16          "//kythe/go/util/schema/facts",
    17          "//kythe/proto:schema_go_proto",
    18          "//kythe/proto:storage_go_proto",
    19      ],
    20  )
    21  
    22  genrule(
    23      name = "schema_index",
    24      outs = ["schema_index.go"],
    25      cmd = " ".join([
    26          "$(location //kythe/go/util/schema/mkdata) --language go --package schema",
    27          "-output '$@'",
    28      ]),
    29      tools = ["//kythe/go/util/schema/mkdata"],
    30      visibility = ["//visibility:private"],
    31  )
    32  
    33  write_source_file(
    34      name = "schema_index_sync",
    35      in_file = ":schema_index",
    36      out_file = "indexdata.go",
    37  )
    38  
    39  go_test(
    40      name = "schema_test",
    41      size = "small",
    42      srcs = ["schema_test.go"],
    43      library = ":schema",
    44      visibility = ["//visibility:private"],
    45      deps = [
    46          "//kythe/go/util/schema/facts",
    47          "//kythe/go/util/schema/nodes",
    48          "//kythe/proto:schema_go_proto",
    49          "//kythe/proto:storage_go_proto",
    50          "@com_github_golang_protobuf//proto:go_default_library",
    51      ],
    52  )