Writing out the thrown exception into the Error.g.cs file is great to allow errors to be analyzed - wouldn't it be good to also emit a compiler warning/error via GeneratorExecutionContext.ReportDiagnostic(...) for such an error? I think this would make the development experience even better.
Due to the following check, an exception is thrown if the target DTO has at least one ctor with parameters, even if a parameterless one is available.
https://github.com/StefH/FluentBuilder/blob/main/src/FluentBuilderGenerator/FileGenerators/FluentBuilderClassesGenerator.cs#L247-L252
The condition should be changed to
Writing out the thrown exception into the
Error.g.cs
file is great to allow errors to be analyzed - wouldn't it be good to also emit a compiler warning/error viaGeneratorExecutionContext.ReportDiagnostic(...)
for such an error? I think this would make the development experience even better.Anyway, thank you for your work on this project!