Skip to content

Port inline completion to cohosting#11277

Merged
davidwengier merged 9 commits intodotnet:mainfrom
davidwengier:CohostInlineCompletion
Dec 16, 2024
Merged

Port inline completion to cohosting#11277
davidwengier merged 9 commits intodotnet:mainfrom
davidwengier:CohostInlineCompletion

Conversation

@davidwengier
Copy link
Member

Fixes #10744
Needs dotnet/roslyn#76293 to merge and a version bump, but you know the idea by now I'm sure.

Pretty straight forward. The test snippet file was copied directly from Roslyns own inline completion tests. Turns out our existing inline completion has zero tests, and was inadvertently turned off in the first cohosting completion PR 🤦‍♂️

@davidwengier davidwengier requested a review from a team as a code owner December 6, 2024 04:03
<_RoslynDiagnosticAnalyzersPackageVersion>3.11.0-beta1.24508.2</_RoslynDiagnosticAnalyzersPackageVersion>
<_MicrosoftVisualStudioLanguageServicesPackageVersion>$(MicrosoftVisualStudioLanguageServicesPackageVersion)</_MicrosoftVisualStudioLanguageServicesPackageVersion>
<_XunitPackageVersion>2.6.6</_XunitPackageVersion>
<_XunitPackageVersion>2.9.2</_XunitPackageVersion>
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 will be needed once we get the Roslyn bump, but you'll just have to trust me for now


internal static class SnippetFormatter
{
public static bool TryGetSnippetWithAdjustedIndentation(FormattingContext formattingContext, string snippetText, int hostDocumentIndex, [NotNullWhen(true)] out string? newSnippetText)
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 was moved from InlineCompletionEndpoint with no changes, other than making it public.

@davidwengier davidwengier requested a review from a team as a code owner December 12, 2024 00:07
@davidwengier
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@davidwengier
Copy link
Member Author

Tests are failing because logging is happening after a test has finished, which usually means something isn't being disposed properly, but none of the test changes in this PR could cause it, because its happening on macOS and linux, and the test changes here are Windows only. Must be a change in Roslyn :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port InlineCompletion endpoint to cohosting

4 participants