Skip to content

Free ForAll and Self Modifying Check: Set - #3042

Open
Greg Lindhorst (gregli-msft) wants to merge 6 commits into
gregli/free-self-basefrom
gregli/free-self-set-2
Open

Free ForAll and Self Modifying Check: Set#3042
Greg Lindhorst (gregli-msft) wants to merge 6 commits into
gregli/free-self-basefrom
gregli/free-self-set-2

Conversation

@gregli-msft

@gregli-msft Greg Lindhorst (gregli-msft) commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

The Set function was added to the interpreter with a small oversight: AllowedWithinNondeterministicOperationOrder should have been set to false, as it is for Clear and ClearCollect, and as Set in Canvas apps. Because of this, it is possible to write ForAll( foo, Set( foo, [1,2,3] ) ) and create self-modifying iterations.

To fix this introduces a breaking change to Power Fx V1. A new feature EnhancedIterationChecks has been added with the Base version of the PR sequence to control this behavior. Existing Power Fx V1 hosts will see no change. New hosts should include this new feature which is bundled with Power Fx V2.

@gregli-msft Greg Lindhorst (gregli-msft) changed the title Gregli/free self set 2 Free ForAll and Self Modifying Check: Set Mar 20, 2026
@gregli-msft
Greg Lindhorst (gregli-msft) marked this pull request as ready for review March 20, 2026 05:26
@gregli-msft
Greg Lindhorst (gregli-msft) requested a review from a team as a code owner March 20, 2026 05:26
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