Skip to content

Support additional VS component IDs for workloads#43675

Merged
joeloff merged 1 commit intodotnet:release/9.0.1xxfrom
joeloff:sdk-901xx-ids
Sep 27, 2024
Merged

Support additional VS component IDs for workloads#43675
joeloff merged 1 commit intodotnet:release/9.0.1xxfrom
joeloff:sdk-901xx-ids

Conversation

@joeloff
Copy link
Copy Markdown
Member

@joeloff joeloff commented Sep 24, 2024

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.Component in 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.

@joeloff joeloff requested a review from a team September 24, 2024 23:59
@ghost ghost added Area-Workloads untriaged Request triage from a team member labels Sep 24, 2024
@joeloff joeloff removed the untriaged Request triage from a team member label Sep 25, 2024
{
// Normalize back to an SDK style workload ID.
installedWorkloadComponents.Add(packageId.Replace('.', '-'));
installedWorkloadComponents.Add(workloadId);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't you need to normalize this back still?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@joeloff joeloff merged commit 428c096 into dotnet:release/9.0.1xx Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants