Skip to content

Commit 87fea87

Browse files
dmitriplotnikovcopybara-github
authored andcommitted
Add support for type signatures in CEL environment YAML configuration.
The `env_yaml` parser now accepts type signatures for variable types and function overload signatures. The `type` field can be used instead of `type_name` for variables, allowing a more compact representation of types, including type parameters and parameterized types. The `signature` field can be used for function overloads, providing a single string to define the overload's target, arguments, and member status. The `return` type in function overloads can now also be specified as a type signature string. PiperOrigin-RevId: 928959415
1 parent f5d0d5f commit 87fea87

7 files changed

Lines changed: 978 additions & 160 deletions

File tree

env/BUILD

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ cc_library(
2828
"type_info.h",
2929
],
3030
deps = [
31+
"//common:ast",
3132
"//common:constant",
3233
"//common:type",
3334
"//common:type_kind",
@@ -120,7 +121,9 @@ cc_library(
120121
features = ["-use_header_modules"],
121122
deps = [
122123
":config",
124+
"//common:ast",
123125
"//common:constant",
126+
"//common/internal:signature",
124127
"//internal:status_macros",
125128
"//internal:strings",
126129
"@com_google_absl//absl/algorithm:container",
@@ -178,9 +181,11 @@ cc_test(
178181
":config",
179182
"//common:type",
180183
"//common:type_proto",
184+
"//common/ast:metadata",
181185
"//internal:proto_matchers",
182186
"//internal:testing",
183187
"//internal:testing_descriptor_pool",
188+
"@com_google_absl//absl/status",
184189
"@com_google_protobuf//:protobuf",
185190
],
186191
)
@@ -201,7 +206,6 @@ cc_test(
201206
"//common:type",
202207
"//common:value",
203208
"//compiler",
204-
"//internal:proto_matchers",
205209
"//internal:status_macros",
206210
"//internal:testing",
207211
"//internal:testing_descriptor_pool",
@@ -241,7 +245,6 @@ cc_test(
241245
"//common:value",
242246
"//compiler",
243247
"//extensions:math_ext",
244-
"//internal:status_macros",
245248
"//internal:testing",
246249
"//internal:testing_descriptor_pool",
247250
"//runtime",

0 commit comments

Comments
 (0)