-
Notifications
You must be signed in to change notification settings - Fork 286
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
Switch to C# 7.3 #698
Comments
C# 8.0 among other features will bring nullable references. This is a opt in feature as the new syntax is a breaking change. It is backwards compatible once compiled though. You do need Visual studio 2019 which is currently still in preview. Even if nullable references are not directly beneficial to duality it is to users that use duality as they can see when returns/parameters etc can be null or not. This will help users write more robust code because null reference exceptions will now be pointed out to them at compile time (warning by default but can be turned to errors). It might be worth looking into once C# 8.0 is stable. |
Alright, let's get things started. Is there a feature-by-feature list of changes to C# by language version, as well as minimum required VS toolchain and its release date? If not, can we compile one as a basis for deciding which version to upgrade to? |
From what I know:
VS2017 C#7
VS2019 C#8
Since you need C#8 for nullable references I say we go for C#8. VS2019 is out already and it's stable (and ALOT faster I have to say). Appveyor has a VS2019 image so the CI part should work: Jup this does mean that ppl with VS2015 or VS2017 that want to work on the source of duality are out of luck but I don't believe this is a big problem as you can simply install multiple VS versions on one machine nowadays. EDIT: enriched the list with some info about the language features |
As a first step I say we just switch all projects to C# 8.0 and get appveyor working with it. After that we can start working on actually using the new features and changing the coding style where needed. |
Not new info, but for the record, as I didn't see it mentioned here: We can't upgrade to C# 8.0 yet, as VS 2019 doesn't support building PCL libraries by default and the AppVeyor 2019 image doesn't have the .NET Portable Library Targeting Pack. So we can either do the switch to .NET Standard first (#573), or just upgrade to C# 7.3. I've created a new discussion on the AppVeyor support in the mean time. I'll pick this up to upgrade to C# 7.3 and .NET 4.7.2. |
Progress
ToDo
|
#600 is now no longer blocked |
Discussion was moved to GitHub for further updates. See here: appveyor/ci#3041 |
According to this thread, C# 8.0 will only be available on .NET Core 3.0 and .NET Standard 2.1, but not on .NET Framework. That means further work on this is blocked until we eventually switched to .NET Core, which probably happens separately, after the anticipated .NET Standard switch. |
Because this will probably remain blocked for a bit and we've already done the upgrade to C# 7.3, I've made a new issue for C# 8.0 in #738. Closing this. |
Summary
Currently duality uses C# 4.0. This means we are missing the newer features that C#7.3 brings. Consider upgrading to a newer C# version.
Analysis
The text was updated successfully, but these errors were encountered: