[PR #10967] [MERGED] Lookup WSL distros in the registry #28328

Open
opened 2026-01-31 09:27:49 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10967
Author: @zadjii-msft
Created: 8/17/2021
Status: Merged
Merged: 8/24/2021
Merged by: @undefined

Base: mainHead: dev/migrie/b/9905-7199-6160


📝 Commits (10+)

  • 3edf8a4 stash the old code
  • 9d7f035 This will enumerate the WSLs in the registry
  • dd0b2ad the whole thing
  • 4a1aba6 gotta have that #bodgy
  • d6f4197 that's what I get for committing without building
  • c48714e The absolute easiest nits
  • 3509dcd nits from review
  • 3befbd4 Merge remote-tracking branch 'origin/main' into dev/migrie/b/9905-7199-6160
  • 52e2c24 spel
  • 6709bec more pr nits

📊 Changes

2 files changed (+189 additions, -1 deletions)

View changed files

📝 .github/actions/spelling/allow/microsoft.txt (+1 -0)
📝 src/cascadia/TerminalSettingsModel/WslDistroGenerator.cpp (+188 -1)

📄 Description

This PR converts the WSL distro generator to use the registry to lookup
WSL distros instead of trying to parse the results of wsl.exe.
wsl.exe sometimes takes a very long time to launch the WSL service,
which means that on the first launch of the Terminal, WSL distros can
sometimes be missing entirely!

References

  • Also related is #6160, but I feel that deserves a separate PR for
    warning when the default profile is a dynamic profile who's source
    indicated it was gone.

PR Checklist

Detailed Description of the Pull Request / Additional comments

This is maybe a little BODGY, but hey we get tons of reports of this
root cause.

Validation Steps Performed

Ran it locally, it did well. Ran a wsl --shutdown, then booted the
terminal - seemed to do well. I never was able to repro the slowness
myself, but I'd suspect this'll fix it.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/10967 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 8/17/2021 **Status:** ✅ Merged **Merged:** 8/24/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/b/9905-7199-6160` --- ### 📝 Commits (10+) - [`3edf8a4`](https://github.com/microsoft/terminal/commit/3edf8a41958805988c65d65beac12aeabb985d24) stash the old code - [`9d7f035`](https://github.com/microsoft/terminal/commit/9d7f0351bd4a83fd3e7298b368c1a225a065dbf3) This will enumerate the WSLs in the registry - [`dd0b2ad`](https://github.com/microsoft/terminal/commit/dd0b2add36fcfcb994ecd23bf70c6c2b35787097) the whole thing - [`4a1aba6`](https://github.com/microsoft/terminal/commit/4a1aba624d56f7d062495428e9dd9675d748c1b6) gotta have that #bodgy - [`d6f4197`](https://github.com/microsoft/terminal/commit/d6f41979608cb7cfd34341d34d646b388d1d470c) that's what I get for committing without building - [`c48714e`](https://github.com/microsoft/terminal/commit/c48714ee7ceef3c73bbcbfe5f32659be7926aca1) The absolute easiest nits - [`3509dcd`](https://github.com/microsoft/terminal/commit/3509dcdbc4137e21ed8894ed7e89443ea8bf66f4) nits from review - [`3befbd4`](https://github.com/microsoft/terminal/commit/3befbd4261cb6c13b1d9604376e64e57c693d9a3) Merge remote-tracking branch 'origin/main' into dev/migrie/b/9905-7199-6160 - [`52e2c24`](https://github.com/microsoft/terminal/commit/52e2c24db3ed959930770a89dd8ba2d2fbc4e064) spel - [`6709bec`](https://github.com/microsoft/terminal/commit/6709bec3b3f9fb95b388bf81b868805bda041c3a) more pr nits ### 📊 Changes **2 files changed** (+189 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/spelling/allow/microsoft.txt` (+1 -0) 📝 `src/cascadia/TerminalSettingsModel/WslDistroGenerator.cpp` (+188 -1) </details> ### 📄 Description This PR converts the WSL distro generator to use the registry to lookup WSL distros instead of trying to parse the results of `wsl.exe`. `wsl.exe` sometimes takes a very long time to launch the WSL service, which means that on the first launch of the Terminal, WSL distros can sometimes be missing entirely! ## References * Also related is #6160, but I feel that deserves a separate PR for warning when the default profile is a dynamic profile who's source indicated it was gone. ## PR Checklist * [x] Closes #9905 * [x] Closes #7199 * [x] I work here * [ ] Tests added/passed * [ ] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments This is maybe a little BODGY, but hey we get tons of reports of this root cause. ## Validation Steps Performed Ran it locally, it did well. Ran a `wsl --shutdown`, then booted the terminal - seemed to do well. I never was able to repro the slowness myself, but I'd suspect this'll fix it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:27:49 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28328