-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 to token-per-line response file handling #26204
Revert to token-per-line response file handling #26204
Conversation
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.
A few notes on the updates from today/consulting with @jonsequitur.
src/Tests/dotnet.Tests/ParserTests/MSBuildArgumentCommandLineParserTests.cs
Outdated
Show resolved
Hide resolved
src/Tests/dotnet.Tests/dotnet-msbuild/GivenDotnetBuildInvocation.cs
Outdated
Show resolved
Hide resolved
3c14272
to
5da0f6f
Compare
I could add |
@dsplaisted if you wanna take another look that'd be cool :) I added full support for the different permutations of |
will this change fix to allow handling a comma in a quoted string in an RSP file? I didn't see this case covered in the tests such as:
another example in this comment: #26026 (comment) |
@BradBarnich thanks for checking! the response file part is parsed correctly, but the value gets mutilated during the forwarding to MSBuild. I will add additional test cases and fixes for this now. |
Actually this did fix parameters with spaces and quotes, and I was just comparing to the wrong collection in the tests. Updated and we should be good to go! |
An update to System.CommandLine changed the response file handling support to a different, more cross-platform-consistent logic. However, we cannot take this change because users expect a token-per-line style of processing. As a result, we change the dotnet CLI to use token-per-line handling for response files.
Description
There are two issues resolved here:
--property
option (/p
) that the .NET SDK didn't have handling for. This was resolved by adding in handling for all unhandled forms of this property.Fixes #26026.
Customer Impact
Customers that relied on the old response-file behavior typically ran into it in one of two scenarios - the first is related to an internal Brotli compression tool, the workaround here is to publish your application in a directory that contains no spaces. The second involved response files with the
/p
flag - the workaround here is to modify the response file to convert/p
into one of the recognized forms (-p
,--p
,-property
).Regression?
Risk
The change touches response file handling, which can be very broadly used. It does however have testing and reimplements prior behavior.
Verification
Manually tested the provided user scenarios, and also added automated testing around the parsing changes.
Packaging changes reviewed?