Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C# generated code does not include public XML comments or disable 1591 #65996

Closed
jolexxa opened this issue Sep 17, 2022 · 1 comment · Fixed by #79239
Closed

C# generated code does not include public XML comments or disable 1591 #65996

jolexxa opened this issue Sep 17, 2022 · 1 comment · Fixed by #79239
Assignees
Milestone

Comments

@jolexxa
Copy link
Contributor

jolexxa commented Sep 17, 2022

Godot version

4.0.0-beta1

System information

macOS 12

Issue description

Running dotnet build in C# Projects which have <GenerateDocumentationFile>true</GenerateDocumentationFile> specified in their *.csproj files results in warnings from the code produced by the Godot dotnet source generators:

warning CS1591: Missing XML comment for publicly visible type or member 'Main.SignalName'
warning CS1591: Missing XML comment for publicly visible type or member 'Main.RestoreGodotObjectData(GodotSerializationInfo)'
...etc

I currently maintain 5 packages for Godot whose public API's are fully documented and require GenerateDocumentationFile on those packages.

Possible solution:

The Godot source generators are already emitting #pragma warning disable for other rules (here's one such example).

Since Microsoft doesn't seem to care, I believe we should add a #pragma warning disable 1591 to every new or modified API added by the Godot dotnet source generators.

Steps to reproduce

Essentially, any project which contains <GenerateDocumentationFile>true</GenerateDocumentationFile> in the *.csproj file will result in build warnings about missing documentation from the Godot dotnet source generator output.

Minimal reproduction project

I am working on updating one of my smallest packages to Godot 4. You can reference the godot4 branch of go_dot_collections here as a minimum reproduction sample: https://github.com/chickensoft-games/go_dot_collections/tree/godot4

@neikeq neikeq self-assigned this Sep 21, 2022
@neikeq neikeq added this to the 4.0 milestone Sep 21, 2022
@raulsntos raulsntos moved this to To Assess in 4.x Priority Issues Nov 21, 2022
@raulsntos raulsntos moved this from To Assess to Todo in 4.x Priority Issues Nov 21, 2022
@18swenskiq
Copy link

I will add to this rather than submitting a new issue, this causes any C# project to be unable to build if "Treat warnings as errors" is enabled in the csproj (TreatWarningsAsErrors>True</TreatWarningsAsErrors>), making the setting functionally unusable for Godot projects.

@YuriSizov YuriSizov modified the milestones: 4.0, 4.x Feb 27, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in 4.x Priority Issues Jul 25, 2023
@YuriSizov YuriSizov modified the milestones: 4.x, 4.2 Jul 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants