Open MatthewSteeples opened 4 years ago
Hi
Yes, I was planning to create a source generator when this technology gets an official release. I guess that MappingGenerator.OnBuildGenerator
could be quite easily converted to Source Generator. Any contributions are welcomed.
I make an attempt to create a SourceGenerator but this is a blocker for me https://github.com/dotnet/roslyn/issues/43821
@cezarypiatek I just found this repo because it has the same name as my own - I have been exploring source generators to implement a Map method for a couple weeks now at this repo, if you're interested. Mind you its not quite ready for production. I guess I'll have to find a different name before I start publishing it as a NuGet package :) I'll be interested to see what you come up with if you get past the blocker.
I started to work on this but finally realized that current code base is quite dependent on SyntaxGenerator which is not avalaible for source generators. Then found this one https://github.com/dotnet/roslyn/issues/43821 where the owner already discussed that. So we either wait for SyntaxGenerator to be exposed somehow or create a new abstraction for generation.
Coming with the .NET 5 wave, I think this extension would fit in really well with that so that mappings are generated at compile time. This would ensure they are always up to date, don't need to be checked in to source control etc while still maintaining the simplicity and speed of having precompiled code
Is this something you are planning on incorporating, or would you be happy to take a contribution with it in? I'd be more than happy to give it a go