-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Store and display the times when files were generated. #72724
Conversation
@@ -325,7 +333,8 @@ private partial class CompilationTracker : ICompilationTracker | |||
generatedSource.SyntaxTree.Options, | |||
ProjectState.LanguageServices, | |||
// Compute the checksum on demand from the given source text. | |||
originalSourceTextChecksum: null)); | |||
originalSourceTextChecksum: null, | |||
generationDateTime)); |
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.
these are the places in the system where the generation actually happens, and so we record the time it happened as well. From this point on, this just flows outwards to be read and stored and eventually shown in the UI.
@genlu ptal. |
Oh man, do we have the ability to put a "re-run now" button in that? |
...s/Core/Portable/Workspace/Solution/SolutionCompilationState.CompilationTracker_Generators.cs
Show resolved
Hide resolved
We can def do that. I'll do it in the PR where we add 'balanced' mode. |
@dibarbet ptal |
@@ -281,6 +283,9 @@ private partial class CompilationTracker : ICompilationTracker | |||
} | |||
|
|||
using var generatedDocumentsBuilder = TemporaryArray<SourceGeneratedDocumentState>.Empty; | |||
|
|||
// Capture the date now. We want all the generated files to use this date consistently. | |||
var generationDateTime = DateTime.Now; |
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.
will update in followup.
@jasonmalinowski For review when you get back. |
Looks like:
This will be useful as we allow users to move to a model where generators don't run automatically, letting them when the generator was last run.