Skip to content

Delete unnecessary GetServiceAsync calls#79396

Merged
jasonmalinowski merged 1 commit intodotnet:mainfrom
jasonmalinowski:delete-unnecessary-getserviceasync-calls
Jul 16, 2025
Merged

Delete unnecessary GetServiceAsync calls#79396
jasonmalinowski merged 1 commit intodotnet:mainfrom
jasonmalinowski:delete-unnecessary-getserviceasync-calls

Conversation

@jasonmalinowski
Copy link
Member

It's not entirely clear to me why these were added; the intent may have been to create them asynchronously before we had a later GetService() call, but these services are likely to be created when we're loaded (like IVsShell), so these won't do anything. Some of the other ones we've now all moved to GetServiceAsync() at the actual use sites so there's no reason to have that either.

Closes #29598

It's not entirely clear to me why these were added; the intent may have
been to create them asynchronously before we had a later GetService()
call, but these services are likely to be created when we're loaded
(like IVsShell), so these won't do anything. Some of the other ones
we've now all moved to GetServiceAsync() at the actual use sites so
there's no reason to have that either.

Closes dotnet#29598
@jasonmalinowski jasonmalinowski self-assigned this Jul 15, 2025
@jasonmalinowski jasonmalinowski requested a review from a team as a code owner July 15, 2025 00:56
@jasonmalinowski jasonmalinowski disabled auto-merge July 16, 2025 18:34
@dotnet dotnet deleted a comment from azure-pipelines bot Jul 16, 2025
@dotnet dotnet deleted a comment from dibarbet Jul 16, 2025
@jasonmalinowski jasonmalinowski merged commit 6c67a00 into dotnet:main Jul 16, 2025
25 of 26 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jul 16, 2025
@RikkiGibson RikkiGibson modified the milestones: Next, 18.0 P1 Aug 19, 2025
@jasonmalinowski jasonmalinowski deleted the delete-unnecessary-getserviceasync-calls branch September 23, 2025 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not hardcode depended services during initialization

3 participants