-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Cache diagnostic info based on project state not project. #77230
Cache diagnostic info based on project state not project. #77230
Conversation
@ToddGrun ptal |
// | ||
// Note: While ForceAnalyzeProjectAsync should always run with a larger set of analyzers than us | ||
// (since it runs all analyzers), we still run a paranoia check that the analyzers we care about are | ||
// a subset of that call so that we don't accidentally reuse results that would not correspond to | ||
// what we are computing ourselves. | ||
if (_projectToForceAnalysisData.TryGetValue(project, out var box) && | ||
var checksum = await project.GetDependentChecksumAsync(cancellationToken).ConfigureAwait(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, if TryGet fails, we need this data to compute and cache. If it succeed, we need it to compare with the cached value. So we always need it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.