6c4014b371
This pr handles few things that are mentioned below: 1) It adds a new virtual overload of `GetDefaultBindingConfig` in Engine.cs that takes in ParserOptions and optional rule scope and returns a binding config that is used by `Engine.ComputeBinding()`. This is done so that Power Apps can supply custom binding config for semantic tokenization. Power Apps never set `BindingConfig.UseThisRecordForRuleScope` to true but changes before this pr calculated the value of `BindingConfig.UseThisRecordForRuleScope` based on the value returned from `Engine.GetRuleScope()`. It would be true when GetRuleScope() returns a non null value. There are properties such as `OnErrors `on AppInfo control in PowerApps that returns a non null value for `GetRuleScope()`. In this case,` useThisRecordForRuleScope `would be true in` Engine.ComputeBinding() `but it should never be true when `Engine.ComputeBinding() `is run from PowerApps. 2) This pr fixes a bug where duplicate string interpolation and island tokens were added when expression has nested string interpolation to the list of tokens returned from Tokenization.Tokenize. This pr fixes that logic and adds tests to validate it. A good example of this bug is an expression like `$"{$"{$"{$"{.12e4}"}"}"}"`. The number of tokens should be 17 but it is 41. Many of them are duplicate with same spans and token types. 3) This pr also fixes one test that happened due to Visual Studio picking up a different line feed for C# multiline strings `@""` . Updates the test to avoid using multiline string. @gregli-msft is the only and first one so far to face this problem. Tests were failing for him. Confirmed with him that avoiding multiline string fixes the test. |
||
---|---|---|
.github | ||
.scripts | ||
docs | ||
src | ||
.editorconfig | ||
.gitignore | ||
ApiCompat.Files.xml | ||
ApiCompatBaseline.txt | ||
CODE_OF_CONDUCT.md | ||
LICENSE | ||
README.md | ||
SECURITY.md | ||
SUPPORT.md | ||
dailyBuilds.md |
README.md
Microsoft Power Fx
Microsoft Power Fx is a low-code general purpose programming language based on spreadsheet-like formulas. It is a strongly typed, declarative, and functional language, with imperative logic and state management available as needed.
Power Fx started with Power Apps canvas apps and that is where you can experience it now. We are in the process of extracting the language from that product so that we can use it in more Microsoft Power Platform products and make it available here for you to use. That's going to take some time and we will report on our progress here and on the Power Apps blog.
A start on the language documentation is available in the docs folder. As with the implementation, it is being extracted from the Power Apps documentation and generalized and that too is going to take some time.
Summary
Overview
For those new to Power-Fx, this video should answer many of your questions: Power Fx: the Programming Language for Low Code and what it means for Developers |
---|
Build Status
Branch | Description | Build Status | Coverage Status | Test Status |
---|---|---|---|---|
Main | 0.2.* Preview Builds |
Packages
Name | Released Package |
---|---|
Microsoft.PowerFx.Core | |
Microsoft.PowerFx.Core.Tests | |
Microsoft.PowerFx.Interpreter | |
Microsoft.PowerFx.Transport.Attributes |
Daily Builds
Daily builds of the Power Fx packages are published to Azure Artifacts.
- The Azure Artifacts daily feed carries the most recent packages. To consume them, specify this package source:
https://pkgs.dev.azure.com/Power-Fx/7dd30b4a-31be-4ac9-a649-e6addd4d5b0a/_packaging/PowerFx/nuget/v3/index.json
- For detailed instructions visit this page.
Samples
There are samples demonstrating how to consume Power Fx at: https://github.com/microsoft/power-fx-host-samples
You can also see usage examples in the unit tests.
Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.