Skip to content

Previously, CelCheckerBuilder, CelRuntimeBuilder, and CelLiteRuntimeBuilder stored a single CelTypeProvider slot overwritten by each setTypeProvider call, preventing extension libraries and caller-supplied type providers from composing and leaking library type providers across toCheckerBuilder and toRuntimeBuilder. - #1527

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_1030224171

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Previously, CelCheckerBuilder, CelRuntimeBuilder, and CelLiteRuntimeBuilder stored a single CelTypeProvider slot overwritten by each setTypeProvider call, preventing extension libraries and caller-supplied type providers from composing and leaking library type providers across toCheckerBuilder and toRuntimeBuilder.

Collect per-library CelTypeProvider registrations separately from the caller-configured CelTypeProvider across CelCheckerLegacyImpl, CelRuntimeImpl, CelLiteRuntimeImpl, and CelRuntimeLegacyImpl, merge them via CombinedCelTypeProvider, and preserve only the caller-configured CelTypeProvider when cloning builders. Also support setTypeProvider on the legacy runtime via DescriptorTypeResolver and clarify the optional_type comment in DefaultTypeProvider.

…timeBuilder` stored a single `CelTypeProvider` slot overwritten by each `setTypeProvider` call, preventing extension libraries and caller-supplied type providers from composing and leaking library type providers across `toCheckerBuilder` and `toRuntimeBuilder`.

Collect per-library `CelTypeProvider` registrations separately from the caller-configured `CelTypeProvider` across `CelCheckerLegacyImpl`, `CelRuntimeImpl`, `CelLiteRuntimeImpl`, and `CelRuntimeLegacyImpl`, merge them via `CombinedCelTypeProvider`, and preserve only the caller-configured `CelTypeProvider` when cloning builders. Also support `setTypeProvider` on the legacy runtime via `DescriptorTypeResolver` and clarify the `optional_type` comment in `DefaultTypeProvider`.

PiperOrigin-RevId: 1030224171
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