Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incremental source generator for actors #1334

Merged
merged 70 commits into from
Oct 28, 2024

Conversation

m3nax
Copy link
Contributor

@m3nax m3nax commented Aug 2, 2024

Description

Converted the Actor source generator into an IncrementalSourceGenerator to ease the future definition of new generation pipeline for other objects (E.g: #1305 (comment))

It also add a null check for actorProxy parameter passed in generated Actor ctor, definition of AnalyzerReleases.Shipped.md and AnalyzerReleases.Unshipped.md diagnostics, remove deprecated nugets.

Issue reference

_

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@m3nax m3nax force-pushed the incremental-source-generator-for-actors branch from 21683a6 to a3a3e68 Compare August 9, 2024 17:03
@m3nax m3nax marked this pull request as ready for review August 9, 2024 17:12
@m3nax m3nax requested review from a team as code owners August 9, 2024 17:12
@m3nax m3nax closed this Aug 9, 2024
@m3nax m3nax reopened this Aug 9, 2024
all.sln Outdated Show resolved Hide resolved
m3nax and others added 19 commits September 4, 2024 20:10
* up

Signed-off-by: Manuel Menegazzo <[email protected]>

* Fixed build

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added scripts for image build

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added readme Build and push Docker image

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added demo-actor.yaml

Signed-off-by: Manuel Menegazzo <[email protected]>

* Fixed typo

Signed-off-by: Manuel Menegazzo <[email protected]>

* Updated guide, fixed invocation throw curl

Signed-off-by: Manuel Menegazzo <[email protected]>

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

Signed-off-by: Manuel Menegazzo <[email protected]>

* Updated base image

Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>

* Update demo-actor.yaml

Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>

* Added overload for DaprClient DI registration (dapr#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 <[email protected]>

* Added supporting unit test

Signed-off-by: Whit Waldo <[email protected]>

---------

Signed-off-by: Whit Waldo <[email protected]>
Co-authored-by: Phillip Hoff <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>

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

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

* Update protos and related use.

Signed-off-by: Phillip Hoff <[email protected]>

* Update Dapr runtime version.

Signed-off-by: Phillip Hoff <[email protected]>

* Init properties.

Signed-off-by: Phillip Hoff <[email protected]>

---------

Signed-off-by: Phillip Hoff <[email protected]>

* Update artifact action versions. (dapr#1240)

Signed-off-by: Phillip Hoff <[email protected]>

* Make recursive true as default (dapr#1243)

Signed-off-by: Shivam Kumar <[email protected]>

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

* Add repro test.

Signed-off-by: Phillip Hoff <[email protected]>

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

Signed-off-by: Phillip Hoff <[email protected]>

---------

Signed-off-by: Phillip Hoff <[email protected]>

* Update Dapr version numbers used during testing.

Signed-off-by: Phillip Hoff <[email protected]>

---------

Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Shivam Kumar <[email protected]>
Co-authored-by: Shivam Kumar <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>

---------

Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Whit Waldo <[email protected]>
Signed-off-by: Phillip Hoff <[email protected]>
Signed-off-by: Shivam Kumar <[email protected]>
Co-authored-by: Whit Waldo <[email protected]>
Co-authored-by: Phillip Hoff <[email protected]>
Co-authored-by: Shivam Kumar <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
…apr#1277)

* Handled creation of ActorReference from Actor base class

Signed-off-by: Manuel Menegazzo <[email protected]>

* Updated null check

Signed-off-by: Manuel Menegazzo <[email protected]>

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

Signed-off-by: Manuel Menegazzo <[email protected]>

* Added test for ActorReference created inside Actor implementation

Signed-off-by: Manuel Menegazzo <[email protected]>

* Updated description

Signed-off-by: Manuel Menegazzo <[email protected]>

* Fixed test method naming

Signed-off-by: Manuel Menegazzo <[email protected]>

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

Signed-off-by: Manuel Menegazzo <[email protected]>

---------

Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Signed-off-by: Manuel Menegazzo <[email protected]>
Copy link

codecov bot commented Sep 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.68%. Comparing base (1b7c9f4) to head (6b219d2).
Report is 18 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1334      +/-   ##
==========================================
+ Coverage   67.28%   67.68%   +0.39%     
==========================================
  Files         174      175       +1     
  Lines        6025     6059      +34     
  Branches      671      675       +4     
==========================================
+ Hits         4054     4101      +47     
+ Misses       1802     1788      -14     
- Partials      169      170       +1     
Flag Coverage Δ
net6 ?
net7 ?
net8 67.68% <ø> (+0.41%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@m3nax m3nax requested a review from KrylixZA September 4, 2024 19:46
@m3nax
Copy link
Contributor Author

m3nax commented Sep 4, 2024

@KrylixZA really thank for taking time to review my pr.

Copy link

@KrylixZA KrylixZA left a comment

Choose a reason for hiding this comment

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

My knowledge of source generators is limited. I joined the review more to learn than anything else. Thanks for the education! 😉

That said, LGTM. We'll still need one of the Dapr maintainers to approve before it merges though as I am not on that list yet.

Thanks for your contributing!

Signed-off-by: Manuel Menegazzo <[email protected]>
@m3nax m3nax closed this Sep 10, 2024
@m3nax m3nax reopened this Sep 10, 2024
@m3nax
Copy link
Contributor Author

m3nax commented Oct 21, 2024

@WhitWaldo I have resolved the conflicts with the Master, do you have time to look at this branch?

Copy link
Contributor

@WhitWaldo WhitWaldo left a comment

Choose a reason for hiding this comment

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

Two nits to address - otherwise looks good.

@m3nax m3nax requested a review from WhitWaldo October 21, 2024 20:50
@WhitWaldo WhitWaldo added kind/enhancement New feature or request area/actor labels Oct 21, 2024
@WhitWaldo WhitWaldo added this to the v1.15 milestone Oct 21, 2024
@m3nax m3nax closed this Oct 24, 2024
@m3nax m3nax reopened this Oct 24, 2024
Copy link
Contributor

@WhitWaldo WhitWaldo left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@@ -22,7 +22,7 @@
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.8.0" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we're making the pivot to incremental source generators - might as well update each of the associated NuGet packages for Microsoft.CodeAnalysis.* - this one should be able to upgrade to 4.11.0, for example.

Copy link
Contributor

Choose a reason for hiding this comment

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

@m3nax One more here - just a package version update while we're at it and I think we're set.

@WhitWaldo WhitWaldo merged commit 03038fa into dapr:master Oct 28, 2024
10 checks passed
@m3nax m3nax deleted the incremental-source-generator-for-actors branch October 28, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/actor kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants