theia-ide / theia-apps

Theia applications examples - docker images, desktop apps, packagings
Apache License 2.0
1.04k stars 345 forks source link

Activating extension 'Go' failed: Command "go.gopath" already has handler #445

Closed Kami-no closed 3 years ago

Kami-no commented 3 years ago

Bug Description:

Unable to use extension "Go" with "theia-go"

Steps to Reproduce:

  1. run theiaide/theia-go:next or theiaide/theia-go:latest container
  2. install Go extension
  3. you have Activating extension 'Go' failed: Command "go.gopath" already has handler

Additional Information

docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
theiaide/theia-go   next                c682cb2a6abe        8 days ago          2.95GB

Built-in functionality for Golang has less features than "Go" extension (or it's a bit outdated). Is there a way to have golang in Thea container and still be able to use "Go" extension?

Optionally: I'd like to have an ability for extensions to override built-in features.

vince-fugnitto commented 3 years ago

@Kami-no if I understand correctly, you want to use the golang.Go extension in the image however it is already included (https://github.com/theia-ide/theia-apps/pull/421 it was updated):

https://github.com/theia-ide/theia-apps/blob/d7f5d7531933bbc9ca847401fa53fd6595946463/theia-go-docker/latest.package.json#L99

It is possible that a newer version of the image was not yet published due to #444.

Is there a way to have golang in Thea container and still be able to use "Go" extension?

You will need to modify the image (and possibly provide a pull-request) or maintain your own image. The images are used as examples and for continuous integration and are not official (this is expressed in the readme).

Optionally: I'd like to have an ability for extensions to override built-in features.

Can you clarify on which built-in features you want to override? If you are referring to features contributed by plugins (vscode extensions) you will need to take a look at their API in order to verify if you can in fact override features.

Kami-no commented 3 years ago

Where I can find resources to build the current image from Docker Hub to make my image as close to the public version as possible? I've not found a link at Docker Hub...

vince-fugnitto commented 3 years ago

Where I can find resources to build the current image from Docker Hub to make my image as close to the public version as possible? I've not found a link at Docker Hub...

The images are present in this repository (for example theia-go):

To build you can follow the instructions here while replacing the image with the one you want:

Kami-no commented 3 years ago

Great, thank you very much! Issue is solved.