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

Remote extension will not work if it depends on a local UI one #128375

Closed
tgodzik opened this issue Jul 10, 2021 · 4 comments
Closed

Remote extension will not work if it depends on a local UI one #128375

tgodzik opened this issue Jul 10, 2021 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release extensions Issues concerning extensions verified Verification succeeded

Comments

@tgodzik
Copy link

tgodzik commented Jul 10, 2021

Does this issue occur when all extensions are disabled?: No

  • VS Code Version: 1.58.0
  • OS Version: Windows + WSL2

Steps to Reproduce:

  1. Install Metals extension.
  2. Open a WSL workspace
  3. Metals will be disabled because Scala syntax extension is disabled.

It seems that if we have a remote extension and it depends on one declared as UI, VS Code will now make it disabled.
This basically, makes declaring extensionKind useless, since only workspace without it will work currently.

Any chance it can be fixed, or should we just make PR to remove extensionKind from the Scala syntax extension?

Based on discussion in #127067

@aeschli
Copy link
Contributor

aeschli commented Jul 12, 2021

Yes, you can't have a (runtime) dependency from a workspace to a UI extension.

I assume you added the dependency so that when installing Metal, the user also gets scala-lang.scala.
For that you better use "extensionPack": [ "scala-lang.scala" ]

While we're at it. Yes, it would be better if scala-lang.scala doesn't define extensionKind and instead rely on our default behavior. The current setting (ui, web) will make it impossible to run it to workspace if necessary.

@tgodzik
Copy link
Author

tgodzik commented Jul 12, 2021

Any chance that this can be validated by vsce or at least have a better error? Something like The extension depends on an UI extension, which will not work on a remote machine.

@sandy081
Copy link
Member

sandy081 commented Jul 12, 2021

To confirm, this started happening after adding following support in VS Code in 1.58 - Auto disable extensions if their dependencies are disabled. It assumes that cross extension host dependencies are not supported and if an extension is disabled (for eg., by extensionKind) on a given host, then its dependents are too. So in this case, on wsl, since Scala extension is disabled (because it is UI kind), Metal extension is also disabled.

@aeschli Lets also get confirmation from @alexdima if the extensions can have cross host dependencies like this. As far as I remember we do not support this given that we do no support any cross ext host API to access other extensions API. So, it would be interesting to know how come the Metal extension got activated on remote (wsl) even when its dependency (Scala) is not enabled on the same host?

@sandy081 sandy081 assigned sandy081 and unassigned aeschli Jul 12, 2021
@sandy081 sandy081 added bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release extensions Issues concerning extensions labels Jul 12, 2021
@sandy081 sandy081 added this to the June 2021 Recovery 2 milestone Jul 12, 2021
@sandy081
Copy link
Member

@alexdima confirmed that we support cross host dependencies on following special conditions

  • If the dependency is descriptive
  • If the dependency supports "api": "none"

So, I think this dependency has to be supported.

Hence tagging this as a candidate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug candidate Issue identified as probable candidate for fixing in the next release extensions Issues concerning extensions verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants
@tgodzik @aeschli @sandy081 and others