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

Change how creation dates are specified in the SG api #72794

Merged
merged 3 commits into from
Mar 29, 2024

Conversation

CyrusNajmabadi
Copy link
Member

Extracted from #72494

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner March 28, 2024 23:23
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Mar 28, 2024
Checksum solutionChecksum, ProjectId projectId, CancellationToken cancellationToken);

/// <summary>
/// Given a particular set of generated document ids, returns the fully generated content for those documents.
/// Should only be called by the host for documents it does not know about, or documents whose checksum contents are
/// different than the last time the document was queried.
/// </summary>
ValueTask<ImmutableArray<(string contents, DateTime generationDateTime)>> GetContentsAsync(
ValueTask<ImmutableArray<string>> GetContentsAsync(
Copy link
Member Author

Choose a reason for hiding this comment

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

this value moved from the content request (which is really just about getting the excat content for a checksum) to the above call to get info about a generated file. THat's not only better, it's more correct as we can def be in a situation where we say "we generated the same contents in OOP as last time, but the generation timestamps were incremented".

this.SourceText,
this.LoadTextOptions,
this.TreeSource!,
this._lazyContentHash,
generationDateTime);
Copy link
Member Author

Choose a reason for hiding this comment

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

previously, updating the generation-time would cause the doc to be reparsed. there's no need for that at all.

Copy link
Contributor

@ToddGrun ToddGrun left a comment

Choose a reason for hiding this comment

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

:shipit:

@CyrusNajmabadi CyrusNajmabadi merged commit 68421f5 into dotnet:main Mar 29, 2024
27 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Mar 29, 2024
@CyrusNajmabadi CyrusNajmabadi deleted the sgAPI branch March 29, 2024 01:32
@CyrusNajmabadi
Copy link
Member Author

@jasonmalinowski For review when you get back.

@dibarbet dibarbet modified the milestones: Next, 17.11 P1 Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants