Skip to content
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

Fix Property Parsing in Publish #28059

Conversation

nagilson
Copy link
Member

@nagilson nagilson commented Sep 20, 2022

Resolves #28022
Backport:
#28061 (please approve this too!)

Post-Moderm:

I intercepted the MSBuildPropertyParser code stack too many interface layers in, so for some edge cases, properties passed via /p and -p were not fully parsed as it wasn't running through the Options Forwarding code. The ones I had tested did get parsed but for example in the above case they weren't fully parsed. Also removes an erroneous comment from the code that was old and slipped in.

Risk:
Medium

Reason To Accept:
Fixes a bug which will cause erroneous errors inside of dotnet publish. The PublishRelease code will do an MSBuild evaluation with faulty properties which could have any number of side effects, but in general it would be unrelated to what actually gets published. Still, this is high impact and should be merged in.

Testing: [OK]
dotnet publish -p:PublishRelease=true -property Configuration=Debug
dotnet publish -p:PublishRelease=true -p Configuration=Debug
Also
dotnet publish -f net7.0
Also
dotnet publish with PublishRelease inside of a .csproj

@nagilson
Copy link
Member Author

Darwin pipeline failing due to infrastructure issues. Opening PR for review

@nagilson nagilson marked this pull request as ready for review September 20, 2022 23:26
@nagilson nagilson marked this pull request as draft September 21, 2022 19:07
@nagilson nagilson marked this pull request as ready for review September 21, 2022 19:14
Make parser static again instead of internal

Fix last remaining test

Squash me
@nagilson nagilson force-pushed the nagilson-PublishRelease-PropertyParsingPatch branch from 6284cb7 to df90a9f Compare September 21, 2022 19:47
@nagilson nagilson requested a review from dsplaisted September 21, 2022 19:52
@nagilson
Copy link
Member Author

Approved via email

Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
@nagilson nagilson requested a review from baronfel September 22, 2022 16:51
Copy link
Member

@baronfel baronfel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One note, but the rest of it looks completely reasonable to me.

Copy link
Member

@baronfel baronfel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for following up on that, let's merge this!

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

Successfully merging this pull request may close these issues.

5 participants