Skip to content

System.CommandLine update for src/SourceBuild #48520

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

Closed
wants to merge 1 commit into from
Closed

Conversation

adamsitnik
Copy link
Member

This part was excluded from #48477

@adamsitnik adamsitnik requested review from a team as code owners April 16, 2025 17:01
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Infrastructure untriaged Request triage from a team member labels Apr 16, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the usage of System.CommandLine in several tools under the src/SourceBuild directory by replacing the legacy types (CliArgument, CliOption, CliCommand, and CliRootCommand) with the new types (Argument, Option, Command, and RootCommand).

  • Update in CreateBaselineUpdatePR: Changes CLI argument and option classes to align with the new API.
  • Update in BuildComparer: Similar API changes have been applied.
  • Update in BinaryToolKit: Transitioned to the new System.CommandLine classes for improved consistency.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/SourceBuild/content/eng/tools/CreateBaselineUpdatePR/Program.cs Replaced legacy CLI types with the new API equivalents.
src/SourceBuild/content/eng/tools/BuildComparer/Program.cs Updated command-line option declarations; note potential description mismatch.
src/SourceBuild/content/eng/tools/BinaryToolKit/Program.cs Updated CLI command types to new System.CommandLine classes.

{
Description = "Path to the manifest file",
Required = true
};
var vmrAssetBasePathArgument = new CliOption<string>("-vmrAssetBasePath")
var vmrAssetBasePathArgument = new Option<string>("-vmrAssetBasePath")
{
Description = "Path to the manifest file",
Copy link
Preview

Copilot AI Apr 16, 2025

Choose a reason for hiding this comment

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

The description for vmrAssetBasePathArgument reads 'Path to the manifest file', which appears to be a copy-paste error. Please update it to accurately describe the asset base path.

Suggested change
Description = "Path to the manifest file",
Description = "Base path for VMR assets",

Copilot uses AI. Check for mistakes.

@mthalman
Copy link
Member

I'm assuming these changes are dependent on a rebootstrap?

@ViktorHofer
Copy link
Member

Thanks @adamsitnik. I merged this commit into #48523

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Infrastructure untriaged Request triage from a team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants