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

Migrate go-outline usage to gopls #1554

Closed
jackwootton opened this issue Jun 9, 2021 · 5 comments
Closed

Migrate go-outline usage to gopls #1554

jackwootton opened this issue Jun 9, 2021 · 5 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@jackwootton
Copy link

What version of Go, VS Code & VS Code Go extension are you using?

  • Run go version to get version of Go from the VS Code integrated terminal.
    • go version go1.16.4 linux/amd64
  • Run gopls -v version to get version of Gopls from the VS Code integrated terminal.
    • golang.org/x/tools/gopls v0.6.11
  • Run code -v or code-insiders -v to get version of VS Code or VS Code Insiders.
    • 1.55.2
    • 3c4e3df9e89829dce27b7b5c24508306b151f30d
    • x64
  • Check your installed extensions to get the version of the VS Code Go extension
    • 0.25.1
  • Run Ctrl+Shift+P (Cmd+Shift+P on Mac OS) > Go: Locate Configured Go Tools command.
Checking configured tools....
GOBIN: undefined
toolsGopath: 
gopath: /home/jack/go
GOROOT: /usr/local/go
PATH: /home/jack/.local/bin:/usr/local/go/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

gopkgs: gopkgs not installed
go-outline: go-outline not installed
gotests: gotests not installed
gomodifytags: gomodifytags not installed
impl: impl not installed
goplay: goplay not installed
dlv: dlv not installed
dlv-dap: dlv-dap not installed
staticcheck: staticcheck not installed
gopls: /home/jack/go/bin/gopls installed

go env
Workspace Folder (api): /home/jack/go/src/github.com/jsonsystems/api
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/jack/.cache/go-build"
GOENV="/home/jack/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/jack/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/jack/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16.4"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/jack/go/src/github.com/jsonsystems/api/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1647289639=/tmp/go-build -gno-record-gcc-switches"

Share the Go related settings you have added/edited

Run Preferences: Open Settings (JSON) command to open your settings.json file.
Share all the settings with the go. or ["go"] or gopls prefixes.

{
  "vim.easymotion": true,
  "vim.incsearch": true,
  "vim.useSystemClipboard": true,
  "vim.useCtrlKeys": true,
  "vim.hlsearch": true,
  "vim.insertModeKeyBindings": [
    {
      "before": [
        "j",
        "j"
      ],
      "after": [
        "<Esc>"
      ]
    }
  ],
  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": [
        "<leader>",
        "d"
      ],
      "after": [
        "d",
        "d"
      ]
    },
    {
      "before": [
        "<C-n>"
      ],
      "commands": [
        ":nohl"
      ]
    }
  ],
  "vim.leader": "<space>",
  "vim.handleKeys": {
    "<C-a>": false,
    "<C-f>": false
  },
  "vim.easymotionMarkerForegroundColorOneChar": "yellow",
  "vim.easymotionMarkerForegroundColorTwoChar": "yellow",
  "workbench.colorTheme": "Mayukai Dark",
  "editor.lineHeight": 24,
  "editor.fontSize": 13,
  "editor.fontFamily": "Fira Code",
  "editor.fontLigatures": false,
  "git.enableSmartCommit": true,
  "window.menuBarVisibility": "toggle",
  "workbench.sideBar.location": "left",
  "files.exclude": {
    "**/.git": false,
    "**/node_modules/**": true
  },
  "go.useLanguageServer": true,
  "diffEditor.ignoreTrimWhitespace": true,
  "[python]": {
    "editor.defaultFormatter": "ms-python.python"
  },
  "explorer.confirmDragAndDrop": false,
  "protoc": {
    "options": [
      "--proto_path=/usr/local/include/google/"
    ]
  },
  "markdown.extension.toc.omittedFromToc": {
    "README.md": ["# Table of Contents", "# jsn"]
  
  }
}

Describe the bug

Upon opening a new VSCode window with Go files present in the workspace, 3 identical notifications are displayed in the bottom right corner of VSCode.

The "go-outline" command is not available.
Run "go get -v github.com/ramya-rao-a/go-outline" to install.

Clicking the cog/settings icon in the top right of any notification opens the Go extension for VSCode (repository).

  • Why, when the notification recommends installing github.com/ramya-rao-a/go-outline, does the settings icon open the extension page for https://github.com/golang/vscode-go?
  • Why do I repeatedly see this notification?
    • I do not want to install an extension from github.com/ramya-rao-a

A clear and concise description of what you expected to happen.

  • I do not see this notification having dismissed it once
  • Clicking the settings icon in the top right of the notification opens the extension for github.com/ramya-rao-a/go-outline and not github.com/golang/vscode-go

Steps to reproduce the behavior:

  1. Open a workspace with Go files

Screenshots or recordings

image
image

@gopherbot gopherbot added this to the Untriaged milestone Jun 9, 2021
@findleyr findleyr added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jun 9, 2021
@findleyr findleyr modified the milestones: Untriaged, v0.26.0 Jun 9, 2021
@findleyr
Copy link
Member

findleyr commented Jun 9, 2021

Thanks, we generally want to suppress pop-ups whenever possible. Having duplicates like this is a bug.

CC @hyangah @suzmue

@jackwootton
Copy link
Author

@findleyr Thanks for responding so promptly.

Multiple popups is annoying, but specifically, I want to highlight

  • why does the settings icon open an extension with a different repository from that cited in the notification?
    • the notification cites github.com/ramya-rao-a/go-outline while clicking the cog opens github.com/ramya-rao-a/go-outline
  • why after this has been dismissed, do I get notified every time I open VSCode?

@hyangah
Copy link
Contributor

hyangah commented Jun 9, 2021

Why, when the notification recommends installing github.com/ramya-rao-a/go-outline, does the settings icon open the extension page for https://github.com/golang/vscode-go?
Why do I repeatedly see this notification?
I do not want to install an extension from github.com/ramya-rao-a

Because vscode-go extension needs github.com/ramya-rao-a/go-outline and initiated the popup.
https://github.com/golang/vscode-go/blob/master/docs/tools.md#go-outline

The tool is used to generate the code lenses for example. This is currently a required tool. :-(

Multiple notification is annoying - the extension needs to keep track of the notification and suppress the duplicate notification.

Moved to Backlog because this problem will go away once go-outline tool is installed. (I didn't test this myself but maybe this tool won't be necessary if you disable all the codelenses https://github.com/golang/vscode-go/blob/master/docs/settings.md#goenablecodelens )

@hyangah hyangah modified the milestones: v0.26.0, Backlog Jun 9, 2021
@findleyr findleyr changed the title Repeatedly prompted to install github.com/ramya-rao-a/go-outline Migrate go-outline usage to gopls Jun 11, 2021
@findleyr
Copy link
Member

We discussed this, and the best solution is to deprecate go-outline altogether.

The reason for the repeated prompt is that go-outline is a 'required tool'. Satisfying this requirement with gopls seems like the cleanest solution.

@hyangah
Copy link
Contributor

hyangah commented Jul 28, 2021

Duplicate of #1020

@hyangah hyangah marked this as a duplicate of #1020 Jul 28, 2021
@hyangah hyangah closed this as completed Jul 28, 2021
@golang golang locked and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants