dotnet / dotnet/project-system

Make sure ProjectFileWithInterception storage provider has a functional project instance model provider

Open
#4,329 1 comment 0 reactions 0 assignees View on GitHub
good-first-issue Triage-Approved
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

CPS had made changes to retrieve project property values from project instance snapshot, instead of reading the project inside a read lock, if we have a functional storage provider of the property. Preventing using a project lock allows the code to run in any thread (including the UI thread), so it has less chance to run into project lock contentions, and less likely to be affected by thread pool exhaustion problems too. Internal property storage providers have been updated to support that. But the storage provider "ProjectFileWithInterception" doesn't support this, so properties backed by this provider don't get this performance benefit.

To address that, we need make sure the instance provider actually works correctly and returns the same value as the provider works with the project model. (The current implementation didn't do that correctly, some conversions are done in one provider but not the other one).

After that, set this metadata to the provider, which tells CPS that it can switch to the project instance model:
[ExportMetadata(ExportContractNames.ProjectPropertyProviders.Metadata.HasEquivalentProjectInstancePropertiesProvider, true)]

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.