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
WSL API missing function to enumerate installed distributions #4644
Comments
The Microsoft-ish suggestion is to parse the output of |
Ha, parsing executable output is not a solution. |
Trick to turn this tag feature, contrast death by tag discussion ref #3515, is providing the use case for your AP change request. [With no implication there is no use case. But that's how the dupe died two weeks after it was opened.] |
@therealkenc no idea what your comment means, looks like a typo? |
This submission is spiritually similar to #3515. #3515 was a discussion thread (label/tag 'discussion') that ran course and was closed. The hope is some use cases for the implied API enhancement are provided, thumbs up on the OP appear, and this one (which to be clear is entirely sensible) has a better chance than #3515. Question / observational commentary ("How are developers meant to consume these APIs? The dev story seems incomplete"), on a statistical basis anyway, usually end up chirping crickets. |
Thanks for clarifying. (I fundamentally have an issue with your ability to label/close issues using an imaginary rubric and without Microsoft involvement.) In this particular case, Microsoft is providing an API that is useless without the enumeration capability and I'd continue to argue this is a bug. |
+1 to enumerate wls list via the API. I'm building a remoting terminal that also supports WSL but I can't list them to the user without having to parts executable output. Would love if I could query for it instead of parsing text. |
I think this API would also improve the Windows Terminal support for autogenerating profiles for WSL distros, which currently contains 70 lines of boilerplate code to call and parse I assume the Windows Terminal team would rather consume an API from wslapi.h than maintain this code, but haven't checked. |
From Build 21327, it has been easier to enumerate WSL-ed distributions with undocumented IWslSupport COM interface. Something is coming... |
Consuming the WSL API requires developers to populate the distribution name parameter for most functions. There is no API to retrieve a list of valid distribution names, however, and none of the APIs support a
nullptr
input to signify the user's default distribution should be used, as general Win32 programming patterns would nudge you towards.How are developers meant to consume these APIs? The dev story seems incomplete.
Related: #3515 #3543
The text was updated successfully, but these errors were encountered: