Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce bulk extension installation event #128114

Closed
sandy081 opened this issue Jul 7, 2021 · 2 comments
Closed

Introduce bulk extension installation event #128114

sandy081 opened this issue Jul 7, 2021 · 2 comments
Assignees
Labels
extensions Issues concerning extensions feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan
Milestone

Comments

@sandy081
Copy link
Member

sandy081 commented Jul 7, 2021

Some extensions like Python, Pylance wanted to be treated a single activation unit even though they are separate extensions. Currently we treat every extension as single unit. To support this, we would need to introduce bulk extension installation and enable them together.

CC: @alexdima

@sandy081 sandy081 added feature-request Request for new features or functionality extensions Issues concerning extensions labels Jul 7, 2021
@sandy081 sandy081 added this to the Backlog milestone Jul 7, 2021
@sandy081 sandy081 self-assigned this Jul 7, 2021
@jakebailey
Copy link
Member

For reference, #118442 is related in that the original idea we were hoping for was optional dependencies, such that Python could "depend on" Pylance in the traditional sense, but that it could be uninstalled later without repercussions. The extension pack method is an in-between solutions, but that did lead to oddities like #128088 as it doesn't impact activation order or "waiting" for deps.

To restate our intentions here:

  • Pylance depends on Python, but only from the point of view that the Pylance extension itself doesn't do anything without the Python extension. It does not require the Python extension to activate before it, just be present, so we mark it as a hard dep so that users searching for "Pylance" aren't wondering why it doesn't work.
    • We can drop this hard dep in favor of prompts or some backup client in the future.
  • Python optionally depends on Pylance, so we can use Pylance if it's there, and fall back to other options otherwise.
  • When installing the Python extension, Pylance is also installed, so it can be the default for new installs.
  • The Python extension is able to see that Pylance is installed during activation, so it can know it does not need to fall back on a different LS.
    • It would be best for Python to activate quickly, then get this info some time later, but the Python extension already can't tell that some extension is going to be installed in the near future.
  • Eventually, the Python extension will activate the Pylance extension to gain access to its API. This does not need to be during the actual activation chain, just sometime in the future.

@sandy081 sandy081 modified the milestones: Backlog, July 2021 Jul 8, 2021
@alexdima
Copy link
Member

alexdima commented Jul 9, 2021

@jakebailey IMHO, based on what you describe, Pylance should have simply been an integral part of Python and not a separate extension. That's what we do with virtually all other language extensions, they typically embed inside of them the language server(s) they use. User facing settings and commands can then be added to delete Pylance from disk or to stop using it if the user wishes to not accept the Pylance license.

So IMHO all of this could have been implemented as 1 setting or as 1 command with a much lower development cost and effort.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
extensions Issues concerning extensions feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-testplan
Projects
None yet
Development

No branches or pull requests

4 participants
@alexdima @jakebailey @sandy081 and others