Skip to content

Add Env::SetTypeIntrospector and resolve env types via TypeIntrospector - #2499

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1033089199
Open

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1033089199

Conversation

@copybara-service

Copy link
Copy Markdown

Add Env::SetTypeIntrospector and resolve env types via TypeIntrospector

Adds Env::SetTypeIntrospector so callers can register custom types for both
config resolution (variables and functions) and compiled expressions.

Switches Env::NewCompilerBuilder from TypeInfoToType to
TypeInfoToTypeSpec + ConvertTypeSpecToType backed by
DescriptorPoolTypeIntrospector (and the optional custom introspector). As a
result, protobuf enum names resolve to enum types instead of opaque types, and
config declarations are strictly validated against registered opaque types
(parameter count and concrete parameter matches).

Adds `Env::SetTypeIntrospector` so callers can register custom types for both
config resolution (variables and functions) and compiled expressions.

Switches `Env::NewCompilerBuilder` from `TypeInfoToType` to
`TypeInfoToTypeSpec` + `ConvertTypeSpecToType` backed by
`DescriptorPoolTypeIntrospector` (and the optional custom introspector). As a
result, protobuf enum names resolve to enum types instead of opaque types, and
config declarations are strictly validated against registered opaque types
(parameter count and concrete parameter matches).

PiperOrigin-RevId: 1033089199
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant