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

Remove dead goto-def/peek/ctrl-click EA impls for TS. TS is now entirely on LSP for these experiences. #71098

Merged
merged 7 commits into from
Dec 6, 2023

Conversation

CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Dec 5, 2023

@CyrusNajmabadi CyrusNajmabadi requested a review from a team as a code owner December 5, 2023 18:44
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Dec 5, 2023
@CyrusNajmabadi
Copy link
Member Author

@MariaSolOs FYI.

@CyrusNajmabadi CyrusNajmabadi changed the title Remove uncalled TS api Remove dead goto-def/peek/ctrl-click EA impls for TS. TS is now entirely on LSP for these experiences. Dec 5, 2023
@CyrusNajmabadi
Copy link
Member Author

@dibarbet

var service = document.GetRequiredLanguageService<INavigableItemsService>();
var service = document.GetLanguageService<INavigableItemsService>();
if (service is null)
return ImmutableArray<OmniSharpNavigableItem>.Empty;
Copy link
Member Author

Choose a reason for hiding this comment

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

just being paranoid. this is omnisharp. so presumably only for C#/VB. But i'm not taking chances.

Copy link
Member

Choose a reason for hiding this comment

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

Note even VB, just C#. But I'm ok with paranoia.

var service = document.GetRequiredLanguageService<INavigableItemsService>();
var service = document.GetLanguageService<INavigableItemsService>();
if (service is null)
return null;
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 is paranoid as our LSP server is only for languages that support this. But this just means we're not dependong that. And, for example, if xaml didn't support this, we'd be ok.

Copy link
Member

Choose a reason for hiding this comment

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

I kind of prefer throwing actually. It isn't expected that we would generally hit this, and if we do we'll get errors that tell us what is going wrong. It won't take down the LSP server or anything.

var service = document.GetRequiredLanguageService<INavigableItemsService>();
var service = document.GetLanguageService<INavigableItemsService>();
if (service is null)
return null;
Copy link
Member

Choose a reason for hiding this comment

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

I kind of prefer throwing actually. It isn't expected that we would generally hit this, and if we do we'll get errors that tell us what is going wrong. It won't take down the LSP server or anything.

@CyrusNajmabadi CyrusNajmabadi merged commit 85b7e0b into dotnet:main Dec 6, 2023
24 checks passed
@ghost ghost added this to the Next milestone Dec 6, 2023
@CyrusNajmabadi CyrusNajmabadi deleted the removeTSAPI branch December 8, 2023 17:22
@Cosifne Cosifne modified the milestones: Next, 17.9 P3 Jan 9, 2024
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