Open ivan-mogilko opened 11 months ago
This has to be done in a PR and not with direct commits, as I believe after it's all done it won't build due to #1508, so once this is upgraded, the Windows Docker has to be changed too.
Questions:
I think we might as well move to at least to C++14 already. I would also consider C++17, because it has generic filesystem api, but will have to investigate if all ports will be able to support that, so this may be done later.
C++14 is holdback for how old Linux we want to go. We are using Debian 8 (Jessie) and currently the stable release is Debian 12 (Bookworm).
Debian 10 (Buster) which is LTS already includes C++17 support.
In C++17, std::optional
requires a polyfill for Apple Clang (which doesn't support it). I used this when I wrote my parsing of acsetup.cfg
in my tool agsconfig.
One good thing of having C++14 is the possibility to upgrade Google Test library, we are using two different old versions for specifically working around some issues in it. It appears this issues having been minimized in more recent versions. The other good thing is currently MinGW fails to build our tests due to some issue with the specific googletest we use, MinGW and SDL, and it looks like this error doesn't happen in recent googletest. I am still looking around to actually see if there's something on our code that could fix the specific compile error that happens - this is why I haven't put a CI with MinGW yet, I can build AGS but not the tests.
FWIW, I've been using 2022/C++ 17 with trivial adjustments and can contribute to the engine and editor without issues. So, the 2019 upgrade is OK with me.
I pushed my changes for VS 2022 here for reference: https://github.com/adventuregamestudio/ags/compare/master...edmundito:ags:edmundito/vs2022-compat
I just updated the latest version of 2022 (17.10.3) and had to:
VS 2015 free Community Edition is deprecated by Microsoft, and is no longer available for download from their official page (although there are still "unofficial" ways to acquire it).
At the same time the latest VS 2022 does not install on Windows 7, which I still use unfortunately. I might have to upgrade to Win10 or 11 soon, as more and more apps stop supporting it in their updates, but that will take some time.
Therefore I suggest to first move to VS 2019, as a temporary measure. According to this Microsoft's page the VS 2019's lifecycle is scheduled to end in 2029.
~As we have a 3.6.1 coming towards a full stable release, I would not like to apply these changes to ags3 branch just yet. Instead I propose to begin with ags4 branch, and apply this change to ags3 only after 3.6.1 is fixed in a separate "release-3.6.1" branch.~ EDIT: 3.6.2 is still in beta, so theoretically we may switch it to 2019.
The changes to the project might include:
Task list, for keeping the record: