Skip to content

[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

Merged
merged 3 commits into from
Apr 12, 2023

Conversation

dotnet-maestro-bot
Copy link
Contributor

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.

merge button instructions

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.

git fetch
git checkout vs17.6
git pull --ff-only
git checkout main
git pull --ff-only
git merge --no-ff vs17.6

# If there are merge conflicts, resolve them and then run git merge --continue to complete the merge
# Pushing the changes to the PR branch will re-trigger PR validation.
git push https://github.com/dotnet-maestro-bot/msbuild HEAD:merge/vs17.6-to-main
or if you are using SSH
git push [email protected]:dotnet-maestro-bot/msbuild HEAD:merge/vs17.6-to-main

After PR checks are complete push the branch

git push

Instructions for resolving conflicts

⚠️ If there are merge conflicts, you will need to resolve them manually before merging. You can do this using GitHub or using the command line.

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.

git checkout -b merge/vs17.6-to-main main
git pull https://github.com/dotnet-maestro-bot/msbuild merge/vs17.6-to-main
(make changes)
git commit -m "Updated PR with my changes"
git push https://github.com/dotnet-maestro-bot/msbuild HEAD:merge/vs17.6-to-main
or if you are using SSH
git checkout -b merge/vs17.6-to-main main
git pull [email protected]:dotnet-maestro-bot/msbuild merge/vs17.6-to-main
(make changes)
git commit -m "Updated PR with my changes"
git push [email protected]:dotnet-maestro-bot/msbuild HEAD:merge/vs17.6-to-main

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.

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.
Copy link
Member

@rainersigwald rainersigwald left a 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.

@rainersigwald rainersigwald force-pushed the merge/vs17.6-to-main branch 2 times, most recently from f4f00a2 to 892ec22 Compare April 11, 2023 21:39
@rainersigwald rainersigwald linked an issue Apr 12, 2023 that may be closed by this pull request
Copy link
Member

@JanKrivanek JanKrivanek left a 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.

public IDictionary CloneCustomMetadata()
{
Hashtable t = new();
Copy link
Contributor

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>?

Copy link
Member

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";
Copy link
Contributor

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)

@rainersigwald rainersigwald merged commit a478b9d into dotnet:main Apr 12, 2023
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.

Unable to build WiX3 projects
4 participants