-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Visual Studio Generator should probably prefer x64 tools when available #11307
Comments
IMO adding 6 profiles per install vs 2 profiles per install seems a little heavy, and way more likely that I'm just gonna delete them all. I'm gonna also summon @trippwill (as OP of the PR) and @heaths (as the literal vswhere expert) to this thread for discussion |
I, too, was initial concerned about "too many" profiles but it's not hard to hide them. While I mostly agree with only showing x64 shells by default (when there are both), all those shells are designed for specific workloads where users may prefer one over another - even for different tasks. As more and more possibilities are added (consider numerous WSL2 distros installed), what about some sort of grouping mechanism in WT? Discovery could attach some "group attribute" so they are put into a submenu together. In the case of VS, I'd recommend doing that per-version e.g. VS2019 vs. VS2022. Though, in that case, I imagine you'd need to make keyboard bindings explicit instead of purely-indexed based (or maybe that's possible now already). |
We've actually got a big-ol design for profile grouping in #1571 (there's a spec for that here:https://github.com/microsoft/terminal/blob/main/doc/specs/%231571%20-%20New%20Tab%20Menu%20Customization/%231571%20-%20New%20Tab%20Menu%20Customization.md). The original design was entirely outside of the list of profiles though. It simply provides a way for users to separately group their profiles, rather than allowing dynamic profile generators the ability to say "please group my profiles together". Though, if I remember the discussion correctly, we did think it would be a cool idea for people to easily say "please put all the WSLs in this nested list". Maybe we should bump that spec with an addenda for something like " |
Sounds like a good idea and is congruent with the concept I was thinking. Presumably people could still move profiles to another menu based on their stable My main concern here is that deciding for the user what's relevant won't work for all users. Maybe in the meantime we can set |
...and without nesting, one could also prioritize showing newer versions - even prereleases - over older versions. If we're only considering hiding other entries by default to clean them up (until WT supports nesting menus), then I see no harm in showing preferred entries, which one could assume that most users would prefer the latest version of what they installed, and the shell that supports the most targets and/or faster tools e.g. x64. vswhere works similarly with the |
FWIW, the PowerShell Core generator does a similar thing where it prefers newer versions of pwsh.exe over older ones. |
I'll take a stab at this with the idea of hiding some/most by default. |
Indeed I agree that polluting profile list with multiple profiles is not great and deciding for the user which ones to show/hide might not be possible reliably. How about we provide automatic profile generation, but in fact hide them all by default? And let users enable easily whatever they need. I'm kind of referring also to the #11326 PR. Well I have both VS2019 and VS2022 installed, but use mainly VS2019 so yeah, right of the gates I would need to switch it up. Long story short I appreciate automatic generation of profiles (and future generation for each arch) it makes life easier to not do it manually. But those profiles should be imho opt-in whenever user wants to show them or not. |
Based on telemetry, the vast majority of users only have a single version of VS installed, and the assumption is that most would want to use their newest installed version by default (they are also capable of targeting older versions in most cases). Why not provide the best experience automatically for the majority of users? The PR shows the latest version of VS, and if VC is installed only shows the matching processor architecture by default. You can still toggle visibility on any discovered profiles. |
## Summary of the Pull Request Similar to `vswhere -latest`, show only the latest Visual Studio command prompts / developer PowerShell. This was tested by deleting the local package state and testing against fresh state with both VS2019 and VS2022 Preview installed, and indeed VS2022 Preview (both cmd and powershell) show. The other profiles were generated but hidden by default. ## References Modification of PR #7774 ## PR Checklist * [x] Closes #11307 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Detailed Description of the Pull Request / Additional comments The sort algorithm is the same basic algorithm I used in https://github.com/microsoft/vswhere. It sorts first by installation version with a secondary sort based on the install date in case the installation versions are the same. ## Validation Steps Performed With both VS2019 and VS2022 Preview installed, I made sure the initial state was expected, and tried different combinations of hiding and unhiding generated entries, and restarted Terminal to make sure my settings "stuck".
From #7774
<discuss>
The text was updated successfully, but these errors were encountered: