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

[Language server] The Refactor -> Rename feature does not work for Golang language server #10524

Closed
SkorikSergey opened this issue Jul 24, 2018 · 2 comments
Assignees
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/P2 Has a minor but important impact to the usage or development of the system.

Comments

@SkorikSergey
Copy link
Contributor

SkorikSergey commented Jul 24, 2018

Reproduction Steps:

  1. Create and start workspace from Go stack with web-go-simple project.
  2. Open "main.go" file from the project.
  3. Click on any variable and select Refactoring->Rename(Shift+F6) feature from context menu.
  4. Change name of the variable and press ENTER.

Expected behavior:
The variable name changed

Observed behavior:
The variable was not changed and there is "Rename failed: gorename: can't find package containing /projects/ga/main.go" error notification.

Che version: 6.9.0
OS and version: Fedora 28
Che install: OCP-single

Additional information:

  • Problem can be reliably reproduced, doesn't happen randomly: [Yes]
  • See the attachment:

screenshot:
eclipse che wksp-3mtr - google chrome_051

selection_125

@SkorikSergey SkorikSergey added kind/bug Outline of a bug - must adhere to the bug report template. severity/P2 Has a minor but important impact to the usage or development of the system. labels Jul 24, 2018
@SkorikSergey SkorikSergey changed the title The Refactor -> Rename feature does not work for Golang language server [Language server] The Refactor -> Rename feature does not work for Golang language server Aug 8, 2018
@ghost
Copy link

ghost commented Oct 31, 2018

The problem here seems to have been caused by the fact that project sources aren't in ${GOPATH}/src. It is possible to define GOPATH to point to /projects and create a project in src. However, bin/ pkg/ src/ will be treated like projects and displayed in project explorer as such.

@dkulieshov dkulieshov added the status/in-progress This issue has been taken by an engineer and is under active development. label Nov 2, 2018
@dkulieshov
Copy link

Yeah, seems like golang language server delegates renaming to gorename tool which conforms to golang project structure ideology which in turn does not align with such in eclipse che. At the moment there is no possibility to separately configure the tool to use custom project path, while in the other hand it is also not possible to change eclipse che workspace file system structure the way the tool requires for its proper work.

After spending a lot time on investigation and fixing the issue, as a conclusion I believe that we unfortunately have just a few options: to wait until the tool/language server becomes more flexible, to switch to another language server that may not have such problem or to revise the approach we're using when we organize eclipse che workspace file system structure.

From my point of view, all options are doubtful so I'm closing this as "won't fix" until we have a reliable solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
None yet
Development

No branches or pull requests

3 participants