Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Docs for all functions of the same name in the package are combined in hover and auto-completion feature #2404

Closed
mengstr opened this issue Mar 31, 2019 · 6 comments

Comments

@mengstr
Copy link

mengstr commented Mar 31, 2019

On VCS 1.26.1 with go plugin 0.9.2 on go1.12.1 darwin/amd64 I get the text in the quick info-popup repeated three times as shown in this screenshot-photo (I couldn't figure out how to make a screenshot without the popup closing).

The same thing happens also for longer doc-texts so it's not caused because it's a single liner.
InfoTimes3

@ramya-rao-a
Copy link
Contributor

Thanks for reporting @SmallRoomLabs

  • Are you using any of the language servers? If yes, which one?
  • Are you using Go modules?
  • Does this consistently happen or randomly?

@mengstr
Copy link
Author

mengstr commented Apr 1, 2019

No language servers, not what I know of anyways. I've disabled all plugins except the go. I've removed all user/workspace/folder settings.

Yes, go modules are enabled for this project

It happens consistently over reloads and restarts of vcs.

But I think I've possibly found the root cause here. Looking (in the terminal) at the godoc for testing.Errorf it shows the docs for both the Test, Benchmark and Main variants of Errorf. Docs for all three are identical which in the popup looks as it's just repeated three times.

Screen Shot 2019-04-01 at 9 16 11 AM

The same thing happens with the longer descriptions like for the testing.Run

Screen Shot 2019-04-01 at 9 18 20 AM

The popup displays all three sections of this text, but removes the non-indented "headers"

Screen Shot 2019-04-01 at 9 24 56 AM

So the bug here is not that the description is repeated, but rather that the popup removes the headers for the three different functions/methods from the godoc. I guess the title of this issue should be renamed to something more appropriate.

@ramya-rao-a ramya-rao-a changed the title Intellisense / Quick Info repeated three times Docs for all functions of the same name in the package are combined in hover and auto-completion feature Apr 1, 2019
@ramya-rao-a
Copy link
Contributor

Thanks for all the details @SmallRoomLabs, that is very helpful.

The issue is that while fetching docs, we only have access to package name and the symbol name (in this case the function name). If the same function name is used across multiple receivers, we don't know which receiver should we be using. This is being tracked in #2107

The last we checked this, the wrong function's docs were shown. @segevfiner, Do you recall that the docs for all the variations got combined?

@segevfiner
Copy link
Contributor

Yeah it often combines the docs of several functions of the same name into one.

We fixed this for auto complete, and we are still waiting on the godef PR that I made, so that we can reenable the commented out code that fixes this for hovers on our side.

@mengstr
Copy link
Author

mengstr commented Apr 1, 2019

Great, I see that you got a handle on the situation already. My job here is done. ;-)

@ramya-rao-a
Copy link
Contributor

Thanks @segevfiner

@SmallRoomLabs I'll close this issue in favor of #2107

@vscodebot vscodebot bot locked and limited conversation to collaborators May 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants