Power-Fx icon indicating copy to clipboard operation
Power-Fx copied to clipboard

Remove PowerFxConfig.AdditionalFunctions

Open MikeStall opened this issue 11 months ago • 0 comments

Remove PowerFxConfig.AdditionalFunctions
https://github.com/microsoft/Power-Fx/blob/0fa19687742caa771c4a8f0716f07005497bec49/src/libraries/Microsoft.PowerFx.Core/Public/Config/PowerFxConfig.cs#L55

This is a layering violation. It's a map in Config that maps TexlFunction to Interpreter implementations. But Config lives in Fx.Core, so it can't point to interpreter implementations.

Having "EnableXXX" on config that adds function implementations forces a problem here.

One workaround we used elsewhere was like for Json - add a derived TexlFunction that implements the interpreter interface.

MikeStall avatar Jan 18 '25 20:01 MikeStall