Update the version of GenAPI used and pass through correct arguments#364
Update the version of GenAPI used and pass through correct arguments#364MichaelSimons merged 3 commits intodotnet:mainfrom
Conversation
MichaelSimons
left a comment
There was a problem hiding this comment.
The new GenAPI version utilizes c# 8.0 features which is not compatible with the generated projects. Can you please update the project template accordingly?
|
@MichaelSimons Good catch, I pulled this out from another branch and missed that. The newer GenAPI tool understands nullable and generates with the annotations. I chose not to enable nullability in the generated projects and just suppress the warnings about using it in a non-null context ( Let me know if you'd rather switch that around. |
| <PropertyGroup> | ||
| <TargetFrameworks>#TargetFrameworks#</TargetFrameworks> | ||
| <LangVersion>latest</LangVersion> | ||
| <NoWarn>8632</NoWarn> |
There was a problem hiding this comment.
This should include $(NoWarn). Please moved to https://github.com/dotnet/source-build-reference-packages/blob/main/src/referencePackages/Directory.Build.props#L47 so that all warning suppressions are centrally located. A comment should be added like the other NoWarns indicating the reason.
Without this the generated code has numerous warnings.
| <NoWarn>8632</NoWarn> | |
| <NoWarn>$(NoWarn);8632</NoWarn> |
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks>#TargetFrameworks#</TargetFrameworks> | ||
| <LangVersion>latest</LangVersion> |
There was a problem hiding this comment.
Rethinking about the patterns used in this repo, I think this may be better defined in the common props - https://github.com/dotnet/source-build-reference-packages/blob/main/src/referencePackages/Directory.Build.props. This gives us more flexibility without having to edit/regen all projects. The projects should just contain specializations.
MichaelSimons
left a comment
There was a problem hiding this comment.
Thanks for the tooling improvements.
No description provided.