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

Decouple nested resolvers #184171

Closed
aeschli opened this issue Jun 2, 2023 · 1 comment
Closed

Decouple nested resolvers #184171

aeschli opened this issue Jun 2, 2023 · 1 comment
Assignees

Comments

@aeschli
Copy link
Contributor

aeschli commented Jun 2, 2023

To run WSL inside a tunnel, the tunnel extension currently knows about the WSL extension and vice versa.

a. When a tunnel is open (authority: tunnel+...), the WSL extension asks the tunnel extension for an exec server to test if the connected machine is Windows machine and to query distros. based on that it provides commands and populates rremote views.

b. When opening a WSL inside a tunnel we nest the authority: tunnel+Surface-PC++wsl+Ubuntu
The tunnel extension starts resolving the first part (tunnel+Surface-PC) and then hands over resolving to WSL.

Given that we want to add more nestable resolvers (containers, ...), we could avoid the coupling by having the VS Code to the coupling.

a. A resolver can not only make a connection but also provide an exec server:
ManagedResolvedAuthority: connectToExecSever(). Tunnels would implement that when resolving an authority tunnel+....

RemoteAuthorityResolver will get an additional (optional) function resolveNested(nestedAuthority: string, execServer: ExecServer).
It would be implemented by the WSL resolver and is called when the authority is tunnel+Surface-PC++wsl+Ubuntu.

b. vscode.env.onDidResolveExecServer: Event< ExecServer> allows to get a hold to a ExecServer when a remote is open that supports that.
It is called when the authority starts with tunnel+Surface-PC. WSL would register there and contribute commands (and remote views).

@connor4312
Copy link
Member

We now have a proper .d.ts api for this

@aiday-mar aiday-mar added this to the December / January 2024 milestone Feb 6, 2024
@microsoft microsoft locked and limited conversation to collaborators Jun 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants