vscode: Duplicated decoration ids

related to https://github.com/microsoft/vscode/issues/117769

We have places that create a service decorator, via createDecorator, for an identifier that has been used already. The problem with that is the the id is the actual identifier, not the object instance. This enables potential for service conflicts, esp. when different interfaces use the same name. Conflict I have found

  • themeService defined here and here, different interface is used
  • configurationService defined here and here
  • layoutService defined here and here
  • nativeEnvironmentService defined here, here, and here
  • environmentService defined here and here
  • extensionManagementService defined here and here

@bpasero start with you because it seems to be a pattern that you have been using, e.g have XYZService which is redefined as IWorkbenchXYZService. This needs explanation but seems fishy, e.g the first service interface should already be exhaustive and not rely on an extension that comes from the side

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (15 by maintainers)

Commits related to this issue

Most upvoted comments

Yeah, I think it make sense. Latest is when you start using registerSingleton

Yes, refineServiceIdentifier makes sense, it’s like the createDecorator variant that I suggested