Skip to content

Fix TaskRegistry mutability#9032

Merged
JanKrivanek merged 2 commits intodotnet:mainfrom
JanKrivanek:proto/TaskRegistryMutability
Jul 14, 2023
Merged

Fix TaskRegistry mutability#9032
JanKrivanek merged 2 commits intodotnet:mainfrom
JanKrivanek:proto/TaskRegistryMutability

Conversation

@JanKrivanek
Copy link
Copy Markdown
Member

Fixes ADO#1801351 and ADO#1801341

Reuses chunk of changes from #8861

Context

TaskRegistry should be logically immutable after initialization and sharing is possible and ok, but there can be actual writes on first access which needs to be made thread safe

Changes Made

  • Clarified some confusing comments
  • Simplified TaskRegistry contract to allow only single shot initialization after which TaskRegistry is logically immutable
  • ProjectImportPathMatch and ToolSet adjustment to better express immutability

Testing

Existing unit tests

Comment thread src/Build/Instance/TaskRegistry.cs Outdated
@JanKrivanek JanKrivanek force-pushed the proto/TaskRegistryMutability branch from 7825043 to 50eebae Compare July 13, 2023 16:24
Comment thread src/Build/Instance/TaskRegistry.cs Outdated
Comment thread src/Build/Instance/TaskRegistry.cs Outdated
@JanKrivanek JanKrivanek merged commit 9fde70b into dotnet:main Jul 14, 2023
@JanKrivanek JanKrivanek deleted the proto/TaskRegistryMutability branch July 14, 2023 14:02
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.

3 participants