Support additional VS component IDs for workloads#43675
Merged
joeloff merged 1 commit intodotnet:release/9.0.1xxfrom Sep 27, 2024
Merged
Support additional VS component IDs for workloads#43675joeloff merged 1 commit intodotnet:release/9.0.1xxfrom
joeloff merged 1 commit intodotnet:release/9.0.1xxfrom
Conversation
marcpopMSFT
reviewed
Sep 25, 2024
| { | ||
| // Normalize back to an SDK style workload ID. | ||
| installedWorkloadComponents.Add(packageId.Replace('.', '-')); | ||
| installedWorkloadComponents.Add(workloadId); |
Member
There was a problem hiding this comment.
Don't you need to normalize this back still?
Member
There was a problem hiding this comment.
Oh, that's because you're using the workloadId and not the packageId. The packageId had to be normalized but the workloadId should be fine (and should be the short version of the id, correct?)
Member
Author
There was a problem hiding this comment.
correct, that's why we have a dictionary that uses the VS ID as the key and the workload ID as the value because translating back from the VS ID to the workload ID is more difficult.
MiYanni
approved these changes
Sep 25, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Visual Studio publishes all the component and component group IDs from their catalog to support extension developers. The norm is to follow their naming convention and include a prefix like
Microsoft.VisualStudio.Componentin the ID. .NET optional workloads (including abstract workloads) generate components and component groups that matches the .NET workload ID. This enables features like IPA to easily locate components when SDK resolvers report missing optional workloads.Visual Studio asked that we follow their guidelines so starting in .NET 9, we will prefix our components with 'Microsoft.NET.Component'. Repos will be able to opt-in and generate new IDs (related Arcade change: dotnet/arcade#15103)
This PR enables the SDK to search for both the old and new component IDs.
Risk
Low - if we decide not to leverage this, the SDK will add a few more IDs that won't be used.
Testing
Additional unit tests added to verify the mapping logic.