-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[automated] Merge branch 'vs17.6' => 'main' #8654
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
[automated] Merge branch 'vs17.6' => 'main' #8654
Conversation
The return value of `ITaskItem.CloneCustomMetadata` is an `IDictionary`, which is generally (in modern MSBuild) backed by a `Dictionary<string, string>`, but can be (when given an item from a net35 taskhost) a `Hashtable`. In the latter situation, casting entries to `KeyValuePair<,>` fails, because they conform only to `DictionaryEntry`. Use that less-well-typed approach--the casts were present in the pre- bulk-edit version of the code. Fixes dotnet#8645.
4c9e8aa
to
8ffc3fe
Compare
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.
Putting a block on this because .NET Tactics asked for a regression test in main
, which I'll work on.
f4f00a2
to
892ec22
Compare
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.
Looks good!
Add a test task with properties like the failing WiX tasks to prevent regressions of dotnet#8645.
892ec22
to
a478b9d
Compare
|
||
public IDictionary CloneCustomMetadata() | ||
{ | ||
Hashtable t = new(); |
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.
This is the important part, right? That it's a Hashtable and not a Dictionary<string, string>?
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.
Correct. I considered writing an even-more-malicious IDictionary
implementation but it seemed like overkill.
return t; | ||
} | ||
public void CopyMetadataTo(ITaskItem destinationItem) => throw new NotImplementedException(); | ||
public string GetMetadata(string metadataName) => "value"; |
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.
This probably shouldn't be my focus, since this is a test, but it bothers me a little that this will return "value" for undefined metadata. It's fine if you want to leave it, but I'd slightly prefer a check for "key" (and updating the test above accordingly)
I detected changes in the vs17.6 branch which have not been merged yet to main. I'm a robot and am configured to help you automatically keep main up to date, so I've opened this PR.
This PR merges commits made on vs17.6 by the following committers:
Instructions for merging from UI
This PR will not be auto-merged. When pull request checks pass, complete this PR by creating a merge commit, not a squash or rebase commit.
If this repo does not allow creating merge commits from the GitHub UI, use command line instructions.
Instructions for merging via command line
Run these commands to merge this pull request from the command line.
or if you are using SSH
After PR checks are complete push the branch
Instructions for resolving conflicts
Instructions for updating this pull request
Contributors to this repo have permission update this pull request by pushing to the branch 'merge/vs17.6-to-main'. This can be done to resolve conflicts or make other changes to this pull request before it is merged.
or if you are using SSH
Contact .NET Core Engineering if you have questions or issues.
Also, if this PR was generated incorrectly, help us fix it. See https://github.com/dotnet/arcade/blob/master/scripts/GitHubMergeBranches.ps1.