Can't build using SourceGenerator, xml documentation and warnings are errors
danzel opened this issue · comments
The code generated by the SourceGenerator creates warnings as it doesn't have XML documentation on it.
If you have "warnings are errors" enabled, then this breaks your build.
I think we need to put a header on the whole file like https://stackoverflow.com/a/2701832
Or maybe just put // <auto-generated />
before the SignalR.Strong namespace (Like on the SignalR.Strong.SourceGenerated
namespace below)
https://github.com/mehmetakbulut/SignalR.Strong/blob/master/SignalR.Strong.SourceGenerator/HubGenerator.cs#L33
I've never debugged a source generator before so I'm not too sure.
Just published v0.3.2
to address this.
It appears compiler emits CS1591 regardless of // <auto-generated />
. So I added short comments to each generated class and method. Ideally I would have made the generated classes private but I don't want to change that right now as people might rely on it and I'm hopeful source generation features will eventually be in SignalR itself as I mentioned in #8. Regardless, I have enabled doc
flag on the sample project so at least the warning would be caught in the future if I end up making further changes here.
This fixes it, thanks!