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

Enable to pass AllowSideEffects flag when creating the RecalcEngineScope

Open caiomontei opened this issue 4 years ago • 2 comments

When using the EnableSetFunction config, we also need to pass AllowSideEffect = true as parser options for the Eval.

However, it is not possible to pass any parser options when creating a RecalcEngineScope. Causing the LSP to identify the Set function as invalid in the formula bar.

image

caiomontei avatar Aug 05 '22 16:08 caiomontei

It's easy to create your own scope implementation, but the root issue is that Engine.Suggest() doesn't accept these flags. Suggest() calls Check(); and Check has other overloads to accept the flags.

This probably is just adding the parameter to Suggest().

MikeStall avatar Aug 09 '22 23:08 MikeStall

Have an overload of Suggest() that accepts a CheckResult.

MikeStall avatar Aug 09 '22 23:08 MikeStall