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

Consume API docs from win32metadata #309

Merged
merged 1 commit into from
Jun 25, 2021
Merged

Conversation

AArnott
Copy link
Member

@AArnott AArnott commented Jun 25, 2021

This removes our own production of the API docs data file and replaces it with a consumption of what the win32metadata repo started producing in microsoft/win32metadata#548.

@AArnott AArnott added the enhancement New feature or request label Jun 25, 2021
@AArnott AArnott self-assigned this Jun 25, 2021
This removes our own production of the API docs data file and replaces it with a consumption of what the win32metadata repo started producing in microsoft/win32metadata#548.
@AArnott AArnott force-pushed the consumeDocsFromMetadataRepo branch from c0af41e to 5d452d7 Compare June 25, 2021 00:36
@AArnott AArnott merged commit 778ebaa into main Jun 25, 2021
@AArnott AArnott deleted the consumeDocsFromMetadataRepo branch June 25, 2021 03:33
@mikebattista
Copy link
Contributor

@kennykerr @marler8997 @timsneath this PR updated C#/Win32 to use the new Microsoft.Windows.SDK.Win32Docs package to provide Intellisense sourced from our documentation. The package uses MessagePack as the format which supports parsers for many languages including yours (just search for msgpack-<LANG> on GitHub).

microsoft/win32metadata#548 and https://github.com/microsoft/win32metadata/pull/548/files#diff-db362395805d75d149824342c0c4117c5475893dccaff9fae75bf18337a8fd84 go into a bit more detail about the package and the schema. This PR serves as a reference implementation.

If you get a chance, would appreciate any feedback you could give on how your experience is consuming it to add better documentation/Intellisense to your projections. Is MessagePack an appropriate format? Is it easy to parse using the existing parsers that exist for your language? Do you have any performance concerns?

Let us know. Thanks!

@marler8997
Copy link

I haven't used MessagePack, but it looks like a reasonable format for something like this. Thanks for letting me know about this new package, I'll look into including it and report any issues I run into.

@timsneath
Copy link

Excited about the potential here, for sure. From a Dart perspective, this today comes from hand-scraping from Windows docs, which is obviously laborious. I'll take a look. Does this include constants like WM_PAINT and structs, as well as functions?

@kennykerr
Copy link

Agreed, this sounds promising. As I mentioned here though, my main concern is general adoption of this format for APIs beyond Win32.

@mikebattista
Copy link
Contributor

The Win32 docs are scraped from the .md files in https://github.com/MicrosoftDocs/sdk-api/tree/docs/sdk-api-src/content and converted into MessagePack to basically build a hash table to make it easy to resolve the docs for a given API from any language.

WinRT docs are available in a similar location at https://github.com/MicrosoftDocs/winrt-api. If we can validate the approach with the Win32 docs and all agree that MessagePack is a good format here that's easy to consume from all projections, we can produce packages for other areas as well using the same model. The request for feedback though is to validate the approach first before we invest too much in this direction.

Does this include constants like WM_PAINT and structs, as well as functions?

@AArnott can you answer this?

@AArnott
Copy link
Member Author

AArnott commented Jun 30, 2021

@timsneath I just checked and it looks like WM_PAINT does not have docs associated with it. But as the docs exist in what looks like a similar structure to functions. I filed microsoft/win32metadata#563 to track covering this and other constants.

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

Successfully merging this pull request may close these issues.

None yet

5 participants