{"action":"closed","issue":{"url":"https://api.github.com/repos/sourcegraph/go-langserver/issues/11","repository_url":"https://api.github.com/repos/sourcegraph/go-langserver","labels_url":"https://api.github.com/repos/sourcegraph/go-langserver/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/sourcegraph/go-langserver/issues/11/comments","events_url":"https://api.github.com/repos/sourcegraph/go-langserver/issues/11/events","html_url":"https://github.com/sourcegraph/go-langserver/issues/11","id":185620910,"number":11,"title":"When run locally, document/references returns references that aren't in the initial root_path","user":{"login":"uforic","id":253496,"avatar_url":"https://avatars.githubusercontent.com/u/253496?v=3","gravatar_id":"","url":"https://api.github.com/users/uforic","html_url":"https://github.com/uforic","followers_url":"https://api.github.com/users/uforic/followers","following_url":"https://api.github.com/users/uforic/following{/other_user}","gists_url":"https://api.github.com/users/uforic/gists{/gist_id}","starred_url":"https://api.github.com/users/uforic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uforic/subscriptions","organizations_url":"https://api.github.com/users/uforic/orgs","repos_url":"https://api.github.com/users/uforic/repos","events_url":"https://api.github.com/users/uforic/events{/privacy}","received_events_url":"https://api.github.com/users/uforic/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"keegancsmith","id":187831,"avatar_url":"https://avatars.githubusercontent.com/u/187831?v=3","gravatar_id":"","url":"https://api.github.com/users/keegancsmith","html_url":"https://github.com/keegancsmith","followers_url":"https://api.github.com/users/keegancsmith/followers","following_url":"https://api.github.com/users/keegancsmith/following{/other_user}","gists_url":"https://api.github.com/users/keegancsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/keegancsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keegancsmith/subscriptions","organizations_url":"https://api.github.com/users/keegancsmith/orgs","repos_url":"https://api.github.com/users/keegancsmith/repos","events_url":"https://api.github.com/users/keegancsmith/events{/privacy}","received_events_url":"https://api.github.com/users/keegancsmith/received_events","type":"User","site_admin":false},"assignees":[{"login":"keegancsmith","id":187831,"avatar_url":"https://avatars.githubusercontent.com/u/187831?v=3","gravatar_id":"","url":"https://api.github.com/users/keegancsmith","html_url":"https://github.com/keegancsmith","followers_url":"https://api.github.com/users/keegancsmith/followers","following_url":"https://api.github.com/users/keegancsmith/following{/other_user}","gists_url":"https://api.github.com/users/keegancsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/keegancsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keegancsmith/subscriptions","organizations_url":"https://api.github.com/users/keegancsmith/orgs","repos_url":"https://api.github.com/users/keegancsmith/repos","events_url":"https://api.github.com/users/keegancsmith/events{/privacy}","received_events_url":"https://api.github.com/users/keegancsmith/received_events","type":"User","site_admin":false}],"milestone":null,"comments":9,"created_at":"2016-10-27T09:44:42Z","updated_at":"2016-11-14T13:49:08Z","closed_at":"2016-11-14T13:49:08Z","body":"When debugging the go language server locally, I noticed that a references request pulled back refs that weren't in the root_path of the project.\n\nStep 1: Initialize language server, notice the rootPath\n`\nlanguage server initialized: [{\"jsonrpc\": \"2.0\", \"id\": 1, \"result\": {\"capabilities\": {\"workspaceSymbolProvider\": true, \"textDocumentSync\": 1, \"definitionProvider\": true, \"hoverProvider\": true, \"referencesProvider\": true}}}, {\"request\": {\"params\": {\"capabilities\": {}, \"processId\": 5506, \"rootPath\": \"file:///Users/mattfs/gopath/src/sourcegraph.com/sourcegraph/sourcegraph\"}, \"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"initialize\"}}]\n`\n\nStep 2: Make a references call, was on net.Listener in server.go:\n`\n{'params': {'includeDeclaration': True, 'position': {'line': 43, 'character': 32}, 'textDocument': {'uri': 'file:///Users/mattfs/gopath/src/sourcegraph.com/sourcegraph/sourcegraph/pkg/gitserver/server.go'}}, 'jsonrpc': '2.0', 'id': 3, 'method': 'textDocument/references'}\n`\n\nStep 3: A sampling of results returned (over 130 results):\n`\nfile:///Users/mattfs/gopath/src/github.com/chzyer/readline/remote.go\n`\n`\nfile:///Users/mattfs/gopath/src/github.com/rogpeppe/rog-go/loopback/net.go\n`\n\nNotice how none of these are vendored (how I know they aren't coming from Sourcegraph), and they all happen to be in my GOPATH.\n\nIs it possible we are pulling all references to a given def that are in the GOPATH, not just the ones in the doc_root of the project we are in?\n"}}
{"actor":{"display_login":"keegancsmith"}}