Skip to content
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

Update registerRelatedFilesProvider API #7622

Merged
merged 2 commits into from
Oct 3, 2024
Merged

Conversation

genlu
Copy link
Member

@genlu genlu commented Oct 2, 2024

Which was changed recently in an internal repo (this and this)

FYI @sandersn

@genlu genlu requested a review from a team as a code owner October 2, 2024 23:57
@genlu genlu changed the title Add new context object to registerRelatedFilesProvider Update registerRelatedFilesProvider API Oct 3, 2024
@genlu genlu requested a review from dibarbet October 3, 2024 00:34
@@ -55,7 +63,7 @@ export function registerCopilotExtension(languageServer: RoslynLanguageServer, c
languageId: 'csharp',
};

relatedAPI.registerRelatedFilesProvider(id, async (uri, token) => {
relatedAPI.registerRelatedFilesProvider(id, async (uri, _, token) => {
Copy link
Member

@dibarbet dibarbet Oct 3, 2024

Choose a reason for hiding this comment

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

Just want to confirm that we don't have issues with either

  1. An older copilot version calling into this. I would guess that it would pass in only two parameters, and the second (discarded) would actually be the cancellation token.
  2. A new copilot extension calling into an old C# version - where it would pass 3 parameters where we only are expecting two.

If the mismatch is being resolved elsewhere that is fine, but want to make sure.

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 tested both scenarios, they would at least return related files w/o error/crashing. Given that copilot releases at a fast cadence (once every couple of days) and the experiment would last until next C# extension stable release (in the experiment we would control which versions of C# extension to be part of it), I'm not very concerned about mismatch.

@genlu genlu merged commit cfb38c8 into dotnet:main Oct 3, 2024
16 checks passed
@genlu genlu deleted the AddContext branch October 3, 2024 18:23
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.

2 participants