Skip to content
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

Improve accuracy of supported OS versions for APIs #738

Open
sotteson1 opened this issue Nov 10, 2021 · 5 comments
Open

Improve accuracy of supported OS versions for APIs #738

sotteson1 opened this issue Nov 10, 2021 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@sotteson1
Copy link
Contributor

In order to improve on the supported OS platforms, and to avoid having to scrape the docs (which don't always seem to be accurate), we could build the .winmd multiple times with _WIN32_WINNT set to different versions. By looking at the differences, we could see which APIs are supported in which versions. This would not be part of every build. It would be a step we would run manually in order build up the platform versions input .rsp.

@mikebattista
Copy link
Contributor

I've tried building with NTDDI_VERSION set to different values and that's full of issues.

I have an internal thread looking into better ways to source this information.

@riverar
Copy link
Collaborator

riverar commented Apr 19, 2023

We might be better off just ignoring/dropping the attribute for now, get the APIs emitted, then move to a maintain-the-scraper-output stage where we can do an OS verison annotation pass. (I'm not sure anyone is using the attribute today.)

@tim-weis
Copy link
Contributor

@riverar The SupportedOSPlatform attribute shows up in the generated CsWin32 bindings, and is subject to CA1416 diagnostics. When using the IFolderView interface, for example, you might get something like this:

warning CA1416: This call site is reachable on all platforms. 'IFolderView' is only supported on: 'windows' 5.1.2600 and later.

With CsWin32 still in beta, breaking changes would still be permissible, but there are clients that do use the attribute (even if not directly).

@riverar
Copy link
Collaborator

riverar commented Apr 24, 2023

The values are wildly wrong so I hope no one is truly using them!

@timsneath
Copy link
Contributor

Should we remove this principle from https://github.com/microsoft/win32metadata/blob/main/docs/projections.md, since these are unreliable?

`Language projections should support filtering available APIs based on the SDK version that a project targets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants