Open
Description
opened on Dec 20, 2024
Inspired by #236537
I've found it a little confusing to find the right extension service to work with so here are some random notes on things that have tripped me up.
- There are many different services with "extension" in the name, and when I need to do something, it's hard to know where to start.
- Probably the most common ones are
IExtensionService
,IExtensionsWorkbenchService
,IExtensionManagementService
, and I don't fully understand the distinction
- Probably the most common ones are
- In the above issue, we used
IExtensionManagementService#getInstalled
to check whether the Copilot extension was installed. This seemed reasonable but it actually returns all local and remote extensions, whether enabled or disabled due to being in the wrong EH. And, it returns them the two sets in random order based on a race. I think this is a serious footgun.- And I think we've made the same mistake in other places. If I look at references to
getInstalled
I see a lot of usages. eg I get@ext:
completions in the settings editor for workspace extensions in a remote window that are only installed locally and not on the remote - I think
IExtensionsWorkbenchService#queryLocal
was the right thing to use but there's alsoIExtensionService#extensions
and I'm not sure what the difference is
- And I think we've made the same mistake in other places. If I look at references to
- There are two different types called
IExtension
at and - The name
queryLocal
andILocalExtension
were a little confusing now that "remote extensions" exist
Some things that might help could be some tsdoc on the services and methods that explain when to use them or what exactly they return. Or a .md doc file with a "guide to extensions services" that lays this stuff out.
Metadata
Assignees
Labels
No labels
Activity