-
Notifications
You must be signed in to change notification settings - Fork 162
[Win32] Explicitly set minimum supported OS version to 14393 #2026
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
base: master
Are you sure you want to change the base?
[Win32] Explicitly set minimum supported OS version to 14393 #2026
Conversation
I think it makes sense to have an explicit check in SWT for the minimum version. However, I am not sure about the C code cleanups. For example in #1568 some functions were marked as dynamic, because contrary to the documentation those functions are not available in every Windows version sind 1607. Are we sure that we are not breaking things again here? |
I am not sure whether that's really the case, but we should definitely check that. My impression is that the issue was with Note that this is currently only a proposal that we should agree on, but I am generally in favor of dropping support for OS versions that are out-of-support instead of searching for other solutions for issues regarding up-to-date JREs. Only issue I see is that there is some extended support for Windows Server 2012 (also see #1252 (comment)) which will not be supported by SWT anymore. But just because the OS receives security updates does not mean that it needs to receive latest Eclipse/SWT updates. We would just need to be aware that some people will some complaning again. |
74215d4
to
d7d0074
Compare
I just found a comment stating that the actual issue back then really was with |
9919f2d
to
0523509
Compare
Currently, there is no explicit minimum version required for executing SWT applications. However, some versions are implicitly not supported anymore as library methods are linked that are not present in older OS versions. In addition, we still have some methods dynamically linked and their execution guarded by a version constraint for version that are out of support. In particular, this holds for every Windows version older than build 14393, which is the 1607 update for Windows 10 and the release of Windows Server 2016, the latter being the latest still supported server version of Windows. This change cleans up Windows version support: - It adds an explicit version check at initialization to avoid that applications fail to start with incomprehensible linkage errors but a proper error message - It removes version guards for methods that are present since Windows build 14393 (update 1607) or older - It removes unnecessary dynamic linking for methods that are present in Windows build 14393 (update 1607) or older Fixes eclipse-platform/eclipse.platform.ui#2852 Probably fixes eclipse-platform#2011
0523509
to
78abbed
Compare
I just found that the proposed version check will not work: the primary SWT DLL is loaded even before the version check is executed (the DLL is required to extract the OS version) but that load operation will already fail when the Windows version is too old. Thus, even with this check the same kind of incomprehensive linkage error we have seen previously when breaking compatibility with older OS versions will occur. I see two possibilities to extract the Windows build version without loading the primary SWT DLL:
The first option seems cleaner to me. I would be willing to invest some effort to have a proper minimum version check for Windows in SWT, as we will eventually break compatibility with older Windows versions (like with the changes proposed here) and to avoid issues and discussions being started because of unclear linkage errors. Thus having a proper error message stating that the Windows build is too old for the Eclipse/SWT version seem valuable to me. @akurtakov what do you think about ...?
|
If you want to abort as early as possible eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT PI/win32/library/os_custom.c Line 25 in 111b874
As per https://eclipse.dev/eclipse/development/plans/eclipse_project_plan_4_36.xml#target_environments only Win10/11 are supported target environments. It's better to not start in clear way rather than hard crash with no clear info IMO. |
As per the same document there is no promise about J9 so there is no promise that this will work nor that it would be looked at by anyone aka "help welcome" type of issue. Again, I believe it's better to explicitly not start than to crash. |
Thank you for the feedback and the pointer! I'll see where I can add such a check. The |
Unfortunately, this is not possible. I have built SWT binaries against Windows SDK 10.0.26100.3624 by adding a method to the binaries that was introduced with that exact SDK version. In addition, I added an On a Windows system based on build 26100 (24H2), the So I think there is no way around having a separate way (like a separate Dll or a CLI call) to check the Windows build version. |
Currently, there is no explicit minimum version required for executing SWT applications. However, some versions are implicitly not supported anymore as library methods are linked that are not present in older OS versions. In addition, we still have some methods dynamically linked and their execution guarded by a version constraint for version that are out of support. In particular, this holds for every Windows version older than build 14393, which is the 1607 update for Windows 10 and the release of Windows Server 2016, the latter being the latest still supported server version of Windows.
This change cleans up Windows version support:
Fixes eclipse-platform/eclipse.platform.ui#2852
Probably fixes #2011