Skip to content

ext: wire Extension.Config options in ExtensionOptionFactory - #1675

Merged
TristonianJones merged 1 commit into
cel-expr:masterfrom
itzPranshul:feat/extension-config-factory
Nov 19, 2026
Merged

TristonianJones merged 1 commit into
cel-expr:masterfrom
itzPranshul:feat/extension-config-factory

Conversation

@itzPranshul

Copy link
Copy Markdown
Contributor

Follow-up to #1645: wires env.Extension.Config into ext.ExtensionOptionFactory so extension-specific configuration options can be applied from env.Config (YAML/JSON).

Changes

  • ext/extension_option_factory.go:
    • Updated extensionFactory to accept *env.Extension alongside the parsed uint32 version and return (cel.EnvOption, error).
    • Wired strings config keys: locale (StringsLocale) and max_precision (StringsMaxPrecision).
    • Wired lists config key: max_range_size (ListsMaxRangeSize).
    • Added validateAllowedConfigKeys (rejects unknown keys on all registered extensions) and extensionIntConfig (supports int, int64, uint, uint64, and whole-number float64 values with range/type validation).
  • ext/extension_option_factory_test.go:
    • Added TestExtensionOptionFactoryStringsConfig, TestExtensionOptionFactoryListsConfig, and TestExtensionOptionFactoryConfigErrors.

Note: Extension.Subset wiring and Env.ToConfig() round-tripping for extension versions/configs are left as separate follow-ups.

part of #1131

@TristonianJones

Copy link
Copy Markdown
Collaborator

/gcbrun

@TristonianJones
TristonianJones merged commit 24c866f into cel-expr:master Nov 19, 2026
8 checks passed
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.

2 participants