Skip to content

Merge all source generator state in CompilationTracker into a helper type.#56229

Merged
CyrusNajmabadi merged 25 commits intodotnet:mainfrom
CyrusNajmabadi:trackerGenerator
Sep 9, 2021
Merged

Merge all source generator state in CompilationTracker into a helper type.#56229
CyrusNajmabadi merged 25 commits intodotnet:mainfrom
CyrusNajmabadi:trackerGenerator

Conversation

@CyrusNajmabadi
Copy link
Copy Markdown
Contributor

Followup to #56139

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner September 7, 2021 22:19
@ghost ghost added the Area-IDE label Sep 7, 2021
Copy link
Copy Markdown
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

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

:shipit:

Comment on lines +52 to +56
public CompilationTrackerGeneratorInfo WithDocumentsAreFinal(bool documentsAreFinal)
=> DocumentsAreFinal == documentsAreFinal ? this : new(Documents, Driver, documentsAreFinal);

public CompilationTrackerGeneratorInfo WithDriver(GeneratorDriver? driver)
=> Driver == driver ? this : new(Documents, driver, DocumentsAreFinal);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Make this a record so we don't have to write these?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

records don't operate this way :) they always produce a new instance

@CyrusNajmabadi CyrusNajmabadi merged commit 897c0d1 into dotnet:main Sep 9, 2021
@ghost ghost added this to the Next milestone Sep 9, 2021
@CyrusNajmabadi CyrusNajmabadi deleted the trackerGenerator branch September 9, 2021 00:43
@Cosifne Cosifne modified the milestones: Next, 17.0.P5 Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants