fix regression in --property forwarding with an invalid argument#43004
Conversation
| [InlineData(new string[] { "-p:prop1=true;prop2=false" }, new string[] { "--property:prop1=true", "--property:prop2=false" })] | ||
| [InlineData(new string[] { "-p", "MyProject.csproj", "-p:prop1=true" }, new string[] { "--property:prop1=true" })] | ||
| // The longhand --property option should never be treated as a project | ||
| [InlineData(new string[] { "--property", "MyProject.csproj", "-p:prop1=true" }, new string[] { "--property:MyProject.csproj", "--property:prop1=true" })] |
There was a problem hiding this comment.
Maybe this test could be moved so that this is a different failure, like "you said --property but didn't specify one"?
|
@baronfel - Getting this ported to 9.0 is a necessity. It's a blocker for source build for RC1. |
|
Understood. As you can see I've been struggling with the CI system today - trying to get that cleared up ASAP. |
|
Correction to my earlier post: this is not blocking RC1. |
|
/backport to release/9.0.1xx |
|
Started backporting to release/9.0.1xx: https://github.com/dotnet/sdk/actions/runs/10567064081 |
|
@baronfel backporting to release/9.0.1xx failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: fix regression in --property forwarding with an invalid argument
Using index info to reconstruct a base tree...
M src/Cli/dotnet/OptionForwardingExtensions.cs
M test/dotnet.Tests/dotnet-msbuild/GivenDotnetRunInvocation.cs
Falling back to patching base and 3-way merge...
Auto-merging test/dotnet.Tests/dotnet-msbuild/GivenDotnetRunInvocation.cs
CONFLICT (content): Merge conflict in test/dotnet.Tests/dotnet-msbuild/GivenDotnetRunInvocation.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 fix regression in --property forwarding with an invalid argument
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
|
@baronfel an error occurred while backporting to release/9.0.1xx, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
|
Since the backport failed I cherry-picked the fix onto the existing backport pr for the dotnet run enhancements: #42987 As a result we'll never be in the bad state in the RC2 branch, hopefully. |
Fix a regression introduced in #42240 that caused dotnet/source-build#4579.
The test scenario is no longer relevant now that we are actually doing
--propertyflag parsing in the CLI instead of delegating to MSBuild, so it's safe to remove it and rollback the changes to--propertyvalue forwarding that this specific test imposed on us in the first place.