Граф коммитов

1556 Коммитов

Автор SHA1 Сообщение Дата
Anderson Silva dcfe0638ad
Collect fixes (#2481)
This includes:
- Coercion fixes.
- Blank fields after adjusting the record/table type.
- Interpreter implementation was not handling Dataverse errors when
appending.
2024-06-15 23:58:37 +00:00
toshio-msft 5ccb2d166f
[[Power-Fx]] Localization hand-back [CTAS - RunID=20240614-204655-29s1j0k2a2] (#2479)
Translation handback check-in (PR Created by automation).
2024-06-14 23:21:59 -07:00
Mike Stall 23805d48f1
FileInfo functions (#2354)
See #2343
2024-06-14 04:50:48 -05:00
dependabot[bot] 80e6b8ee7c
Bump Azure.Identity from 1.11.0 to 1.11.4 in /src/tests/.Net7.0/Microsoft.PowerFx.Connectors.Tests (#2472)
Bumps [Azure.Identity](https://github.com/Azure/azure-sdk-for-net) from
1.11.0 to 1.11.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Azure/azure-sdk-for-net/releases">Azure.Identity's
releases</a>.</em></p>
<blockquote>
<h2>Azure.Identity_1.11.4</h2>
<h2>1.11.4 (2024-06-10)</h2>
<h3>Bugs Fixed</h3>
<ul>
<li>Managed identity bug fixes</li>
</ul>
<h2>Azure.Identity_1.11.3</h2>
<h2>1.11.3 (2024-05-07)</h2>
<h3>Bugs Fixed</h3>
<ul>
<li>Fixed a regression in <code>DefaultAzureCredential</code> probe
request behavior for IMDS managed identity environments. <a
href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/43796">#43796</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="2856f9a00d"><code>2856f9a</code></a>
changelog update</li>
<li><a
href="7267469fe0"><code>7267469</code></a>
Update azure-sdk-build-tools Repository Resource Refs in Yaml files (<a
href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/43311">#43311</a>)</li>
<li><a
href="2db9a0f336"><code>2db9a0f</code></a>
AzureArcManagedIdentitySource fix</li>
<li><a
href="06dd672e59"><code>06dd672</code></a>
Hotfix for DAC probe request</li>
<li><a
href="ae13ec206b"><code>ae13ec2</code></a>
Fix ConfidentialClient's AcquireTokenSilent and AcquireTokenOnBehalfOf
claims...</li>
<li><a
href="1835c8f1b3"><code>1835c8f</code></a>
Sync .github/workflows directory with azure-sdk-tools for PR 8131 (<a
href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/43535">#43535</a>)</li>
<li><a
href="40ff95af85"><code>40ff95a</code></a>
prep release (<a
href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/43534">#43534</a>)</li>
<li><a
href="70f5c48011"><code>70f5c48</code></a>
[AzureMonitorDistro] Add LiveMetricsActivityProcessor only when live
metrics ...</li>
<li><a
href="a6c3e5957f"><code>a6c3e59</code></a>
Respect SupportsOrdering property (<a
href="https://redirect.github.com/Azure/azure-sdk-for-net/issues/43531">#43531</a>)</li>
<li><a
href="82cc7cf188"><code>82cc7cf</code></a>
WCF Client/CoreWCF extension packages to use Azure Queue Storage as
transport...</li>
<li>Additional commits viewable in <a
href="https://github.com/Azure/azure-sdk-for-net/compare/Azure.Identity_1.11.0...Azure.Identity_1.11.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Azure.Identity&package-manager=nuget&previous-version=1.11.0&new-version=1.11.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/microsoft/Power-Fx/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mike Stall <mikestall@hotmail.com>
2024-06-14 07:08:21 +00:00
Anderson Silva 2e215137ed
Collect function (#2156)
This is a rebased version of
https://github.com/microsoft/Power-Fx/pull/2122, with all comments
addressed.

---------

Co-authored-by: Greg Lindhorst <gregli@microsoft.com>
Co-authored-by: Mike Stall <mikestall@hotmail.com>
2024-06-13 17:07:40 -05:00
Anderson Silva c240146620
Public API to get list of functions call (#2474)
Issue https://github.com/microsoft/Power-Fx/issues/2455.
2024-06-12 23:48:10 +00:00
Luc Genetier 5126fb4b11
Add relationships in Tabular connectors (#2466)
Add tests for SalesForce and ZenDesk tabular connectors
Add lazy/recursive TabularRecordType
2024-06-11 16:29:20 +00:00
Mike Stall 09e89173c7
Better SymbolValue Helpers (#2468)
Add helper for creating SymbolValues from CheckResults. 
This is tricky since it needs to include whatever symbolVAlues the
checkresult already has. So Check.Symbols.CreateValues() may miss those
and end up creating duplicate symbol values.

Also add more tests

---------

Co-authored-by: jas-valgotar <jasvalgotar@microsoft.com>
2024-06-07 22:19:08 +00:00
Mike Stall 4c11a28195
Move IMutationCopyField to RecordValue so that other implementations can handle it. (#2467) 2024-06-07 17:53:38 +00:00
Mike Stall 99bbdf3cc3
Restore STJ nuget version to 6.0.8 (#2462)
#2442 bumped System.Text.Json nuget from to 6.0.9. But not all consumers
are updated.

Restore back to 6.0.8
2024-06-06 13:33:24 +02:00
Greg Lindhorst 32963e6412
Deep mutations of records, squashed (#2457)
Adds support for deep mutation through the Set function. `Set( a, {b:1}
)` doesn't change and will assign a reference to the record `{b:1}` to
the variable `a`. After `a` has been established, it now supports
mutation through `Set( a.b, 2 )`. This is an optional facility that is
disabled by default and there are no semantic changes. When creating
variables the host has the option to enable this with
`SymbolProperties.CanSetMutate`.

This also fixes two related bugs. First, really deep mutations were not
being properly copied on write, where `t` should be unaffected by the
Patch https://github.com/microsoft/Power-Fx/issues/2450:
```
>> Set( deep, [[[[1,2,3],[4,5,6]]]] )
deep: [[[[1, 2, 3], [4, 5, 6]]]]

>> Set( t, deep )
t: [[[[1, 2, 3], [4, 5, 6]]]]

>> Patch( First(First(First(deep).Value).Value).Value, {Value:2}, {Value:99} )
{Value:99}

>> deep
[[[[1, 99, 3], [4, 5, 6]]]]

>> t
[[[[1, 99, 3], [4, 5, 6]]]]
```

And this should not return a casting error, instead returning Blank()
https://github.com/microsoft/Power-Fx/issues/2451:
```
>> Patch(Blank(),Blank(),Blank())
Unable to cast object of type 'Microsoft.PowerFx.Types.BlankType' to type 'Microsoft.PowerFx.Types.RecordType'.
```
2024-06-05 20:56:19 -07:00
Luc Genetier a2e5a7ca65
Include Microsoft.PowerFx.Shims.dll in Core.Tests nuget (#2460) 2024-06-05 22:06:55 +00:00
Adithya Selvaprithiviraj c9c5a866f6
Handle Entity types in UDFs (#2427)
As we plan to support complex types from Datasource in UDFs, we want to
handle recursively defined Entity types in UDFs.

We do not need to check for restricted types in DataEntity and metadata
types that have expandinfo.
2024-06-05 13:43:58 -07:00
Luc Genetier 10346aeb53
Run tests in .Net 4.6.2 and .Net 7.0 (#2442) 2024-06-04 12:27:31 +02:00
Jas Valgotar cb8d7af4f1
Adds expression re-writing capabilities in LSP InitialFixup method. (#2453) 2024-06-03 14:10:35 -07:00
Jerry Santana d46881019d
Add ability to override output when calling the connector (#2445)
This is useful in a situation when the output type is dynamic and is not
available in the swagger

---------

Co-authored-by: Mike Stall <mikestall@hotmail.com>
2024-05-31 13:04:28 -06:00
Greg Lindhorst caa821f071
Updated option set testing (#2446)
Fixes a bug in Canvas apps coercing an option set value to number. There
were missing checks for pre-V1 semantics in DType.cs.

But this bug, along with the other recent fixes, is because we were not
testing with actual option sets, instead relying on enums since those
can be built for all the backing kinds. In general, enums and option
sets aren't that different in V1, but they are very different in pre-V1
which is what Canvas uses today. This has been corrected in this PR. We
now run tests with the test enums registered as option sets instead,
mimicing the semantics in Canvas for Dataverse number and Boolean option
sets. These new typed option sets are not exposed generally, as we
should look at that implementation more closely, today it translates
between string values more than it needs to.

By doing this testing, another bug was found in the interpeter, where we
weren't back converting boolean values to the option set, for example in
`Text( If( false, OptionSet.Value, true ) )`. C# now has the same
semantics as Canvas for Booleans. Number and other backing kinds may
also want this behavior long term, but since those aren't yet supported
we have time to decide how to handle that scenario. Without any changes,
a `CalculatedOptionSetValue` will be returned for the label if coerced
to a string, but the value itself will be correct.
2024-05-30 21:53:01 -07:00
Anderson Silva 0f75d9f196
Update 1.3 release notes with void accept changes (#2443) 2024-05-29 18:10:25 +00:00
Adithya Selvaprithiviraj cc2f2d1f69
IntelliSense fix for UDFs (#2431)
We need partial parse invalid UDF definitions for Intellisense to
suggest options, This PR adds logic to return parse invalid UDF IRs
which can be used by Intellisense .
2024-05-28 20:33:47 +00:00
Mike Stall f286e02a2d
Jmstall/summarize fix2 (#2433)
Co-authored-by: anderson-joyle <joyle@outlook.com>
Co-authored-by: Luc Genetier <69138830+LucGenetier@users.noreply.github.com>
2024-05-28 10:14:15 -07:00
Luc Genetier 318456e51f
Make TXT files visible (#2437) 2024-05-27 19:23:24 +00:00
Luc Genetier 233c458b42
Using shared projects for tests (#2436) 2024-05-27 17:23:41 +02:00
Mike Stall c2aad25308
Revert "Move test projects to shared projects" (#2430)
Reverts microsoft/Power-Fx#2428
2024-05-24 13:33:33 -07:00
Luc Genetier bb5b66ec23
Fix missing icons (#2429) 2024-05-24 19:23:41 +00:00
Luc Genetier 3c84480604
Move test projects to shared projects (#2428) 2024-05-24 18:16:14 +00:00
Luc Genetier 0f538e6ec6
Connectors: Add AssociatedDataSource to tabular DType (#2425)
initial work
add relationships, permissions, key type and order, link to
AssociatedDataSource DType
2024-05-24 17:20:45 +00:00
Akshar 15ee002bbf
Add Field to Nl2Fx and Fx2Nl Result Dtos to hold diagnostics info such as Model prompt (#2423)
This pr simply adds a new field to capture diagnostics for fx2nl or
nl2fx
2024-05-24 12:18:47 -04:00
Anderson Silva c8fdea18a7
DateValue locale fix (#2337)
Issue https://github.com/microsoft/Power-Fx/issues/2334.
2024-05-24 10:03:48 -05:00
rick-nguyen 2838431743
Expose void return type and add reserved UDF names (#2412)
With imperative functions, add support for a void UDF type. Also some
functions should not be allowed for UDF names like Set, Collect, etc.
2024-05-23 16:25:24 -07:00
toshio-msft cda6b36410
[[Power-Fx]] Localization hand-back [CTAS - RunID=20240522-195155-s8jgqvyyp7] (#2424)
Translation handback check-in (PR Created by automation).
2024-05-23 22:36:37 +00:00
Anderson Silva 52cae12ba7
Lexer PFxV1 to not remove zero width char (#2380)
Issue https://github.com/microsoft/Power-Fx/issues/2309.
2024-05-23 21:37:05 +00:00
Akshar fc229ab412
Interpret the Cancelation Error More Clearly and Respond with Specific Error Code and Fix small semantic tokens bug (#2378)
This pr does two things at a high level
1) Interprets a cancellation error on a lsp request more clearly and
returns a specific error code as specified the lsp protocol.

2) Fixes a very small semantic tokens bug that i introduced during lsp
refactoring
2024-05-21 13:31:04 -04:00
Robulane 5298ae3f23
[Connectors][Bugfix] Fix wrong detection of binary in body parameters (#2420) 2024-05-21 16:10:16 +00:00
Robulane 9601320475
[Connectors][Bugfix] Fix null field name in the return type (#2418)
Co-authored-by: Mike Stall <mikestall@hotmail.com>
2024-05-21 15:24:51 +00:00
Carlos Figueira 4f7af60f60
Update resource strings per localization team feedback (#2417)
The localization team asked us to remove the locked directive for one resource, as it was having errors in a few languages.
2024-05-20 21:50:29 +00:00
Anderson Silva efdc393123
Unifying clear function (#2400)
Part of https://github.com/microsoft/Power-Fx/issues/1550.
2024-05-20 16:05:55 -05:00
Mike Stall 3a6289738f
Connector Fixes (#2415)
Fixes Assert: #2414, 
Fixes getting rows in tabular Connectors:   #2441
Fixes OdataParameter handler, which is needed for 2441.
2024-05-17 06:47:28 -07:00
Adithya Selvaprithiviraj bd033f54ee
Validate type literal parse (#2402)
Since we use generic expression parser for parsing type expression
within type literal node, we consider an expression like `Type(5+5)` to
be parsevalid.

This PR 
1. Adds a validator to allow only valid type expressions.
2. Simplifies `DTypeVisitor` to use `DefaultVisitor` 
3. overrides exception when visiting `Type(Type(..))`
4. Adds TexlPretty for `TypeLiteralNode` to enable ToString.
2024-05-16 16:45:05 -07:00
Carlos Figueira d5cfbacfc2
Update resource lock directive per request from the localization team (#2413)
The localization team asked us to update the locked directive for one
resource, as it was having errors in a few languages.
2024-05-16 15:30:42 -07:00
Mike Stall 76fe4bc303
stronger typing to help with #2406. (#2407)
See #2406. This doesn't fix issue, but makes types more strongly typed
to help reduce the window.

Avoid mutable fields.
2024-05-16 18:44:59 +00:00
toshio-msft 247b87eda2
[[Power-Fx]] Localization hand-back [CTAS - RunID=20240516-154643-q0pkhh0qj] (#2409)
Translation handback check-in (PR Created by automation).
2024-05-16 09:16:49 -07:00
Luc Genetier f1afe8c523
Tabular connector refactoring (#2404)
no swagger
no v2
add ConnectorDataSource
get Dataset Metadata
2024-05-15 08:30:24 -07:00
Anderson Silva ebe58cf32a
Summarize should have a compile time error for Identifier as Name (#2395)
Issue https://github.com/microsoft/Power-Fx/issues/2370.
2024-05-14 13:39:26 -07:00
Carlos Figueira 8d5e598280
Add tests specific for the Decimal and Float functions (#2398)
There are no tests specifically for those functions; this splits the Value tests and adds those.
2024-05-13 16:27:48 -07:00
Luc Genetier 24db8995fa
Update codeowners (#2399)
Add power-fx-project-reviewers group to review .csproj and .sln files
2024-05-13 20:39:01 +00:00
McCall Saltzman f165db0f18
Update Invalid Use of Dot error (#2396)
Updates error to "The '.' operator cannot be used on <TypeName> values"

The error shows up in the case of
"the thing on the left of “.” is a number/string/other thing you can’t
use “.” on ever, excluding polymorphic because it's weird"
2024-05-10 14:11:34 -07:00
Mike Stall 9495a9fb51
Add more guards against threading misuse and races. (#2389)
Add more guards against threading misuse and races.
No functional changes.
2024-05-10 18:26:31 +00:00
Anderson Silva e7706f54e0
Adding VISION to README.md (#2391) 2024-05-10 15:13:58 +00:00
Greg Lindhorst ebf7e94da8
More improvements to strongly typed option sets (#2390)
Addresses customer reported bug in pre-V1 where option set value =
Blank() resulted in an error. General remedy is to return the pre-V1
code to its original state and have a large if around V1 vs. pre-V1
code. And more tests.
2024-05-10 07:45:56 -07:00
Carlos Figueira 75003651c1
Moved test from Rand.txt that depended on number being decimal (#2379)
One test from Rand.txt assumes that numbers are decimal; this moves it to a separate file.
2024-05-10 13:18:33 +00:00