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

x/tools/cmd/gopls: GoToDef does not work with Module Replace Clause #31055

Closed
marwan-at-work opened this issue Mar 26, 2019 · 3 comments
Closed
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@marwan-at-work
Copy link
Contributor

marwan-at-work commented Mar 26, 2019

Summary

I am working on a project where "GoToDef" works on all the symbols except the ones that come from a module that has been "replaced" in go.mod through the replace clause.

Reproduce

# be outside of GOPATH
1. ~ git clone https://github.com/marwan-at-work/authproxy
2. ~ cd authproxy
3. ~ go build ./...
4. ~ code . # open VSCode pointed at this prject

5. Open authproxy.go file and go to line 63 that reads `cfg, err := google.JWTConfigFromJSON(bts)` 

6. Hover over the `JWTConfigFromJSON` part and try to GoToDef 

Expected: go to the replaced definition insode $GOPATH/pkg/mod
Actual: nothing happened.

Editor Settings

GO111MODULE: on
Editor: VSCODE
GoPls Settings:

{
    "atomKeymap.promptV3Features": true,
    "editor.multiCursorModifier": "ctrlCmd",
    "editor.formatOnPaste": true,
    "window.zoomLevel": 0,
    "editor.fontSize": 12,
    "editor.lineHeight": 22,
    "go.buildOnSave": "off",
    "go.vetOnSave": "off",
    "go.useLanguageServer": true,
    "go.alternateTools": {
        "go-langserver": "gopls"
    },
    "go.languageServerExperimentalFeatures": {
        "format": false,
        "autoComplete": true,
        "rename": true,
        "goToDefinition": true,
        "hover": true,
        "signatureHelp": true,
        "goToTypeDefinition": true,
        "goToImplementation": true,
        "documentSymbols": true,
        "workspaceSymbols": true,
        "findReferences": true
    },
    "go.lintTool": "golint",
    "go.coverageDecorator": {
        "type": "highlight"
    },
    "editor.hideCursorInOverviewRuler": false,
    "editor.formatOnSave": true,
    "editor.codeActionsOnSave": {
        "source.organizeImports": true,
    },
    "breadcrumbs.enabled": true
}
@marwan-at-work marwan-at-work added the gopls Issues related to the Go language server, gopls. label Mar 26, 2019
@gopherbot gopherbot added this to the Unreleased milestone Mar 26, 2019
@myitcv myitcv added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 8, 2019
@myitcv
Copy link
Member

myitcv commented May 8, 2019

Also seeing this. Noting that this is particularly painful for people (like me) who use gohack to quickly hack on deps for debugging/whatever.

@myitcv
Copy link
Member

myitcv commented May 8, 2019

cc @stamblerre @ianthehat

@stamblerre
Copy link
Contributor

I also can no longer reproduce this. Closing.

@golang golang locked and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. 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