Fix Clear and Remove after Sort in TreeView#10377
Conversation
d5dcd7c to
23499f7
Compare
JeremyKuhne
left a comment
There was a problem hiding this comment.
Thanks, @gpetrou. I've added comments.
I'm thinking about whether or not we should put back the original logic. There is some risk that it will change behavior with nodes that are equivalent.
In general, one has to be extremely careful with messing with sort algorithms or hashes.
|
@gpetrou It would be good to make sure we have tests that exercise the Whatever we do here will be in the February update (the next update is already locked) so we've got some time to make sure we've got good test coverage. |
|
@gpetrou we discussed this further as a team and we want to put back the original sorting logic to avoid any further regressions around visibility of index changes during sorting and sorting behavior with equivalent nodes. Are you ok with doing this? |
a49f507 to
595ae73
Compare
JeremyKuhne
left a comment
There was a problem hiding this comment.
One more nit. Are you up for adding index validation tests?
595ae73 to
5624a7e
Compare
|
/backport to release/8.0 |
|
Started backporting to release/8.0: https://github.com/dotnet/winforms/actions/runs/7038495410 |
|
@lonitra backporting to release/8.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Fix Clear and Remove after Sort in TreeView
Using index info to reconstruct a base tree...
A src/System.Windows.Forms/src/System/Windows/Forms/Controls/TreeView/TreeNode.cs
M src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/TreeViewTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/TreeViewTests.cs
Auto-merging src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.cs
CONFLICT (content): Merge conflict in src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fix Clear and Remove after Sort in TreeView
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
Fixes #10376
Proposed changes
Microsoft Reviewers: Open in CodeFlow