Skip to content

Patch function#595

Merged
anderson-joyle merged 17 commits into
mainfrom
andersonf/patch-function
Aug 31, 2022
Merged

Patch function#595
anderson-joyle merged 17 commits into
mainfrom
andersonf/patch-function

Conversation

@anderson-joyle
Copy link
Copy Markdown
Contributor

This is work in progress but I want to get some feedback from reviewers.
Some of my questions/concerns/comments:

  • Two Patch implementations for now:

Patch(record, record)
Not the focus although it is going to be implemented anytime soon.

Patch(dataSource, record, arg1, arg2, ...)
The priority one.

  • In order to update a record, I'm simply removing the old record (ICollection.Remove(T)) and adding a new version of it. Is there a better/prettier way to do this?
  • I'm still working on the CheckInvocation implementations.
  • I'm still working on how to handle errors.
  • A new handler has been added for test units. Is this the way or is there a better approach?
  • Any other major concerns?

Comment thread src/libraries/Microsoft.PowerFx.Interpreter/PatchFunction.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Core/Localization/Strings.cs
Comment thread src/libraries/Microsoft.PowerFx.Core/Public/Values/TableValue.cs
Comment thread src/libraries/Microsoft.PowerFx.Interpreter/PatchFunction.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Interpreter/PatchFunction.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Core/Public/Values/TableValue.cs Outdated
@anderson-joyle
Copy link
Copy Markdown
Contributor Author

anderson-joyle commented Aug 26, 2022

@MikeStall about this binary compatibility issue, this is happening because Microsoft.PowerFx.PowerFxConfigExtensions.EnableCollectFunction was previously merged into main and now it has been removed due to the new EnableMutationFunctions method. Should I bring back the EnableCollectFunction method just for compatibility purposes?


In reply to: 1228934844


In reply to: 1228934844


In reply to: 1228934844

@MikeStall
Copy link
Copy Markdown
Contributor

This breaking change is ok. We just introduced the function, PowerApps doesn't depend on it yet.


In reply to: 1228934844

Comment thread src/libraries/Microsoft.PowerFx.Core/Public/Values/InMemoryRecordValue.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Core/Public/Values/RecordValue.cs Outdated
Comment thread src/tests/Microsoft.PowerFx.Interpreter.Tests/PowerFxEvaluationTests.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Interpreter/PatchFunction.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Interpreter/PatchFunction.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Interpreter/PatchFunction.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Interpreter/PatchFunction.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Interpreter/PatchFunction.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Core/Public/Values/InMemoryRecordValue.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Interpreter/Functions/Mutation/PatchFunction.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Core/Public/Values/InMemoryRecordValue.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Core/Public/Values/InMemoryRecordValue.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Interpreter/Functions/Mutation/PatchFunction.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Interpreter/Functions/Mutation/PatchFunction.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Interpreter/Functions/Mutation/PatchFunction.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Interpreter/Functions/Mutation/PatchFunction.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Core/Public/Values/InMemoryRecordValue.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Core/Public/Values/InMemoryRecordValue.cs Outdated
Comment thread src/libraries/Microsoft.PowerFx.Core/Public/Values/RecordValue.cs Outdated
@anderson-joyle anderson-joyle marked this pull request as ready for review August 31, 2022 18:00
@MikeStall MikeStall changed the title Patch function DRAFT Patch function Aug 31, 2022
@BruceHaley
Copy link
Copy Markdown
Contributor

✔️ No Binary Compatibility issues for Microsoft.PowerFx.Connectors.dll
✔️ No Binary Compatibility issues for Microsoft.PowerFx.Core.dll
❌ 1 Binary Compatibility issues for Microsoft.PowerFx.Interpreter compared against version 0.2.2-preview.20220830-319453.

Details
MembersMustExist : Member 'Microsoft.PowerFx.PowerFxConfigExtensions.EnableCollectFunction(Microsoft.PowerFx.SymbolTable)' does not exist in the implementation but it does exist in the contract.
✔️ No Binary Compatibility issues for **Microsoft.PowerFx.LanguageServerProtocol.dll** ✔️ No Binary Compatibility issues for **Microsoft.PowerFx.Transport.Attributes.dll**

@MikeStall MikeStall mentioned this pull request Aug 31, 2022
7 tasks
Copy link
Copy Markdown
Contributor

@MikeStall MikeStall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Copy link
Copy Markdown
Contributor

@LucGenetier LucGenetier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@anderson-joyle anderson-joyle merged commit f715e90 into main Aug 31, 2022
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.

6 participants