eclipse-che / che

Kubernetes based Cloud Development Environments for Enterprise Teams
http://eclipse.org/che
Eclipse Public License 2.0
6.99k stars 1.19k forks source link

Go to Definition doesn't work. #18038

Closed pranaysashank closed 4 years ago

pranaysashank commented 4 years ago

Describe the bug

Go to Definition, which is usually mapped to Ctrl+Click is disabled. When we right click on a symbol, "Go to Definition" is disabled in the go stack (& possibly other languages as well, I tried with Haskell).

Che version

Steps to reproduce

  1. Create a workspace using the predefined go template in the Get Started tab.
  2. Once the workspace is open, make example folder your workspace root (by going to File menu and clicking on Open Workspace Roots)
  3. In the example folder workspace, go to outyet/main.go and right click on any function call
  4. You should see Go to Definition disabled.

Expected behavior

Go to Definition should work. In a standalone theia that I installed the lsp server works fine i.e. Ctrl + Click & Go to Definition works properly, so the plugin is probably fine.

Runtime

   - [x] Openshift (include output of `oc version`) - whatever is on che.openshift.io
   - [x] minikube (include output of `minikube version` and `kubectl version`)
   - [ ] minishift (include output of `minishift version` and `oc version`)
   - [ ] docker-desktop + K8S (include output of `docker version` and `kubectl version`)
   - [ ] other: (please specify)

### Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->
![Screenshot from 2020-10-03 23-25-26](https://user-images.githubusercontent.com/15224715/94998518-e4cde500-05cf-11eb-9cd2-b1f560896488.png)

### Installation method
   - [x] chectl
     * provide a full command that was used to deploy Eclipse Che (including the output)
```bash
chectl server:start --installer=helm --platform=k8s --domain=domainname --multiuser 
 * provide an output of `chectl version` command
chectl/7.19.1 linux-x64 node-v10.22.1

Environment

Eclipse Che Logs

Additional context

In a standalone theia that I installed, the lsp server, with the plugins pasted in the plugins folder, works fine i.e. Ctrl + Click & Go to Definition works properly, so the plugin is probably fine.

pranaysashank commented 4 years ago

https://github.com/eclipse/che/issues/16929 looks like it's related to this

pranaysashank commented 4 years ago

The java-maven workspace which is using vscode-java plugin is working as expected. Perhaps there is a problem with the go plugin, maybe it's not advertising "Go to Definition" capability?

gattytto commented 4 years ago

this is produced because the dockerfile needs to be updated and change gopls from "latest" to "master" and also add "golang.org/x/tools@master". image