{"action":"opened","issue":{"url":"https://api.github.com/repos/golang/go/issues/17516","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/17516/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/17516/comments","events_url":"https://api.github.com/repos/golang/go/issues/17516/events","html_url":"https://github.com/golang/go/issues/17516","id":183996361,"number":17516,"title":"guru: confusing behavior on source files whose package can't be located","user":{"login":"alandonovan","id":8433140,"avatar_url":"https://avatars.githubusercontent.com/u/8433140?v=3","gravatar_id":"","url":"https://api.github.com/users/alandonovan","html_url":"https://github.com/alandonovan","followers_url":"https://api.github.com/users/alandonovan/followers","following_url":"https://api.github.com/users/alandonovan/following{/other_user}","gists_url":"https://api.github.com/users/alandonovan/gists{/gist_id}","starred_url":"https://api.github.com/users/alandonovan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alandonovan/subscriptions","organizations_url":"https://api.github.com/users/alandonovan/orgs","repos_url":"https://api.github.com/users/alandonovan/repos","events_url":"https://api.github.com/users/alandonovan/events{/privacy}","received_events_url":"https://api.github.com/users/alandonovan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-19T15:31:50Z","updated_at":"2016-10-19T15:31:50Z","closed_at":null,"body":"CL 30451 caused guru to silently treat a file that it can't locate beneath $GOPATH as if it belonged to an anonymous package (actually, one named \"command-line-arguments\") containing just that file.  The behavior is convenient for some queries since it allows you to, for instance, describe arbitrary identifiers in any Go source file.  However, for \"reverse\" queries such as \"implements\", its benefits are more dubious.  Although it may cause \"implements\" facts within that single file to be reported, guru will fail to report \"implements\" facts about packages that import this one, since without knowing the true name of the query package, it cannot enumerate the packages that import it.\r\n\r\nThe tool should at least issue a warning* when it does this kind of guesswork, and should perhaps not do it at all for queries that use the import graph.\r\n\r\n*though warnings are tricky because they may interfere with structured JSON output for editors that merge subcommands' stdout and stderr."}}
{"actor":{"display_login":"alandonovan"}}