Skip to content

Remove PowerFxConfig.AdditionalFunctions#3056

Open
anderson-joyle wants to merge 1 commit intomainfrom
fix/remove-additional-functions-2821
Open

Remove PowerFxConfig.AdditionalFunctions#3056
anderson-joyle wants to merge 1 commit intomainfrom
fix/remove-additional-functions-2821

Conversation

@anderson-joyle
Copy link
Copy Markdown
Contributor

@anderson-joyle anderson-joyle commented Apr 22, 2026

Issue #2821

The AdditionalFunctions dictionary on PowerFxConfig (in Fx.Core) mapped TexlFunction keys to IAsyncTexlFunction implementations from the Interpreter, a layering violation since Core should not reference Interpreter implementation types.

Migrate the single producer (EnableRegExFunctions) to the same pattern already used by Join, Patch, and Set: a class that derives from the Core TexlFunction base and also implements the interpreter interface. Three thin wrapper classes (IsMatchImpl, MatchImpl, MatchAllImpl) in LibraryRegEx.cs inherit IsMatchFunction/MatchFunction/MatchAllFunction and delegate InvokeAsync to the existing Implementation classes.

With that, registration is a plain symbolTable.AddFunction call and the EvalVisitor func is IAsyncTexlFunction branch handles dispatch. The field, its plumbing through ParsedExpression and EvalVisitor, and the matching test helpers for NodeJS/PCRE2/Compare are all removed.

No public API change. All 64,946 interpreter tests pass.

@anderson-joyle anderson-joyle changed the title Fix #2821: Remove PowerFxConfig.AdditionalFunctions DONT REVIEW #2821: Remove PowerFxConfig.AdditionalFunctions Apr 22, 2026
@jas-valgotar
Copy link
Copy Markdown
Contributor

✅ No public API change.

The AdditionalFunctions dictionary on PowerFxConfig (in Fx.Core) mapped
TexlFunction keys to IAsyncTexlFunction implementations from the
Interpreter, a layering violation since Core should not reference
Interpreter implementation types.

Migrate the single producer (EnableRegExFunctions) to the same pattern
already used by Join, Patch, and Set: a class that derives from the
Core TexlFunction base and also implements the interpreter interface.
Three thin wrapper classes (IsMatchImpl, MatchImpl, MatchAllImpl) in
LibraryRegEx.cs inherit IsMatchFunction/MatchFunction/MatchAllFunction
and delegate InvokeAsync to the existing Implementation classes.

With that, registration is a plain symbolTable.AddFunction call and the
EvalVisitor `func is IAsyncTexlFunction` branch handles dispatch. The
field, its plumbing through ParsedExpression and EvalVisitor, and the
matching test helpers for NodeJS/PCRE2/Compare are all removed.

No public API change. All 64,946 interpreter tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@anderson-joyle anderson-joyle force-pushed the fix/remove-additional-functions-2821 branch from f9ad83c to 1451308 Compare April 22, 2026 15:54
@anderson-joyle anderson-joyle changed the title DONT REVIEW #2821: Remove PowerFxConfig.AdditionalFunctions Remove PowerFxConfig.AdditionalFunctions Apr 22, 2026
@anderson-joyle anderson-joyle marked this pull request as ready for review April 22, 2026 16:18
@anderson-joyle anderson-joyle requested a review from a team as a code owner April 22, 2026 16:18
@jas-valgotar
Copy link
Copy Markdown
Contributor

✅ No public API change.

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