Skip to content

Conversation

@JanProvaznik
Copy link
Member

reverts #12693 #12704

Context

unblocking VMR insertion
dotnet/dotnet#3091

Changes Made

Testing

Notes

@JanProvaznik
Copy link
Member Author

validated it fixes vmr's ci by dotnet/dotnet#3446
ready to review

@JanProvaznik JanProvaznik marked this pull request as ready for review November 19, 2025 14:26
Copilot AI review requested due to automatic review settings November 19, 2025 14:26
Copilot finished reviewing on behalf of JanProvaznik November 19, 2025 14:28
Copy link
Contributor

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 reverts two previous refactors (#12693 and #12704) of command-line parsing to unblock VMR (Virtual Monolithic Repository) insertion. The changes primarily move command-line parsing logic back from a separate CommandLineParser class into static methods in the XMake.cs file.

Key changes:

  • Removes the CommandLineParser class and moves its functionality back to MSBuildApp as static methods
  • Moves CommandLineSwitches.cs and CommandLineSwitchException.cs from CommandLine/ subdirectory to the root MSBuild/ directory
  • Introduces conditional compilation with FEATURE_GET_COMMANDLINE to support different argument passing mechanisms (string vs string array)
  • Reverts to using static fields for response file tracking instead of instance fields

Reviewed Changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/MSBuild/XMake.cs Reverts command-line parsing methods from CommandLineParser back to static methods; adds conditional compilation for argument types
src/MSBuild/MSBuildClientApp.cs Updates method signatures with conditional compilation for command-line parameter types
src/MSBuild/MSBuild.csproj Removes references to CommandLine subdirectory files; updates file references to root directory
src/MSBuild/CommandLineSwitches.cs New file in root directory (moved from CommandLine subdirectory)
src/MSBuild/CommandLineSwitchException.cs New file in root directory (moved from CommandLine subdirectory)
src/MSBuild/CommandLine/CommandLineParser.cs Deleted - functionality moved to XMake.cs
src/MSBuild/AssemblyInfo.cs Removes InternalsVisibleTo attribute for "dotnet" assembly
src/MSBuild.UnitTests/XMake_Tests.cs Updates test calls from CommandLineParser methods to MSBuildApp methods; adds conditional compilation
src/MSBuild.UnitTests/CommandLineSwitches_Tests.cs Updates test calls from CommandLineParser methods to MSBuildApp methods
src/Directory.BeforeCommon.targets Adds FEATURE_GET_COMMANDLINE compilation constant
src/Build/CompatibilitySuppressions.xml Removes compatibility suppressions related to experimental API changes
src/Build/BackEnd/Node/ServerNodeBuildCommand.cs Adds conditional compilation for command-line field type
src/Build/BackEnd/Node/OutOfProcServerNode.cs Adds conditional compilation for BuildCallback delegate signature
src/Build/BackEnd/Client/MSBuildClient.cs Adds conditional compilation for command-line field and constructor parameter types
src/Build.UnitTests/Utilities_Tests.cs Adds conditional compilation for test method calls

@YuliiaKovalova YuliiaKovalova merged commit 19d26c0 into dotnet:main Nov 20, 2025
16 checks passed
@YuliiaKovalova
Copy link
Member

@MichalPavlik fyi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants