revert refactors of commandline parsing#12788
Merged
YuliiaKovalova merged 2 commits intoNov 20, 2025
Merged
Conversation
…on is visible to dotnet (dotnet#12704)" This reverts commit a73379b.
This reverts commit 60fc61c.
Member
Author
|
validated it fixes vmr's ci by dotnet/dotnet#3446 |
Contributor
There was a problem hiding this comment.
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
CommandLineParserclass and moves its functionality back toMSBuildAppas static methods - Moves
CommandLineSwitches.csandCommandLineSwitchException.csfromCommandLine/subdirectory to the rootMSBuild/directory - Introduces conditional compilation with
FEATURE_GET_COMMANDLINEto 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
approved these changes
Nov 20, 2025
Member
|
@MichalPavlik fyi |
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.
reverts #12693 #12704
Context
unblocking VMR insertion
dotnet/dotnet#3091
Changes Made
Testing
Notes