eclipse-cdt-cloud / eclipse-cdt-cloud/vscode-trace-server

Better handling of dependent extension's "enablement"

Open
#23 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
0
Forks
6
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/eclipse-cdt-cloud/vscode-trace-server/assets/25749063/a6d1bea9-0470-4ce2-b8e9-1773cb34a39a)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.