Skip to content

Fix OOP crash issue with copilot change analysis #78931

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

Merged
merged 3 commits into from
Jun 12, 2025

Conversation

CyrusNajmabadi
Copy link
Member

No description provided.

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner June 12, 2025 04:22
/// <summary>
/// Create a new solution where the declaration of the destination symbol has an additional event of the same signature as the specified event symbol.
/// Returns the document in the new solution where the destination symbol is declared.
/// </summary>
public static Task<Document> AddEventDeclarationAsync(CodeGenerationSolutionContext context, INamedTypeSymbol destination, IEventSymbol @event, CancellationToken cancellationToken)
=> GetCodeGenerationService(context.Solution.Workspace.Services, destination.Language).AddEventAsync(context, destination, @event, cancellationToken);
=> GetCodeGenerationService(context.Solution.Services, destination.Language).AddEventAsync(context, destination, @event, 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.

oop restricts access to Workspace. We do not need this here. So this fixes features that use the code-gen service to not crash in OOP.

@CyrusNajmabadi
Copy link
Member Author

@JoeRobich ptal.

@CyrusNajmabadi CyrusNajmabadi enabled auto-merge June 12, 2025 17:59
@CyrusNajmabadi CyrusNajmabadi merged commit 2f32bf8 into dotnet:main Jun 12, 2025
24 of 25 checks passed
@CyrusNajmabadi CyrusNajmabadi deleted the fixOopCrash branch June 12, 2025 18:55
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants