Skip to content
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

Investigate structures possibly dependent on order of data in Dictionaries #8937

Open
JanKrivanek opened this issue Jun 22, 2023 · 0 comments
Labels
initial-investigation Perform initial investigation, apply untriaged label when done. triaged

Comments

@JanKrivanek
Copy link
Member

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 (#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.

@JanKrivanek JanKrivanek added the initial-investigation Perform initial investigation, apply untriaged label when done. label Jun 22, 2023
@AR-May AR-May added the triaged label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
initial-investigation Perform initial investigation, apply untriaged label when done. triaged
Projects
None yet
Development

No branches or pull requests

2 participants