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

Fix CodeLens data point invalidation #47138

Merged
merged 3 commits into from
Aug 28, 2020

Conversation

sharwell
Copy link
Member

@sharwell sharwell commented Aug 26, 2020

No description provided.

@sharwell sharwell requested a review from a team as a code owner August 26, 2020 05:43
@sharwell sharwell marked this pull request as draft August 26, 2020 05:43
{
var documentId = document.Id;
return new List<Guid>(2) { documentId.ProjectId.Id, documentId.Id };
var projectVersion = await project.GetDependentVersionAsync(cancellationToken).ConfigureAwait(false);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❔ How expensive is GetDependentVersionsAsync?

  1. Do we need to implement a WorkspaceChanged throttle here, or just make the calls to get the version?
  2. Do we need to add an argument to only get the versions for projects we currently have data points for?

@sharwell sharwell marked this pull request as ready for review August 26, 2020 18:06
{
lock (_dataPoints)
{
if (_dataPoints.TryGetValue(dataPoint.Descriptor.ProjectGuid, out var points)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When do we expect _dataPoints.TryGetValue or the Remove(dataPoint) to return false here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not expect that.

Copy link
Contributor

@ryzngard ryzngard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sharwell sharwell merged commit d704f09 into dotnet:master Aug 28, 2020
@ghost ghost added this to the Next milestone Aug 28, 2020
@sharwell sharwell deleted the codelens-invalidate branch August 28, 2020 19:54
@allisonchou allisonchou modified the milestones: Next, 16.8.P3 Aug 31, 2020
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.

4 participants