Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
9952004
Added methods in status API supports for direct storage and reading o…
divzi-p Jun 29, 2023
37b5f7d
Changed SaveStateByteAsync,TrySaveStateByteAsync to use ReadOnlyMemor…
divzi-p Aug 26, 2023
5ffb173
[Workflow] Fix issue with ignored external event payload (#1119)
cgillum Jul 6, 2023
f3d6405
Rev'ed Grpc.Net.Client PackageReference version for Dapr dotnet-sdk (…
MonkeyTennis Jul 18, 2023
b8110ec
Add support to DAPR_HTTP_ENDPOINT and DAPR_GRPC_ENDPOINT env. (#1124)
artursouza Jul 18, 2023
2065570
Add cascading metadata (#1128)
Jul 18, 2023
34241a6
remove invalid code line (#1127)
hhunter-ms Jul 18, 2023
d5131bc
adding get actor reminder API in docs (#1113)
shivamkm07 Jul 21, 2023
d5959c2
Inroduce OnActorMethodFailedAsync virtual method for overriding (#1014)
vlardn Aug 16, 2023
b067162
Remove .NET Core 3.1 support and standardize on .NET 6 (#1045)
yash-nisar Aug 24, 2023
b99b4b1
Proof-of-concept serialization of advanced JSON types, records (#1073)
onionhammer Sep 5, 2023
a9d4b94
Type change from byte[] -> ReadOnlyMemory<byte>
divzi-p Jan 9, 2024
a0d1d37
Changed method names to sync with naming conventions
divzi-p Jan 13, 2024
132f822
Implememted review comments to add proper comments and remove comment…
divzi-p Apr 30, 2024
6ec96a6
Removed commented code.
divzi-p Apr 30, 2024
1020e9f
Updating workflow collection to allow for use of API Token validation…
RyanLettieri Sep 7, 2023
09a855d
set dapr-api-token to healthz requests when needed (#1145)
famarting Sep 7, 2023
254b399
Adding in new test for parallel raise events in workflow (#1155)
RyanLettieri Oct 6, 2023
eb827d6
Consolidate C# language version to 10. (#1180)
philliphoff Nov 13, 2023
c4eb2f1
Update actor reminder example. (#1179)
philliphoff Nov 13, 2023
97cbd21
Initial implementation for workflow log tracing (#1176)
RyanLettieri Nov 14, 2023
703340b
.NET 8 Support (#1188)
philliphoff Nov 15, 2023
8d7d72b
Modify broken links in README (#1190)
MregXN Nov 28, 2023
254c3d7
Added unit test to prove out enum serialization working as expected d…
WhitWaldo Nov 28, 2023
dc45a01
modify readme (#1192)
MregXN Nov 29, 2023
89d2c6d
Updates Dapr to 1.12 in GitHub actions itest (#1185)
JoshVanL Nov 29, 2023
423bc5d
Add holopin.yml config (#1147)
marcduiker Nov 29, 2023
a51c12c
Correct spelling of "identified" (#1159)
frankbuckley Nov 29, 2023
1dd74e7
Adding cancel to workflow example and updating api references to beta…
RyanLettieri Nov 29, 2023
6b3970f
Enable `CancellationToken` for non-remoting actor implementations (#1…
philliphoff Jan 6, 2024
3f924a1
Fix example dotnet-actors-howto.md (#1218)
henrikkarstrom Jan 6, 2024
48550c4
Update _index.md by fixing broken link (#1221)
farshaddavoudi Jan 6, 2024
a737137
use daprWorkflowClient (#1212)
MregXN Jan 8, 2024
d8376d8
Actor State TTL (#1164)
JoshVanL Jan 8, 2024
a41915c
Added documentation detailing how serialization works using the DataC…
WhitWaldo Jan 26, 2024
3a05d53
Weakly typed actor polymorphic and null responses (#1214)
RemcoBlok Jan 31, 2024
f7a66d8
Implementing Cryptography building block in .NET (#1217)
WhitWaldo Feb 14, 2024
38bc34b
Handle the case where appid contains at least one upperletter (#1233)
TWEESTY Feb 16, 2024
7bf1fae
Enable vault name mapping and error suppression (#1231)
jamesmcroft Feb 16, 2024
59a9be0
Add overload to deserialize GetBulkStateAsync item values (#1173)
WhitWaldo Feb 16, 2024
81ab50c
Use TryAddSingleton() for registering services. (#1238)
philliphoff Feb 16, 2024
61fd4bc
Source generated actor clients (#1165)
philliphoff Feb 16, 2024
e1a42d8
Merge 1.13 release branch back to master (#1247)
philliphoff Mar 8, 2024
38c32de
Updated to reflect latest guidance to register endpoints via top-leve…
WhitWaldo Apr 8, 2024
4fbfe71
Adds an option to set a timeout for service invocation (#1252)
elena-kolevska Apr 8, 2024
2986d41
Updating Workflow XML comment for accuracy (#1260)
WhitWaldo Apr 8, 2024
e0d359b
Updated property on type to reflect the fact that it can return a nul…
WhitWaldo Apr 8, 2024
a96cee4
#1239 remove polyfill packages (#1258)
thompson-tomo Apr 8, 2024
11dfdcd
Updated .github/holopin.yml. Fixes #1270 (#1276)
cmendible Apr 23, 2024
953e041
Update README.md (#1284)
m3nax May 13, 2024
7c50d04
restored missing title in readme (#1286)
m3nax May 14, 2024
10a5d32
Fixed badge broken links (#1290)
m3nax May 22, 2024
ba0d11b
Removed non-existent project, correct path of the generator project. …
m3nax Jun 5, 2024
9ad3692
Added overload for DaprClient DI registration (#1289)
WhitWaldo Jun 25, 2024
d2540ce
Merge `release-1.13` back into `master` (#1285)
philliphoff Jun 25, 2024
20fe0cb
Samples - Add k8s deployment yaml to DemoActor sample (#1308)
m3nax Jun 26, 2024
d4531ba
Added ActorReference creation from the ActorBase class informations (…
m3nax Jun 26, 2024
8479a9d
Added overload to support SDK supplying query string on invoked URL (…
WhitWaldo Jul 3, 2024
a3d476a
fix (#1329)
hhunter-ms Jul 23, 2024
b866eeb
link to non-dapr endpoint howto (#1335)
hhunter-ms Aug 9, 2024
da74dac
Added unit test to prove out concern raised on Discord
WhitWaldo Sep 13, 2024
89e271c
Removed unused using
WhitWaldo Sep 19, 2024
aa4cfed
Merge 1.14 release branch back into `master`. (#1337)
philliphoff Aug 22, 2024
8cc47f5
Added missing workflow status branch (#1348)
WhitWaldo Sep 13, 2024
f5129f9
Consolidated version of coverlet.msbuild, coverlet.collector, xunit, …
m3nax Jun 26, 2024
d3421bf
Added unit test to validate that headers aren't being stripped off re…
WhitWaldo Oct 7, 2024
20bc8f5
Fixed spelling typo
WhitWaldo Oct 7, 2024
fb42f81
Added fix to handle null return values
WhitWaldo Oct 6, 2024
62765d7
Removed unnecessary null check
WhitWaldo Oct 11, 2024
d126e1a
Removed deprecated methods from DaprClient and tests as well as unuse…
WhitWaldo Sep 3, 2024
6f84f17
Removed unused (and invalid) reference
WhitWaldo Sep 3, 2024
781fe32
Removed E2E workflow test as it validated DaprClient and the function…
WhitWaldo Oct 11, 2024
906f44e
Adding instance-based CreateInvokableHttpClient (#1319)
WhitWaldo Oct 14, 2024
a1a6f9c
Fixed security advisory updates across dependencies (transitive and d…
WhitWaldo Oct 15, 2024
dd1bcd0
Removes floating classes and introduces Dapr.Common project (#1365)
WhitWaldo Oct 16, 2024
0c1944b
Extracted Protos out to common project (#1367)
WhitWaldo Oct 16, 2024
3209c91
Improvement of the dotnet-contributing files (#1330)
Shubhdeep02 Oct 16, 2024
77dfe1e
Support case insensitive cloudevent payloads and forward cloudevent p…
iliaspoli Oct 17, 2024
ab6f508
Updating actor serialization documentation (#1371)
WhitWaldo Oct 18, 2024
47951b7
Prioritize retrieval of environment variables from IConfiguration ins…
WhitWaldo Oct 18, 2024
04d47e6
cleanup: Removed Serilog nuget from Directory.Packages.props (#1376)
m3nax Oct 22, 2024
cde2f0f
Removed sample folder (#1375)
m3nax Oct 22, 2024
1e727dd
Remove unused variables (#1314)
RafaelJCamara Oct 24, 2024
34d16ef
Remove unused using statements. (#1313)
RafaelJCamara Oct 24, 2024
094d757
Incremental source generator for actors (#1334)
m3nax Oct 28, 2024
fcfb7e1
Add .NET client for Dapr Jobs API (#1384)
WhitWaldo Nov 1, 2024
7b1e898
Updated prereqs to specify .NET 6 and .NET 8 in v1.15 (#1398)
WhitWaldo Nov 1, 2024
a0a95d9
Refactor DaprWorkflowClientBuilderFactory and WorkflowRuntimeOptions …
neworange-ruud Nov 4, 2024
180f622
Fix for DI registration not completing as expected (#1386)
WhitWaldo Nov 5, 2024
6964033
Add .NET client for pub/sub support - streaming subscriptions (#1381)
WhitWaldo Nov 5, 2024
ec505e2
ci: set fail-fast to false (#1405)
mikeee Nov 12, 2024
180447c
Added async operations workflow sample (#1394)
WhitWaldo Nov 12, 2024
d71f398
Added workflow example: Fan out/fan in (#1396)
WhitWaldo Nov 13, 2024
c0def6c
Added workflow sample: Sub-workflows (#1395)
WhitWaldo Nov 14, 2024
6d75abf
Added workflow sample: Task chaining (#1387)
WhitWaldo Nov 14, 2024
d7967c0
Added workflow sample: Monitor (#1388)
WhitWaldo Nov 14, 2024
aa4f494
Added workflow example: External interaction (#1389)
WhitWaldo Nov 18, 2024
3c4271a
Optional DI lifecycle change (#1408)
WhitWaldo Nov 21, 2024
be460e4
Additional lifecycle registration changes (#1410)
WhitWaldo Nov 24, 2024
132d072
Preserve comparer of the original dictionary from ConfigurationProvid…
tomhreb Nov 30, 2024
7965359
Bug/476 multiple methods per interface with JSON serialization doesn´…
paule96 Dec 3, 2024
47458cd
Support .NET 9 (#1404)
WhitWaldo Dec 4, 2024
7ff85d3
update .net workflow docs to stable (#1418)
hhunter-ms Dec 4, 2024
1b7e65c
FIX: Actor source generator generates invalid code for generic interf…
m3nax Dec 5, 2024
14c095e
added system.text and fixed bull check in test
divzi-p Dec 10, 2024
1d5cc35
Merge branch 'master' into feature_upgrade_statusapi_1.0.0
WhitWaldo Dec 11, 2024
f4810f4
Merge branch 'master' into feature_upgrade_statusapi_1.0.0
WhitWaldo Dec 11, 2024
9c2a061
Fixed two merge misses
WhitWaldo Dec 11, 2024
eeaa842
Merge remote-tracking branch 'divzi-p/feature_upgrade_statusapi_1.0.0…
WhitWaldo Dec 11, 2024
f72eadf
Fixed errors in unit tests
WhitWaldo Dec 11, 2024
6e98a19
Removed duplicate method
WhitWaldo Dec 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Incremental source generator for actors (#1334)
* Samples - Add k8s deployment yaml to DemoActor sample (#1308)

* up

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed build

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added scripts for image build

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added readme Build and push Docker image

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added demo-actor.yaml

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed typo

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated guide, fixed invocation throw curl

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Removed dockerfile, updated readme, removed ps1 and sh scripts

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated base image

Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Update demo-actor.yaml

Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added overload for DaprClient DI registration (#1289)

* Added overload for DaprClient DI registration allowing the consumer to easily use values from injected services (e.g. IConfiguration).

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added supporting unit test

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Merge `release-1.13` back into `master` (#1285)

* Update protos and related use for Dapr 1.13. (#1236)

* Update protos and related use.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Update Dapr runtime version.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Init properties.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

---------

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Update artifact action versions. (#1240)

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Make recursive true as default (#1243)

Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>

* Fix for secret key transformation in multi-value scenarios (#1274)

* Add repro test.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Fix for secret key transformation in multi-value scenarios.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

---------

Signed-off-by: Phillip Hoff <phillip@orst.edu>

* Update Dapr version numbers used during testing.

Signed-off-by: Phillip Hoff <phillip@orst.edu>

---------

Signed-off-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Co-authored-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

---------

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Co-authored-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
Co-authored-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Aligned nuget version

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* UP

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* UP

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Debug profile added

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated implementation

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Emitted DAPR001 Diagnostic warning

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added DAPR002 diagnostic

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Cleaun

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* UP

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added summaries

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added base interface to ActorClient

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added ctor

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added nullable directive

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added null check for actorproxy ctor parameter

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Moved DiagnoticException in a dedicate cs file

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Moved generator costants to dedicated class

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added ActorReference creation from the ActorBase class informations (#1277)

* Handled creation of ActorReference from Actor base class

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated null check

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added unit test for GetActorReference from null actore and actor proxy

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added test for ActorReference created inside Actor implementation

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated description

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed test method naming

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added unit test for exception generated in case the type is not convertible to an ActorReference

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

---------

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added overload to support SDK supplying query string on invoked URL (#1310)

* Refactored extensions and their tests into separate directories

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added overload to method invocation to allow query string parameters to be passed in via the SDK instead of being uncermoniously added to the end of the produced HttpRequestMessage URI

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Added unit tests to support implementation

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Marking HttpExtensions as internal to prevent external usage and updating to work against Uri instead of HttpRequestMessage.

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Updated unit tests to match new extension purpose

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

* Resolved an ambiguous method invocation wherein it was taking the query string and passing it as the payload for a request. Removed the offending method and reworked the remaining configurations so there's no API impact.

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>

---------

Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed actorProxy argument null check

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Moved ActorClientDesciptor into separta cs file

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Moved textual templates to dedicated class

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated comments, property names

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added argument null check to SyntaxFactoryHelpers

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added comments

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Removed obsolete testing packages https://github.com/dotnet/roslyn-sdk/blob/main/src/Microsoft.CodeAnalysis.Testing/README.md#obsolete-packages

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Adapted existing unit test to new source generated code

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Up

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added tests for SyntaxFactoryHelpers

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated generation of ArgumentNullException

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated nullability

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed internal methods tests

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added test to IEnumerableExtensions

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Unittested GetSyntaxKinds from Accessibility

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* UP

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated assignment implementation of ctor body

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Improved unit test

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added implementation of method generation

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed ArgumentNullException invocation

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added test for NameOfExpression

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed ActorProxy method invocation

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Simplified proxy argument definition

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Explicit generic arguments of the proxy call during generation

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Handled cancellation token with default value

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed typo

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Configured eol used in NormalizeWhitespace function

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Normalized expected source

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Moved to constat the ActorProxyTypeName

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fix typo

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Created ActorProxyInvokeMethodAsync SyntaxFactoryHelper

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Removed custom concat implementation

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* fix (#1329)

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* link to non-dapr endpoint howto (#1335)

Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Merge 1.14 release branch back into `master`. (#1337)

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed merge errors
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Updated some summaries

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Added some missing summaries

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Fixed typo

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Improved some summary text

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Improved summaries

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Handled review requests

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

* Changed SyntaxFactoryHelpers accessor to internal

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

---------

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <65919883+m3nax@users.noreply.github.com>
Signed-off-by: Whit Waldo <whit.waldo@innovian.net>
Signed-off-by: Phillip Hoff <phillip@orst.edu>
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com>
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Co-authored-by: Whit Waldo <whit.waldo@innovian.net>
Co-authored-by: Phillip Hoff <phillip@orst.edu>
Co-authored-by: Shivam Kumar <shivamkm07@gmail.com>
Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com>
Signed-off-by: Divya Perumal <divzi.perumal@gmail.com>
  • Loading branch information
5 people authored and divzi-p committed Dec 10, 2024
commit 094d757cc68ab928970bfd5218152b8250babd6e
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.8.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" Version="1.1.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
<PackageVersion Include="Microsoft.DurableTask.Client.Grpc" Version="1.3.0" />
<PackageVersion Include="Microsoft.DurableTask.Worker.Grpc" Version="1.3.0" />
Expand Down
41 changes: 24 additions & 17 deletions examples/GeneratedActor/ActorClient/ActorClient.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6</TargetFramework>
<LangVersion>10.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6</TargetFramework>
<LangVersion>10.0</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

<ItemGroup>
<ProjectReference Include="..\ActorCommon\ActorCommon.csproj" />
<ProjectReference Include="..\..\..\src\Dapr.Actors\Dapr.Actors.csproj" />
</ItemGroup>
<!-- Persist the source generator (and other) files to disk -->
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<!-- 👇 The "base" path for the source generators -->
<!--<GeneratedFolder>Generated</GeneratedFolder>-->
<!-- 👇 Write the output for each target framework to a different sub-folder -->
<!--<CompilerGeneratedFilesOutputPath>$(GeneratedFolder)\$(TargetFramework)</CompilerGeneratedFilesOutputPath>-->
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\Dapr.Actors.Generators\Dapr.Actors.Generators.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ActorCommon\ActorCommon.csproj" />
<ProjectReference Include="..\..\..\src\Dapr.Actors\Dapr.Actors.csproj" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\src\Dapr.Actors.Generators\Dapr.Actors.Generators.csproj"
OutputItemType="Analyzer"
ReferenceOutputAssembly="false" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion examples/GeneratedActor/ActorClient/IClientActor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ------------------------------------------------------------------------
// ------------------------------------------------------------------------
// Copyright 2023 The Dapr Authors
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
454 changes: 221 additions & 233 deletions src/Dapr.Actors.Generators/ActorClientGenerator.cs

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/Dapr.Actors.Generators/AnalyzerReleases.Shipped.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Release 1.14

### New Rules

Rule ID | Category | Severity | Notes
--------|----------|----------|--------------------
DAPR0001| Usage | Error | Cancellation tokens must be the last argument
DAPR0002| Usage | Error | Only methods with a single argument or a single argument followed by a cancellation token are supported
3 changes: 3 additions & 0 deletions src/Dapr.Actors.Generators/AnalyzerReleases.Unshipped.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
; Unshipped analyzer release
; https://github.com/dotnet/roslyn-analyzers/blob/main/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md

38 changes: 38 additions & 0 deletions src/Dapr.Actors.Generators/Constants.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
namespace Dapr.Actors.Generators
{
/// <summary>
/// Constants used by the code generator.
/// </summary>
internal static class Constants
{
/// <summary>
/// The namespace used by the generated code.
/// </summary>
public const string GeneratorsNamespace = "Dapr.Actors.Generators";

/// <summary>
/// The name of the attribute used to mark actor interfaces.
/// </summary>
public const string ActorMethodAttributeTypeName = "ActorMethodAttribute";

/// <summary>
/// The full type name of the attribute used to mark actor interfaces.
/// </summary>
public const string ActorMethodAttributeFullTypeName = GeneratorsNamespace + "." + ActorMethodAttributeTypeName;

/// <summary>
/// The name of the attribute used to mark actor interfaces.
/// </summary>
public const string GenerateActorClientAttributeTypeName = "GenerateActorClientAttribute";

/// <summary>
/// The full type name of the attribute used to mark actor interfaces.
/// </summary>
public const string GenerateActorClientAttributeFullTypeName = GeneratorsNamespace + "." + GenerateActorClientAttributeTypeName;

/// <summary>
/// Actor proxy type name.
/// </summary>
public const string ActorProxyTypeName = "Dapr.Actors.Client.ActorProxy";
}
}
64 changes: 37 additions & 27 deletions src/Dapr.Actors.Generators/Dapr.Actors.Generators.csproj
Original file line number Diff line number Diff line change
@@ -1,45 +1,55 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsRoslynComponent>true</IsRoslynComponent>
</PropertyGroup>

<PropertyGroup>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
</PropertyGroup>
<PropertyGroup>
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" PrivateAssets="all" />
</ItemGroup>

<!--
<!--
Source generators are built and packaged as analyzers and not "normal" NuGet libraries.
-->

<PropertyGroup>
<!-- Generators must target netstandard2.0. -->
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks></TargetFrameworks>
<PropertyGroup>
<!-- Generators must target netstandard2.0. -->
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks></TargetFrameworks>

<!-- Do not include the generator as a lib dependency -->
<IncludeBuildOutput>false</IncludeBuildOutput>
<!-- Do not include the generator as a lib dependency -->
<IncludeBuildOutput>false</IncludeBuildOutput>

<!-- Suppress false-positive error NU5128 when packing analyzers with no lib/ref files. -->
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<!-- Suppress false-positive error NU5128 when packing analyzers with no lib/ref files. -->
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>

<!-- Suppress generation of symbol package (.snupkg). -->
<IncludeSymbols>false</IncludeSymbols>
<!-- Suppress generation of symbol package (.snupkg). -->
<IncludeSymbols>false</IncludeSymbols>

<!-- Additional NuGet package properties. -->
<Description>This package contains source generators for interacting with Actor services using Dapr.</Description>
<PackageTags>$(PackageTags);Actors</PackageTags>
</PropertyGroup>
<!-- Additional NuGet package properties. -->
<Description>This package contains source generators for interacting with Actor services using Dapr.</Description>
<PackageTags>$(PackageTags);Actors</PackageTags>
</PropertyGroup>

<ItemGroup>
<!-- Package the generator in the analyzer directory of the NuGet package -->
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>
<ItemGroup>
<!-- Package the generator in the analyzer directory of the NuGet package -->
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="AnalyzerReleases.Shipped.md" />
<AdditionalFiles Include="AnalyzerReleases.Unshipped.md" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="$(AssemblyName).Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b1f597635c44597fcecb493e2b1327033b29b1a98ac956a1a538664b68f87d45fbaada0438a15a6265e62864947cc067d8da3a7d93c5eb2fcbb850e396c8684dba74ea477d82a1bbb18932c0efb30b64ff1677f85ae833818707ac8b49ad8062ca01d2c89d8ab1843ae73e8ba9649cd28666b539444dcdee3639f95e2a099bb2"/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Microsoft.CodeAnalysis;

namespace Dapr.Actors.Generators.Diagnostics
{
internal static class CancellationTokensMustBeTheLastArgument
{
public const string DiagnosticId = "DAPR0001";
public const string Title = "Invalid method signature";
public const string MessageFormat = "Cancellation tokens must be the last argument";
public const string Category = "Usage";

private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(
DiagnosticId,
Title,
MessageFormat,
Category,
DiagnosticSeverity.Error,
isEnabledByDefault: true);

internal static Diagnostic CreateDiagnostic(ISymbol symbol) => Diagnostic.Create(
Rule,
symbol.Locations.First(),
symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Microsoft.CodeAnalysis;

namespace Dapr.Actors.Generators.Diagnostics
{
internal static class MethodMustOnlyHaveASingleArgumentOptionallyFollowedByACancellationToken
{
public const string DiagnosticId = "DAPR0002";
public const string Title = "Invalid method signature";
public const string MessageFormat = "Only methods with a single argument or a single argument followed by a cancellation token are supported";
public const string Category = "Usage";

private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(
DiagnosticId,
Title,
MessageFormat,
Category,
DiagnosticSeverity.Error,
isEnabledByDefault: true);

internal static Diagnostic CreateDiagnostic(ISymbol symbol) => Diagnostic.Create(
Rule,
symbol.Locations.First(),
symbol.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat));
}
}
25 changes: 25 additions & 0 deletions src/Dapr.Actors.Generators/DiagnosticsException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Microsoft.CodeAnalysis;

namespace Dapr.Actors.Generators
{
/// <summary>
/// Exception thrown when diagnostics are encountered during code generation.
/// </summary>
internal sealed class DiagnosticsException : Exception
{
/// <summary>
/// Initializes a new instance of the <see cref="DiagnosticsException"/> class.
/// </summary>
/// <param name="diagnostics">List of diagnostics generated.</param>
public DiagnosticsException(IEnumerable<Diagnostic> diagnostics)
: base(string.Join("\n", diagnostics.Select(d => d.ToString())))
{
this.Diagnostics = diagnostics.ToArray();
}

/// <summary>
/// Diagnostics encountered during code generation.
/// </summary>
public ICollection<Diagnostic> Diagnostics { get; }
}
}
34 changes: 34 additions & 0 deletions src/Dapr.Actors.Generators/Extensions/IEnumerableExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
namespace Dapr.Actors.Generators.Extensions
{
internal static class IEnumerableExtensions
{
/// <summary>
/// Returns the index of the first item in the sequence that satisfies the predicate. If no item satisfies the predicate, -1 is returned.
/// </summary>
/// <typeparam name="T">The type of objects in the <see cref="IEnumerable{T}"/>.</typeparam>
/// <param name="source"><see cref="IEnumerable{T}"/> in which to search.</param>
/// <param name="predicate">Function performed to check whether an item satisfies the condition.</param>
/// <returns>Return the zero-based index of the first occurrence of an element that satisfies the condition, if found; otherwise, -1.</returns>
internal static int IndexOf<T>(this IEnumerable<T> source, Func<T, bool> predicate)
{
if (predicate is null)
{
throw new ArgumentNullException(nameof(predicate));
}

int index = 0;

foreach (var item in source)
{
if (predicate(item))
{
return index;
}

index++;
}

return -1;
}
}
}
Loading