Skip to content

Conversation

@CyrusNajmabadi
Copy link
Member

No description provided.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner February 16, 2024 16:38
@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 16, 2024
using System.Threading.Tasks;

namespace Microsoft.CodeAnalysis
namespace Microsoft.CodeAnalysis;
Copy link
Member Author

Choose a reason for hiding this comment

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

view with whitespace off.

/// </summary>
private abstract partial class CompilationAndGeneratorDriverTranslationAction
{
public abstract Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken);
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 far preferred subclasses having to be intentional about what they should do here. i already did something similar for CanUpdateCompilationWithStaleGeneratedTreesIfGeneratorsGiveSameOutput previously.

Copy link
Member Author

Choose a reason for hiding this comment

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

now, the only non-abstract method is TryMergeWithPrior. And that one is fine to stay virtual as it's only used as a perf optimization, not a correctness one.

…ationState.CompilationAndGeneratorDriverTranslationAction_Actions.cs
// compilation with stale trees around, answering true is still important.
public override bool CanUpdateCompilationWithStaleGeneratedTreesIfGeneratorsGiveSameOutput => true;

public override Task<Compilation> TransformCompilationAsync(Compilation oldCompilation, CancellationToken cancellationToken)
Copy link
Member Author

Choose a reason for hiding this comment

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

for cases where there was an existing comment explaining things, i didn't comment.

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 843c364 into dotnet:main Feb 16, 2024
@ghost ghost added this to the Next milestone Feb 16, 2024
@CyrusNajmabadi CyrusNajmabadi deleted the removeAbstract branch February 16, 2024 18:29
Copy link
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.

Looks good too.

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.

4 participants