#sourcegenerator — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #sourcegenerator, aggregated by home.social.
-
A workaround could be to use my source generator to also generate a test helper class with the syntax tree as a string. Feels a bit icky but it seems workable. #dotnet #sourcegenerator #unitest
-
A workaround could be to use my source generator to also generate a test helper class with the syntax tree as a string. Feels a bit icky but it seems workable. #dotnet #sourcegenerator #unitest
-
A workaround could be to use my source generator to also generate a test helper class with the syntax tree as a string. Feels a bit icky but it seems workable. #dotnet #sourcegenerator #unitest
-
A workaround could be to use my source generator to also generate a test helper class with the syntax tree as a string. Feels a bit icky but it seems workable. #dotnet #sourcegenerator #unitest
-
A workaround could be to use my source generator to also generate a test helper class with the syntax tree as a string. Feels a bit icky but it seems workable. #dotnet #sourcegenerator #unitest
-
So am I the only one struggling with using `IncrementalValueProvider<string?>` with `ForAttributeWithMetadataName` in a #dotnet #sourcegenerator? I would have loved to alter the namespace of my attribute using an MSBuild prop, but it seems like that is not possible?
-
So made a source generator - ended up rather complex.
But I find unit testing it very tedious when verifying the generated output via Verify.Is it not possible to load a class/instance as source in the testing, and use it as foundation for the generator. Instead of having to manually writing (and maintaining) the source as a string to then parse into a syntax tree to verify output? I mean it can generate on compile time, so why not at test? :D
-
Added a simple dependency injection example into my source generators package: https://github.com/RikudouSage/SourceGenerators/tree/master/examples/dependency-injection
-
I've just created a PHP source generators package. It's still work-in-progress.
What do you think, yay or nay?
-
Earlier this year, around //build — some NuGet packages shipped. One of which is named AutoClient. It relies on a source-generator, emitting interface implementations and DI hooks for REST API HTTP clients, check it out:
:dotnet: #dotnet :csharp: #csharp
🤓 #sourcegeneratorhttps://www.nuget.org/packages/Microsoft.Extensions.Http.AutoClient
-
I'm working on a #dotnet #SourceGenerator (IIncrementalGenerator) and I need to not only look at the assembly referencing the SG, but also a referenced Assembly.
How can I best achieve this?
For better understanding: I have Project A, Project B and Project SG (IncrementalGenerator). Project A references Project B and Project SG. Project B has the classes where I want to generate based of.