|
| 1 | +# Copyright 2026 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# https://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +load("@com_google_protobuf//bazel:cc_proto_library.bzl", "cc_proto_library") |
| 16 | +load("@com_google_protobuf//bazel:proto_library.bzl", "proto_library") |
| 17 | +load("@rules_cc//cc:cc_library.bzl", "cc_library") |
| 18 | +load("@rules_cc//cc:cc_test.bzl", "cc_test") |
| 19 | + |
| 20 | +package(default_visibility = ["//visibility:public"]) |
| 21 | + |
| 22 | +licenses(["notice"]) |
| 23 | + |
| 24 | +cc_library( |
| 25 | + name = "typedef", |
| 26 | + srcs = ["typedef.cc"], |
| 27 | + hdrs = ["typedef.h"], |
| 28 | + deps = [ |
| 29 | + "//common:ast", |
| 30 | + "//common:constant", |
| 31 | + "@com_google_absl//absl/base:core_headers", |
| 32 | + "@com_google_absl//absl/base:nullability", |
| 33 | + "@com_google_absl//absl/container:flat_hash_map", |
| 34 | + "@com_google_absl//absl/functional:overload", |
| 35 | + "@com_google_absl//absl/log:absl_check", |
| 36 | + "@com_google_absl//absl/status", |
| 37 | + "@com_google_absl//absl/strings", |
| 38 | + "@com_google_absl//absl/strings:string_view", |
| 39 | + ], |
| 40 | +) |
| 41 | + |
| 42 | +cc_test( |
| 43 | + name = "typedef_test", |
| 44 | + srcs = ["typedef_test.cc"], |
| 45 | + deps = [ |
| 46 | + ":typedef", |
| 47 | + "//common:ast", |
| 48 | + "//common:constant", |
| 49 | + "//internal:testing", |
| 50 | + "@com_google_absl//absl/status", |
| 51 | + "@com_google_absl//absl/status:status_matchers", |
| 52 | + ], |
| 53 | +) |
| 54 | + |
| 55 | +proto_library( |
| 56 | + name = "typedef_protos", |
| 57 | + srcs = ["typedef.proto"], |
| 58 | + deps = [ |
| 59 | + "@com_google_cel_spec//proto/cel/expr:checked_proto", |
| 60 | + "@com_google_cel_spec//proto/cel/expr:syntax_proto", |
| 61 | + ], |
| 62 | +) |
| 63 | + |
| 64 | +cc_proto_library( |
| 65 | + name = "typedef_cc_proto", |
| 66 | + deps = [":typedef_protos"], |
| 67 | +) |
| 68 | + |
| 69 | +cc_library( |
| 70 | + name = "aspect_proto", |
| 71 | + srcs = ["aspect_proto.cc"], |
| 72 | + hdrs = ["aspect_proto.h"], |
| 73 | + deps = [ |
| 74 | + ":typedef_cc_proto", |
| 75 | + "@com_google_absl//absl/base:core_headers", |
| 76 | + "@com_google_absl//absl/base:nullability", |
| 77 | + "@com_google_absl//absl/container:flat_hash_map", |
| 78 | + "@com_google_absl//absl/status", |
| 79 | + "@com_google_absl//absl/status:statusor", |
| 80 | + "@com_google_absl//absl/strings", |
| 81 | + "@com_google_absl//absl/strings:string_view", |
| 82 | + ], |
| 83 | +) |
| 84 | + |
| 85 | +cc_test( |
| 86 | + name = "aspect_proto_test", |
| 87 | + srcs = ["aspect_proto_test.cc"], |
| 88 | + deps = [ |
| 89 | + ":aspect_proto", |
| 90 | + ":typedef_cc_proto", |
| 91 | + "//internal:testing", |
| 92 | + "@com_google_absl//absl/status", |
| 93 | + "@com_google_absl//absl/status:status_matchers", |
| 94 | + "@com_google_absl//absl/strings:string_view", |
| 95 | + ], |
| 96 | +) |
| 97 | + |
| 98 | +cc_library( |
| 99 | + name = "typedef_proto", |
| 100 | + srcs = ["typedef_proto.cc"], |
| 101 | + hdrs = ["typedef_proto.h"], |
| 102 | + deps = [ |
| 103 | + ":aspect_proto", |
| 104 | + ":typedef", |
| 105 | + ":typedef_cc_proto", |
| 106 | + "//common:ast", |
| 107 | + "//common:constant", |
| 108 | + "//common/ast:constant_proto", |
| 109 | + "//internal:status_macros", |
| 110 | + "@com_google_absl//absl/base:nullability", |
| 111 | + "@com_google_absl//absl/container:flat_hash_map", |
| 112 | + "@com_google_absl//absl/status", |
| 113 | + "@com_google_absl//absl/status:statusor", |
| 114 | + "@com_google_absl//absl/types:span", |
| 115 | + "@com_google_absl//absl/types:variant", |
| 116 | + "@com_google_cel_spec//proto/cel/expr:checked_cc_proto", |
| 117 | + "@com_google_protobuf//:struct_cc_proto", |
| 118 | + ], |
| 119 | +) |
| 120 | + |
| 121 | +cc_library( |
| 122 | + name = "proto_schema", |
| 123 | + hdrs = ["proto_schema.h"], |
| 124 | + deps = [ |
| 125 | + "@com_google_absl//absl/base:core_headers", |
| 126 | + "@com_google_absl//absl/strings:string_view", |
| 127 | + ], |
| 128 | +) |
| 129 | + |
| 130 | +proto_library( |
| 131 | + name = "proto_schema_protos", |
| 132 | + srcs = ["proto_schema.proto"], |
| 133 | + deps = [":typedef_protos"], |
| 134 | +) |
| 135 | + |
| 136 | +cc_proto_library( |
| 137 | + name = "proto_schema_cc_proto", |
| 138 | + deps = [":proto_schema_protos"], |
| 139 | +) |
| 140 | + |
| 141 | +cc_library( |
| 142 | + name = "proto_schema_proto", |
| 143 | + srcs = ["proto_schema_proto.cc"], |
| 144 | + hdrs = ["proto_schema_proto.h"], |
| 145 | + deps = [ |
| 146 | + ":aspect_proto", |
| 147 | + ":proto_schema", |
| 148 | + ":proto_schema_cc_proto", |
| 149 | + ":typedef_cc_proto", |
| 150 | + "@com_google_absl//absl/base:nullability", |
| 151 | + "@com_google_absl//absl/status", |
| 152 | + "@com_google_absl//absl/status:statusor", |
| 153 | + "@com_google_absl//absl/strings", |
| 154 | + "@com_google_absl//absl/strings:string_view", |
| 155 | + ], |
| 156 | +) |
| 157 | + |
| 158 | +cc_test( |
| 159 | + name = "proto_schema_proto_test", |
| 160 | + srcs = ["proto_schema_proto_test.cc"], |
| 161 | + deps = [ |
| 162 | + ":aspect_proto", |
| 163 | + ":proto_schema", |
| 164 | + ":proto_schema_cc_proto", |
| 165 | + ":proto_schema_proto", |
| 166 | + ":typedef_cc_proto", |
| 167 | + "//internal:testing", |
| 168 | + "@com_google_absl//absl/status", |
| 169 | + "@com_google_absl//absl/status:status_matchers", |
| 170 | + "@com_google_protobuf//:protobuf", |
| 171 | + ], |
| 172 | +) |
| 173 | + |
| 174 | +cc_test( |
| 175 | + name = "typedef_proto_test", |
| 176 | + srcs = ["typedef_proto_test.cc"], |
| 177 | + data = [ |
| 178 | + "//common/typedef/testdata:typedef_testdata", |
| 179 | + ], |
| 180 | + deps = [ |
| 181 | + ":aspect_proto", |
| 182 | + ":proto_schema_proto", |
| 183 | + ":typedef", |
| 184 | + ":typedef_cc_proto", |
| 185 | + ":typedef_proto", |
| 186 | + "//internal:proto_matchers", |
| 187 | + "//internal:runfiles", |
| 188 | + "//internal:testing", |
| 189 | + "@com_google_absl//absl/status", |
| 190 | + "@com_google_absl//absl/status:status_matchers", |
| 191 | + "@com_google_absl//absl/status:statusor", |
| 192 | + "@com_google_absl//absl/strings", |
| 193 | + "@com_google_absl//absl/strings:string_view", |
| 194 | + "@com_google_protobuf//:protobuf", |
| 195 | + ], |
| 196 | +) |
0 commit comments