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

Open
wants to merge 63 commits into
base: master
Choose a base branch
from

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 <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 (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 <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` (dapr#1285)

* Update protos and related use for Dapr 1.13. (dapr#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. (dapr#1240)

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

* Make recursive true as default (dapr#1243)

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

* Fix for secret key transformation in multi-value scenarios (dapr#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>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
…apr#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>
m3nax and others added 16 commits September 4, 2024 20:10
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>

Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
@m3nax m3nax force-pushed the incremental-source-generator-for-actors branch from e176e63 to 89b4069 Compare September 4, 2024 18:10
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
Signed-off-by: Manuel Menegazzo <manuel.menegazzo@outlook.com>
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 <manuel.menegazzo@outlook.com>
@m3nax m3nax closed this Sep 10, 2024
@m3nax m3nax reopened this Sep 10, 2024
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.

5 participants