-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add enum value from newest Windows SDK #1859
Conversation
Windows SDK version 10.0.26100.0 adds a cache type value, `CacheUnknown`. This adds a case for that type to `sysinfo.cc`, which will otherwise complain about the switch statement being non-exhaustive when building with the new SDK. Since the value doesn't exist in prior SDK versions, we only add the case conditionally. The condition can be removed if we ever decide to bump up the required SDK version.
should we return "Unknown" in this case? |
Make sure the version macro we're using for the SDK is properly indicative of version 10.0.26100.0. Also fix formatting complains from the linter.
We could, but |
ah i didn't spot that. this is fine, thanks. |
Formatter insists on two space before a comment after a macro...
looks like the define guard isn't quite right |
Yes, I can't figure out why, unless I'm blind and missing something obvious. As far as I can tell that define was only added in the most recent SDK version, at the same time as CacheUnknown. Do you know what SDK version is being used by the builders which are failing? |
Current runner version: '2.319.1' is any of that useful? |
That's useful info, thanks! Unfortunately I checked out all the SDKs on the windows-2022 release image, and none of them have this defined, so I'm not sure what's going on. I notice that it's the windows-latest builders that are failing; do you know what's different between them and windows-2022? Looking around at the runner-images repo, I see that windows-latest might be some kind of alias for windows-2022, but evidently it's not identical. |
Found this issue, it seems like windows-latest has been partially updated but not completely? Not 100% sure if that's the problem, but it seems highly suspicious given that the error we're seeing here looks like we've got only part of the new SDK. |
Try detecting the current SDK version in a slightly different way.
latest is now passing, 2019/2022 are now failing :) |
Undefined constants are treated as 0 by the preprocessor, which causes the check to trivially return true for previous SDK versions. Replace the constant with its value (from the newest SDK version) instead,
thank you! |
Windows SDK version 10.0.26100.0 adds a cache type value,
CacheUnknown
. This adds a case for that type tosysinfo.cc
, which will otherwise complain about the switch statement being non-exhaustive when building with the new SDK.Since the value doesn't exist in prior SDK versions, we only add the case conditionally. The condition can be removed if we ever decide to bump up the required SDK version.