-
Notifications
You must be signed in to change notification settings - Fork 1.4k
revert refactors of commandline parsing #12788
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
revert refactors of commandline parsing #12788
Conversation
…on is visible to dotnet (dotnet#12704)" This reverts commit a73379b.
This reverts commit 60fc61c.
|
validated it fixes vmr's ci by dotnet/dotnet#3446 |
There was a problem hiding this 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
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 |
|
@MichalPavlik fyi |
reverts #12693 #12704
Context
unblocking VMR insertion
dotnet/dotnet#3091
Changes Made
Testing
Notes