-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Upgrade to .NET 8.0 and eradicate ☠ Mono ☠ #21577
Conversation
1852e97
to
35b23bc
Compare
The current dev appetite is for the next release to still use net6+mono, so this will need to wait until after that has occured at a minimum. I would recommend grepping the repo for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It saves into ~/Documents/.config/openra/
instead of ~/.config/openra/
on Linux. https://learn.microsoft.com/dotnet/core/compatibility/core-libraries/8.0/getfolderpath-unix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still a few hits for net 6
in these files:
- .github\workflows\documentation.yml
- .github\workflows\packaging.yml
- packaging\functions.sh
- packaging\macos\apphost.c
- packaging\windows\buildpackage.sh
And mono
in these files:
- OpenRA.Game\Exts.cs
- packaging\freebsd\openra
Extra System
or Microsoft
nuget packages that align with the runtime version should be bumped from 6 to 8.
.editorconfig
Outdated
@@ -820,7 +820,7 @@ dotnet_diagnostic.CA1843.severity = warning | |||
# Provide memory-based overrides of async methods when subclassing 'Stream'. | |||
dotnet_diagnostic.CA1844.severity = warning | |||
|
|||
# Use span-based 'string.Concat'. (Not available on mono) | |||
# Use span-based 'string.Concat'. | |||
dotnet_diagnostic.CA1845.severity = none |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's set this to a warning.
if [ -L "bin/${REPLACE}" ]; then | ||
return 0 | ||
fi | ||
# .NET 6 does not support .config files, so we must use symlinks instead |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.NET 8
- assuming the comment still holds in 8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With mono gone we don't have .config files at all, so this whole file needs to be updated (comments at top, function names, etc) to reflect .NET.
needs a rebase for support folder to be correct on Mac and Linux |
This would also be a good time to get rid of |
packaging/macos/launcher.m
Outdated
dllPath = [exePath stringByAppendingPathComponent: @"x86_64/OpenRA.dll"]; | ||
} | ||
} | ||
cpu_type_t type; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces -> Tabs in this file please.
umm, is Mono dead or something bad happened? |
Something like that. https://www.mono-project.com/ |
thanks! @JovialFeline |
This reverts commit 7011b2f.
Somebody should take a look at FreeBSD start script too. |
.NET 6 is out of support since yesterday https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like Exts has a function that references mono ResizeArray. It's unused so the whole function could be just removed.
Could you also rebase for the new SDL?
@@ -212,7 +208,7 @@ for MOD in "Red Alert" "Tiberian Dawn"; do | |||
done | |||
|
|||
for MOD in "Red Alert" "Tiberian Dawn" "Dune 2000"; do | |||
for p in "arm64" "mono"; do | |||
for p in "arm64"; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool loop
Changes
Apart from targeting .NET 8.0 this PR does other things too:
.editorconfig
after migrating to .NET 8.0 and removing MonoTODO
.editorconfig
.NET 8.0 on older Windows versions
Surprisingly, not only .NET 8.0 runtime works on Windows 8.1, but also the SDK. More importantly OpenRA compiled targeting .NET 8.0 works on Windows 8.1 as well (this runs in a VM so ignore the FPS):