Gp open does not work in VS Code UI

I’ve checked that gp open <filename> is not working in the VS Code UI.

Hi @pattacini, thanks for reporting this!

But it’s strange, because I was successfully using gp open <filename> earlier in VS Code and thought it was nice that this feature was preserved.

  • How do you get gp, and do you use a custom image?

  • Does code <filename> work for you?

Hi @jan

Thanks for replying!

I’ve used this repo with a custom image pointed from therein.

gp comes preinstalled apparently - I didn’t do anything special - probably applied by Gitpod itself later on.
code <filename> doesn’t work either.

gp open <filename> as well as code <filename> work as expected on Theia UI.

Please file an issue. :pray: it is somehow related to how we compose images I assume. I will have a look.

I’ve used this repo with a custom image pointed from therein.

I tried this repo and there seems to be already code installed but not from Gitpod:

Proper one sits in /ide/bin/code, but gp rely on code in PATH and get something strange.

Thanks @akosyakov for replying!

Yep, indeed, I’ve installed VScode separately on the docker image and then shadowed /ide/bin/code on purpose to get the following goals:

  • To be able to run code within the Desktop GUI accessible via VNC as per the image below.
  • To be still able to run gp open <filename> in the Gitpod environment successfully.

This is still working just fine in Theia, not in VSCode UI. Can it be that gp open doesn’t rely on code underneath in Theia?

A couple of questions:

  • Do you know a better way to achieve my intended goals? I’ll be eager to apply it if any and to address VSCode UI too.
  • Do you want me still to file an issue? I can do that anyway, although it seems we’ve already started off discussing here.

Theia is irrelevant. It works differently.

When you pick VS Code in settings we install special code cli on the PATH which should work fine with gp. Code cli coming from VS Code is not fully compatible with gp. Could you remove VS Code to avoid shadowing? We should see why our code cli does not work.

Ok then, I think this explains everything!
I can do the test and remove shadowing but I’m pretty convinced that it’ll work.

Do you have any suggestions on a way to get both the Gitpod Code CLI and the Code editor in the VNC desktop working at the same time? It’d be nice to allow for that also in Gitpod VS Code UI.

We can make gp don’t rely on PATH to look up code . Could you file an issue please?

1 Like

Sure! Thanks a lot!
I’ll do that within today.

1 Like

Done in https://github.com/gitpod-io/gitpod/issues/3844.

1 Like