Skip to content

Support for displaying 'engine' compatibility or filtering extensions by a specific Code OSS 'engine' value #1042

Open
@jthomasmock

Description

@jthomasmock

tldr:

For users who have to download extensions directly from the OpenVSX website to use them in offline/airgapped environments since their IDE cannot directly query OpenVSX API:

  1. I think it's worth exposing the minimum engine version on each extensions page
  2. It would be ideal to be able to filter the website and API for extensions based on a minimum engine version

Background

.vsix extensions have an engine value that determines the minimum version of the IDE that is required to be compatible with that particular extension.

This is returned in the raw JSON of an extension when requesting a specific version and is used by the IDE to install the appropriate version of an extension for the current IDE version.

# check IDE version
$ code --version
1.94.1

# from OpenVSX extension API JSON
 "engines": {
        "vscode": "^1.37.0"
    },

However, users in air-gapped or offline environments are not able to query OpenVSX directly from their IDE. They would need to go to OpenVSX in a separate browser, download an extension and attempt to install it in their Code OSS-based IDE. If it fails due to an engine mismatch, they would need to then go to the next version, and repeat the process until finding a compatible version.

More adventurous users might use the OpenVSX API to loop across the various versions and find a compatible version. For an example with the path-intellisense extension, with most of the extra JSON trimmed off, as seen if using an API request against: https://open-vsx.org/api/christian-kohler/path-intellisense/2.8.0

{
  "namespaceUrl": "https://open-vsx.org/api/christian-kohler",
  "name": "path-intellisense",
  "namespace": "christian-kohler",
  "targetPlatform": "universal",
  "version": "2.8.0",
...
  "unrelatedPublisher": false,
  "namespaceAccess": "restricted",
  "allVersions": {
    "latest": "https://open-vsx.org/api/christian-kohler/path-intellisense/latest",
    "2.8.0": "https://open-vsx.org/api/christian-kohler/path-intellisense/2.8.0",
    "2.7.0": "https://open-vsx.org/api/christian-kohler/path-intellisense/2.7.0",
...
  },
...
##### <--- Here is the engine version ---> ##### 
    "vscode": "^1.43.0"
  }

Friction points

This is useful information, but it requires querying the API many time per extension as the engine data is only exposed at each individual version rather than including it within some allVersion sub field. This is wasteful of OpenVSX resources as a request for even say 10 extensions might turn into 100 API calls (10 per extension) as it pages through the various calls to find a compatible engine version.

Additionally, users or administrators are required to make these requests via curl or equivalent as the website doesn't display the minimum engine version:

image

Suggestion

For users who have to download extensions to use them in offline/airgapped environments:

  1. I think it's worth exposing the minimum engine version on each extensions page
  2. It would be ideal to be able to filter the website and API for extensions based on a minimum engine version

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions