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
Use nullable reference types (C# 8.0) #19514
Comments
We can't do this as long as we want to also be able to build openra with
mono, which only had support for c# 7.
…On Tue, 13 Jul 2021, 14:32 Alexander Shkarlatov, ***@***.***> wrote:
REQUEST MOTIVATION
I suggest switching to the 8.0 language version and enabling "Nullable
reference types". You need to start with basic things like the
*openra.game* project.
The change will reduce the number of NRE errors, will remove the "! =
Null" checks and possibly improve performance.
PROPOSED SOLUTION
Allow lang ver 8.0 in OpenRA.Game/OpenRA.Game.csproj
<LangVersion>8.0</LangVersion>
<!-- In future change this to "enable"-->
<Nullable>warnings</Nullable>
<!-- Then project will be annotated, change this to "true"-->
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
EXPECTED SIDE EFFECTS
Nothings
ALTERNATIVES
Use JetBrains.Annotations nuget package
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#19514>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AESI7GG37WME3ZPTXZ26SX3TXQW4BANCNFSM5AJAFU4A>
.
|
Why support mono? NET5 supports major platforms (Win, lin, osx). Support for mobile platforms will be added in the future. It is also possible to build NET 5.0 for FreeBSD freebsd-requirements.md, NET5.0 on FreeBSD. It makes sense to support mono if there was a port to mobile platforms. |
We still have players that are using an older version of macosx that
doesn't support never versions of core. Not sure when we can drop mono
completely.
…On Tue, 13 Jul 2021, 15:00 Alexander Shkarlatov, ***@***.***> wrote:
Why support mono? NET5 supports major platforms (Win, lin, osx). Support
for mobile platforms will be added in the future. It is also possible to
build NET 5.0 for FreeBSD freebsd-requirements.md
<https://github.com/dotnet/runtime/blob/main/docs/workflow/requirements/freebsd-requirements.md>,
NET5.0 on FreeBSD <https://github.com/jasonpugsley/installer>.
It makes sense to support mono if there was a port to mobile platforms.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#19514 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AESI7GGTECETKA725M5WUJLTXQ2HJANCNFSM5AJAFU4A>
.
|
Mono now supports language version 8.0 |
.NET 6 is supported since macOS 10.15 "Catalina" (2019). It is pretty old OS version and it supports a lot of outdated macs anyway. There is no reason to stay with almost dead Mono. |
It's strange that it wasn't linked, but there was a small push for enabling nullable context #20796 My takeaway from it was that it forces some type gymnastics and boiler plate functions. I'm not really sure if thats desired, there are many cases in which you know that a value can't be null yet the compiler doesn't. Personally I'm just not interested in working on the migration |
REQUEST MOTIVATION
I suggest switching to the 8.0 language version and enabling "Nullable reference types". You need to start with basic things like the openra.game project.
The change will reduce the number of NRE errors, will remove the "! = Null" checks and possibly improve performance.
PROPOSED SOLUTION
Allow lang ver 8.0 in OpenRA.Game/OpenRA.Game.csproj
EXPECTED SIDE EFFECTS
Nothings
ALTERNATIVES
Use JetBrains.Annotations nuget package
The text was updated successfully, but these errors were encountered: