Skip to content

Better handling of dependent extension's "enablement" #23

@marcdumais-work

Description

@marcdumais-work

This extension (vscode-trace-server) is a companion to extension eclipse-cdt.vscode-trace-extension (Trace Viewer for VSCode) and depends on it.

At activation, this extension obtains a reference to the trace viewer's exported API object, and uses it to provide helper functionality. This work well normally, but there may be a corner-case that we should handle better: if/when the Trace Viewer extension becomes disabled, we probably should not use its API object any more, and if/when it becomes enabled again, we should obtain a fresh API object and redo the activation steps.

One scenario where the above might happen (to be confirmed) is when the Trace Viewer extension is updated to a new version.

As a starting point, here is how it seems the built-in vscode.github extension monitors the "enablement" of vscode.git-base it depends-on, and "refreshes" its API object when needed:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions