-
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
Show only latest VS, VC prompts by default #11326
Conversation
@zadjii-msft this PR initially has the changes to only show the latest using the same basic algorithm as It seems the other part of the ask here is to also generate profiles similar to what's in the Start menu, which we could do based on the architecture of the WT process running: Wanted to at least get this "half" of the PR up since it's my first code change to this repo (I added the initial .vsconfig way back in #907). |
To note, those shortcuts are only installed if VC is installed, which means I have to either add a workload check, which will load a significantly large file and parse through it (the COM server will), or a file path check which will probably be faster. I'll need to spend a little time investigating when those variations were added (e.g. 15.0, or later in 15.3 or something) and whether the paths are consistent or need varying like @trippwill did for the PowerShell prompt since the path to the module changed. If another preview is coming up soon, it might be worth taking this PR as-is to avoid spamming anyone with numerous VS installs, and I can open up another PR to continue investigating the aforementioned conditions. |
I appreciate taking the effort to break changes into smaller, more atomic pieces. I think we're targeting early Oct for the next release so we've still got time to iterate here, but you're right that this feels like something more easily digestible. |
src/cascadia/TerminalSettingsModel/BaseVisualStudioGenerator.cpp
Outdated
Show resolved
Hide resolved
@check-spelling-bot ReportUnrecognized words, please review:
Previously acknowledged words that are now absentcarlos dpg sid SPACEBAR Unregister xIcon yIcon zamoraTo accept these unrecognized words as correct (and remove the previously acknowledged and now absent words), run the following commands... in a clone of the [email protected]:heaths/terminal.git repository
✏️ Contributor please read thisBy default the command suggestion will generate a file named based on your commit. That's generally ok as long as you add the file to your commit. Someone can reorganize it later.
If the listed items are:
See the 🔬 You can test your commits without appending to a PR by creating a new branch with that extra change and pushing it to your fork. The check-spelling action will run in response to your push -- it doesn't require an open pull request. By using such a branch, you can limit the number of typos your peers see you make. 😉 🗜️ If you see a bunch of garbageIf it relates to a ... well-formed patternSee if there's a pattern that would match it. If not, try writing one and adding it to a Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines. Note that patterns can't match multiline strings. binary-ish stringPlease add a file path to the File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.
|
Team discussion: Yea we're pretty cool with this, and the fact that you can mark generated profiles as hidden by default is really cool. We'll try and get this in for 1.12 |
If 1.11 is coming up, note that while the profile GUIDs shouldn't have changed from what @trippwill wrote, the namespace did since there's a single generator. Not sure if that's going to pose a migration problem. That said, if there's time, I think we should at least take the sorting / hiding of all but the latest VS and can pull in the VC later. I could fairly easily remove the VC detection if you wanted to preview that longer and get feedback. With VS2022 coming out soon, more people will have multiple VSes installed (at least for a little while, based on past telemetry) so there will be at least 4 new entries all for VS. I worried about a backlash because of "spam". |
Oh, I don't think we'll have any troubles merging this for the next release, we still have a little under 2 weeks so that's plenty of time |
Isn't the original code already in 1.11 preview and getting close to shipping? (Not trying to sound impatient, mainly concerned about compatibility/migration woes, and sudden showing "too many" VS prompts.) |
@heaths I don't believe so, #7774 only merged on the 15th and 1.11 preview came out on August 31st |
Okay, cool. 👍 @bitcrazed made me think otherwise with the mention it was in Windows Terminal Preview. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea I'm cool with this. I like that we're combining this into one namespace, that makes a lot of sense.
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
could/should it also prefer powershell 7 for devshell? |
@LuanVSO Totally! If you don't mind, could you open a feature request issue for this? |
Sorry, I'm just coming back from vacation and doing post-mortem PRs. I read over the body of the PR and the committed changes, and I can't tell why so much code changed. What else happened here? 😄 |
I refactored into a single discoverer because the existing ones were coded to generate a single profile per VS version. The VC cmd shell were to generate 1 or 4 depending on chip. Once I refactored, the inheritance model of the old generates was unnecessary and I was able to remove some otherwise unnecessary code. No point keeping it around to maintain. |
Love it! Thank you |
Doc updated in response to some discussion in [#11326] and [#7774]. In those PRs, it became clear that there needs to be a simple way of collecting up a whole group of profiles automatically for sorting in these menus. Although discussion centered on how hard it would be for extensions to provide that customization themselves, the `match` statement was added as a way to allow the user to easily filter those profiles themselves. This was something we had originally considered as a "future consideration", but ultimately deemed it to be out of scope for the initial spec review. References: * #1571 * #11326 * #7774
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
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".