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

Extension doesn't work with "development containers" #9

Open
bblanchon opened this issue Jul 27, 2020 · 7 comments
Open

Extension doesn't work with "development containers" #9

bblanchon opened this issue Jul 27, 2020 · 7 comments
Assignees

Comments

@bblanchon
Copy link

Hi,

Thanks for this excellent extension.
I use it daily for local development, but unfortunately, it doesn't work with development containers.

VSCode allows users to install an extension inside the container.
When I do that with this extension, it adds the button on the status bar, but clicking on it has no effect.
I guess that the extension tries to open Sublime Merge in the container instead of the host.

Rather than installing the extension in the container, I think the right approach is to tell VSCode that this extension must run exclusively on the host.
According to the documentation, you need to add the following to package.json:

{
  "extensionKind": ["ui"]
}

I tried, and it did enable the extension in the container, but the button in the status bar is still missing, and when I try to run open Sublime Merge via the Command Palette, it get the following error:

Command 'Open repository in Sublime Merge' resulted in an error (command 'vscsm.openInSublimeMerge' not found)

That's all I've been able to do with my limited knowledge of VSCode; I hope you'll be able to take it from here.

Best regards,
Benoit

@giovdk21
Copy link
Owner

giovdk21 commented Aug 7, 2020

Hi Benoit,
Thanks for reporting this!

As part of #11 I should have fixed the issue you mentioned when you try to run the extension commands using the command palette.

I also forced the extension to only run locally as you suggested, but I didn't manage to try it with development containers yet.

Please let me know if the new version (once released) improve things (or not 😅 )

@giovdk21 giovdk21 self-assigned this Aug 7, 2020
@bblanchon
Copy link
Author

Hi Giovanni,

With version 1.1.0, I get the following message when opening in the container:

Cannot activate the 'Sublime Merge for VSCode' extension because it depends on the 'Git' extension, which is not loaded. Would you like to reload the window to load the extension?

I'm not sure which Git extension it refers to, but I can confirm that the Source Control tab is working correctly.

Best regards,
Benoit

@giovdk21
Copy link
Owner

hello,
I believe it refers to this extension: https://github.com/microsoft/vscode/blob/master/extensions/git/package.json
which is built-in; could you double check if it's enabled?

You can find it by opening the "Sublime Merge for VSCode" from the extensions tab within VS Code, and then it's under dependencies. Clicking on its name should let you see whether it's enabled or not:

image

@bblanchon
Copy link
Author

Hi,

Yes, it seems that it's enabled.

image

Best regards,
Benoit

@giovdk21
Copy link
Owner

giovdk21 commented Sep 4, 2020

Hi Benoit,
thanks. I tried running it with dev. containers but could not find a solution.

The cause of the error you mentioned is the fact that the Git extension is running within the container (remote extension host) while Sublime Merge for VSCode is running out side the container (local extension host)

My understanding is that remote (docker) containers share the same design of the other two "remote" extensions for SSH and WSL, therefore assuming the source code is in a different/remote location. Because of this it's not possible for an extension that runs inside a container to run a local child process (in this case Sublime Merge) and at the same time Sublime Merge itself won't have access to the files in the remote location:

https://code.visualstudio.com/api/advanced-topics/remote-extensions#opening-something-in-a-local-browser-or-application

The remote development extension is still in "preview" mode so I'll keep this open for now and see if I'll manage to look further into this

@rgokul
Copy link

rgokul commented Oct 27, 2021

Almost once a month I check the status of this issue, vs code remote development new features to see if it is fixable. As an alternative, could you enable a feature where we can configure this extension with a local mirror that can be used with smerge? I use this extension so much that I've had to manually ssh -X on the remote machine for gui dev and it is slow.

If I click the icon for the extension, it should take the relative path from workspace root on remote and apply it to local mirror location.

I will manually rsync changes back and forth.

Thanks in advance.

@z-aki
Copy link

z-aki commented Jan 24, 2024

Would be highly appreciated if remote container's context menu buttons with local smerge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants