Investigate structures possibly dependent on order of data in Dictionaries
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 133
Description
cc @rokonec (who pointed this out)
### Context
`TaskRegistry` was found to be dependent on the order of items in one of it's backing dictionary field (https://github.com/dotnet/msbuild/pull/8861)
There are existing unit tests that test for exact equality of dictionaries (including order of data): https://github.com/dotnet/msbuild/blob/main/src/Shared/UnitTests/ObjectModelHelpers.cs#L1262. This shows a possibility that other internal structures/algos might be dependent on the implicit order.
### Suggestion
These tests should be updated to test without reliance on order (btw. FluentAssertions should replace need for custom method https://fluentassertions.com/dictionaries/).
However before removing the order assertion - all the tested structures should be inspected, if there is not any code that depends on the implicit ordering of dictionary.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.