-
Notifications
You must be signed in to change notification settings - Fork 95
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
Endless warnings when generated code is compiled with nullable #136
Comments
Can you provide the places where the #nullable disable needs to go? |
at the top of the .Classes.cs file and the .DataTypes.cs file. The files are riddled with nullable violations |
Not surprising since the code was written before that feature existed in the C# language. But it also means that making it nullable compliant would break existing code so it can never be more than option that has to be enabled during generation. |
Looks like #nullable disable is not an option given all the different frameworks that the Core library has to build against: |
crazy that there is no preprocessor switch that could help here... but a commandline switch during generation would be perfectly fine! |
The language version is explicitly set to 7.3 in the Core library. #if CSHARP_8_OR_NEWER Then it will be possible to update the generated code. |
I also tried to find a solution like that but I could not find a pretty one. The best solution would be to add a nullable switch to the executable but then it would a bit much to add that switch just to print those three lines... Ideally it would be nice to have a switch to properly generate nullable enabled code but I realize that is not so simple... |
Marked as nice-to-have enhancement but switching to nullable is not trival. It requires a rethink of almost every line of code. |
The code generated by the ModelCompiler needs to at least output
#nullable disable
or preferably generate code that compiles without warnings when nullable is enabled.The text was updated successfully, but these errors were encountered: