{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/15483","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/15483/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/15483/comments","events_url":"https://api.github.com/repos/golang/go/issues/15483/events","html_url":"https://github.com/golang/go/issues/15483","id":151728796,"number":15483,"title":"cmd/go: can't use `go generate` in package called documentation","user":{"login":"dominikh","id":39825,"avatar_url":"https://avatars.githubusercontent.com/u/39825?v=3","gravatar_id":"","url":"https://api.github.com/users/dominikh","html_url":"https://github.com/dominikh","followers_url":"https://api.github.com/users/dominikh/followers","following_url":"https://api.github.com/users/dominikh/following{/other_user}","gists_url":"https://api.github.com/users/dominikh/gists{/gist_id}","starred_url":"https://api.github.com/users/dominikh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominikh/subscriptions","organizations_url":"https://api.github.com/users/dominikh/orgs","repos_url":"https://api.github.com/users/dominikh/repos","events_url":"https://api.github.com/users/dominikh/events{/privacy}","received_events_url":"https://api.github.com/users/dominikh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/38","html_url":"https://github.com/golang/go/milestones/Go1.8","labels_url":"https://api.github.com/repos/golang/go/milestones/38/labels","id":1709363,"number":38,"title":"Go1.8","description":"","creator":{"login":"griesemer","id":8528975,"avatar_url":"https://avatars.githubusercontent.com/u/8528975?v=3","gravatar_id":"","url":"https://api.github.com/users/griesemer","html_url":"https://github.com/griesemer","followers_url":"https://api.github.com/users/griesemer/followers","following_url":"https://api.github.com/users/griesemer/following{/other_user}","gists_url":"https://api.github.com/users/griesemer/gists{/gist_id}","starred_url":"https://api.github.com/users/griesemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griesemer/subscriptions","organizations_url":"https://api.github.com/users/griesemer/orgs","repos_url":"https://api.github.com/users/griesemer/repos","events_url":"https://api.github.com/users/griesemer/events{/privacy}","received_events_url":"https://api.github.com/users/griesemer/received_events","type":"User","site_admin":false},"open_issues":67,"closed_issues":1,"state":"open","created_at":"2016-04-15T16:30:23Z","updated_at":"2016-05-17T13:43:09Z","due_on":"2017-02-01T08:00:00Z","closed_at":null},"comments":1,"created_at":"2016-04-28T19:55:07Z","updated_at":"2016-05-17T13:43:09Z","closed_at":null,"body":"Please answer these questions before submitting your issue. Thanks!\r\n\r\n1. What version of Go are you using (`go version`)?\r\ngo version go1.6 linux/amd64\r\n\r\n2. What operating system and processor architecture are you using (`go env`)?\r\nGOHOSTARCH=\"amd64\"\r\nGOHOSTOS=\"linux\"\r\n\r\n3. What did you do?\r\n```\r\n $ cat gen.go\r\n//go:generate ./gen.sh\r\n\r\npackage documentation\r\n\r\n$ go generate\r\ncan't load package: package .: no buildable Go source files in /home/dominikh/work/gopath/doc\r\n```\r\n\r\n\r\n4. What did you expect to see?\r\nThe `go generate` to work\r\n\r\n5. What did you see instead?\r\n    ```\r\n    can't load package: package .: no buildable Go source files in /home/dominikh/work/gopath/doc\r\n    ```\r\n\r\nPackage documentation is special because the Go tool ignores files belonging to it. However, it would be useful to be able to use `go generate` with those, instead of having to rely on another build system.\r\n\r\nConcrete use case: I have a documentation package at the root of the project, documenting the architecture, dependencies and so on of the project. Part of that documentation has to be generated."},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/219721231","html_url":"https://github.com/golang/go/issues/15483#issuecomment-219721231","issue_url":"https://api.github.com/repos/golang/go/issues/15483","id":219721231,"user":{"login":"rsc","id":104030,"avatar_url":"https://avatars.githubusercontent.com/u/104030?v=3","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"created_at":"2016-05-17T13:43:09Z","updated_at":"2016-05-17T13:43:09Z","body":"The implications here are unclear to me, and this is not new in Go 1.7. Leaving for Go 1.8.\n\nIt seems OK to try for Go 1.8 as long as it fits nicely into the go command.\n(For example, if the go command completely ignores all package documentation files and therefore required significant special case paths to make go generate not ignore them, that would probably not be correct.)"}}