SteveDunn / Vogen

A semi-opinionated library which is a source generator and a code analyser. It Source generates Value Objects
Apache License 2.0
781 stars 45 forks source link

Generated XML comments are malformed when using `ValueObject<int?>` #568

Closed elianora closed 3 months ago

elianora commented 4 months ago

Describe the bug

Using the following:

When attempting to use ValueObject<int?>, build a project. You will notice that CS1570 is triggered for malformed XML comments in the generated file.

Steps to reproduce

  1. Add the following to a new file in a project:
    [ValueObject<int?>]
    public readonly partial struct MyType { }
  2. Attempt to build the project
  3. Notice that CS1570 is triggered in the generated file

Expected behaviour

CS1570 is not triggered in the generated file and the XML comments are well-formed

SteveDunn commented 4 months ago

Hi @elianora - thanks for the bug report. I can't seem to reproduce this issue. Have you got a solution that you can share?

SteveDunn commented 3 months ago

I'm closing this one for now, but if it's still an issue, please let me know. Also, with regards to the nullable primitive: that (to my mind at least), it doesn't make sense to wrap a nullable primitive. Value objects represent values. In a way, it help to stop the use of null (alongside types such as Option, Maybe, OneOf etc. What scenario do you find this useful?