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

Refactoring existing source generator to use new incremental api #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jlevier
Copy link

@jlevier jlevier commented Mar 28, 2023

#100

This PR updates the existing source generator to use the new incremental api: https://github.com/dotnet/roslyn/blob/main/docs/features/incremental-generators.md. This should increase performance as it utilizes caching to better determine what has changes and which items need to be rebuilt.

Thanks to @romfir for providing nice initial implementation and quality tests.

@jlevier jlevier force-pushed the feature/incremental-source-generator branch 2 times, most recently from 46f3f72 to a172388 Compare March 28, 2023 14:25
@jlevier jlevier force-pushed the feature/incremental-source-generator branch from a172388 to a01c3bf Compare March 28, 2023 14:42
@jlevier
Copy link
Author

jlevier commented Mar 28, 2023

Getting this error in the build - seems the pipeline is not able to resolve the updated Roslyn nuget packages.

CSC : warning CS8032: An instance of analyzer OneOf.SourceGenerator.OneOfGenerator cannot be created from C:\projects\oneof\OneOf.SourceGenerator\bin\Release\netstandard2.0\OneOf.SourceGenerator.dll : Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified..

Initially I had the source gen projects upgraded to .net 6.0 but it did not like that either. Please advise @mcintyre321

Edit: Also removed <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>

@cremor
Copy link

cremor commented Jul 6, 2023

Replaced by #148?

@jlevier
Copy link
Author

jlevier commented Jul 6, 2023

Yeah looks like it... wish we would've coordinated since this PR has been here a few months before the one just merged 😄

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.

2 participants