Skip to content
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

Support additional VS component IDs for workloads #43675

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

joeloff
Copy link
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
@dotnet-issue-labeler dotnet-issue-labeler bot 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
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
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
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
31 checks passed
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