Skip to content

Add logic for VS code to promote other VS code extensions  #4705

@kenzieschmoll

Description

@kenzieschmoll

As part of the broader effort to support dart ecosystem extensions, we've designed a mechanism for a pub package to provide extension information as part of its package. For DevTools, this is the precompiled flutter web app that DevTools will embed. For VS Code extensions, the pub package can include a config.yaml file that tells the Dart-Code promotion which extension should be promoted:

my_package/
   lib/
      ...
   extension/
      vs_code/
          # contains meta data that VS code needs to point to another
          # extension on the VS code marketplace
         config.yaml

package:extension_discovery has logic to detect available extensions for a given .dart_tool/package_config.json file. Since this package is written in Dart, it cannot be used by the Dart-Code extension directly, so it will need to be called into from the Dart-Code extension by proxy of some other Dart service. Eventually, this would be a great fit for the Dart Tooling Daemon, but since this does not exist yet, we can use the DevTools server in the interim.

We can add an API to DevTools server that the Dart-Code extension can call, and the devtools_server will call findExtensions('vs_code', <path/to/package_config.json>) from package:extension_discovery on the Dart-Code extension's behalf.

Open Question
The element we still need to figure out is how to handle a monorepo workspace, where there are multiple package_config.json files available.

Related: Flutter DevTools Extensions

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions