Skip to content

Commit 9514a79

Browse files
dmitriplotnikovcopybara-github
authored andcommitted
Refactor Config::TypeInfo to cel::TypeRef in common/typedef.
Move `Config::TypeInfo` from `env/type_info` to `cel::TypeRef` in `common/typedef/type_ref` so that both environment configs and type definitions can share a common type reference representation. The class is being renamed because there is already an unrelated cel::TypeInfo class. PiperOrigin-RevId: 991326545
1 parent 9fc0f43 commit 9514a79

11 files changed

Lines changed: 384 additions & 313 deletions

File tree

‎common/typedef/BUILD‎

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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("@rules_cc//cc:cc_library.bzl", "cc_library")
16+
load("@rules_cc//cc:cc_test.bzl", "cc_test")
17+
18+
package(default_visibility = ["//visibility:public"])
19+
20+
licenses(["notice"])
21+
22+
cc_library(
23+
name = "type_ref",
24+
srcs = ["type_ref.cc"],
25+
hdrs = ["type_ref.h"],
26+
deps = [
27+
"//common:ast",
28+
"//common:type",
29+
"//common:type_kind",
30+
"//internal:status_macros",
31+
"@com_google_absl//absl/base:no_destructor",
32+
"@com_google_absl//absl/container:flat_hash_map",
33+
"@com_google_absl//absl/status",
34+
"@com_google_absl//absl/status:statusor",
35+
"@com_google_absl//absl/strings:string_view",
36+
"@com_google_protobuf//:protobuf",
37+
],
38+
)
39+
40+
cc_test(
41+
name = "type_ref_test",
42+
srcs = ["type_ref_test.cc"],
43+
deps = [
44+
":type_ref",
45+
"//common:type",
46+
"//common:type_proto",
47+
"//common/ast:metadata",
48+
"//internal:proto_matchers",
49+
"//internal:testing",
50+
"//internal:testing_descriptor_pool",
51+
"@com_google_absl//absl/status",
52+
"@com_google_protobuf//:protobuf",
53+
],
54+
)

0 commit comments

Comments
 (0)