Giter VIP home page Giter VIP logo

Comments (6)

weinand avatar weinand commented on May 19, 2024

/cc @egamma

from vscode-node-debug.

egamma avatar egamma commented on May 19, 2024

The extensions API https://code.visualstudio.com/docs/extensionAPI/vscode-api#_extensions provides reflective methods to find and activate extensions. We have never done this, but you could use this API to implement a backward compatible way to deal with the dependencies.

In your extension's activate method you can find which extensions are installed vscode.extensions.getExtension(). An extension's is API isActive and activate to install an extension manually.

from vscode-node-debug.

egamma avatar egamma commented on May 19, 2024

/cc @alexandrudima to confirm the proposal.

from vscode-node-debug.

weinand avatar weinand commented on May 19, 2024

@MSLaguana please let me know if this proposal doesn't work for you.

from vscode-node-debug.

alexdima avatar alexdima commented on May 19, 2024

What @egamma suggests might work in this case:

  • change your package.json to not have extensionDependencies anymore.
  • this means that your extension will get loaded and activated independently of node-debug.
  • you can, in your activate method use the extensions namespace to reflect and find if node-debug is installed (under the old publisher or the new publisher, at what version, etc.).
  • proceed or show error message, etc.

from vscode-node-debug.

MSLaguana avatar MSLaguana commented on May 19, 2024

We do currently use the vscode.extensions api to find the path of the node-debug extension so we can wrap around it in our debug adapter, so I believe that this approach should work for us. I'm a little concerned that we'd be losing some futureproofing by removing the extensionDependencies though, since if we had not specified that in the first place we would have been unaware of this failure until runtime, rather than finding out immediately on installation that there was an issue. Still, it seems that this will be the best approach for us. Thanks,

from vscode-node-debug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.