Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Change throwaway parameter to include out and add test - #10438

#10438
Merged
JanKrivanek merged 4 commits into
dotnet:maindotnet/msbuild:mainfrom
Forgind:fix-throwaway-parameterForgind/msbuild:fix-throwaway-parameterCopy head branch name to clipboard
Oct 9, 2024
Merged

Change throwaway parameter to include out and add test#10438
JanKrivanek merged 4 commits into
dotnet:maindotnet/msbuild:mainfrom
Forgind:fix-throwaway-parameterForgind/msbuild:fix-throwaway-parameterCopy head branch name to clipboard

Conversation

@Forgind

@Forgind Forgind commented Jul 23, 2024

Copy link
Copy Markdown
Contributor

Fixes #10435

Context

#10209 was generous with what it interpreted as a throwaway parameter: underscores were often misinterpreted as throwaway parameters. This changes it to require out _ instead of just _, which should resolve the problem.

Changes Made

Look for out _ instead of just _

Testing

Created a new unit test to distinguish between _ and out _

Notes

Alternative to #10435

I searched github for all instances of out _ in .props, .targets, and .*proj files and found none that seemed problematic, giving me some confidence in this change. I also looked for instances of _ in .targets files and found plenty of examples that were broken with #10209, indicating that that search would've prevented this problem.

@rainersigwald, leaving this as a draft until you've had a chance to try to think of potential problems with this approach. I was satisfied with my github search.

@Forgind
Forgind marked this pull request as ready for review August 15, 2024 22:01
@Forgind
Forgind force-pushed the fix-throwaway-parameter branch from c14666e to 161f84d Compare August 15, 2024 23:08
@Forgind

Forgind commented Aug 15, 2024

Copy link
Copy Markdown
Contributor Author

@rainersigwald,

I haven't come up with any more ways that this is broken; have you?

@Forgind
Forgind force-pushed the fix-throwaway-parameter branch from 161f84d to 7316d1e Compare August 16, 2024 13:14
@Forgind
Forgind force-pushed the fix-throwaway-parameter branch from 7316d1e to d71daa9 Compare August 16, 2024 13:25
@rainersigwald rainersigwald added this to the VS 17.13 milestone Sep 11, 2024
@rainersigwald rainersigwald self-assigned this Sep 25, 2024

@JanKrivanek JanKrivanek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good!

I have 1 suggestion for slight improvement - but not a must have.

Comment thread src/Build/Evaluation/Expander.cs
Comment thread src/Build/Evaluation/Expander.cs
Comment thread src/Build/Evaluation/Expander.cs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Property functions with a single _ as an argument return bad results

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.