{"action":"created","issue":{"url":"https://api.github.com/repos/bazelbuild/bazel-gazelle/issues/378","repository_url":"https://api.github.com/repos/bazelbuild/bazel-gazelle","labels_url":"https://api.github.com/repos/bazelbuild/bazel-gazelle/issues/378/labels{/name}","comments_url":"https://api.github.com/repos/bazelbuild/bazel-gazelle/issues/378/comments","events_url":"https://api.github.com/repos/bazelbuild/bazel-gazelle/issues/378/events","html_url":"https://github.com/bazelbuild/bazel-gazelle/issues/378","id":381665334,"node_id":"MDU6SXNzdWUzODE2NjUzMzQ=","number":378,"title":"Golang project structure seems to be a problem for automatic build file generation","user":{"login":"tehcyx","id":917785,"node_id":"MDQ6VXNlcjkxNzc4NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/917785?v=4","gravatar_id":"","url":"https://api.github.com/users/tehcyx","html_url":"https://github.com/tehcyx","followers_url":"https://api.github.com/users/tehcyx/followers","following_url":"https://api.github.com/users/tehcyx/following{/other_user}","gists_url":"https://api.github.com/users/tehcyx/gists{/gist_id}","starred_url":"https://api.github.com/users/tehcyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tehcyx/subscriptions","organizations_url":"https://api.github.com/users/tehcyx/orgs","repos_url":"https://api.github.com/users/tehcyx/repos","events_url":"https://api.github.com/users/tehcyx/events{/privacy}","received_events_url":"https://api.github.com/users/tehcyx/received_events","type":"User","site_admin":false},"labels":[{"id":765902338,"node_id":"MDU6TGFiZWw3NjU5MDIzMzg=","url":"https://api.github.com/repos/bazelbuild/bazel-gazelle/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-11-16T16:15:12Z","updated_at":"2018-11-28T15:01:39Z","closed_at":null,"author_association":"NONE","body":"I have the following project structure:\r\n```\r\n    proj\r\n    ---| folder1\r\n    ------------| stuff1\r\n    --------------------| stuff1.go\r\n    ------------| stuff2\r\n    --------------------| stuff2.go\r\n    ---| folder2\r\n    ------------| stuff1\r\n    --------------------| stuff1.go\r\n    ------------| stuff2\r\n    --------------------| stuff2.go\r\n    ....\r\n    ---| app.go\r\n```\r\nWhich ends up generating import paths like:\r\n```\r\n    import folderOneStuff github.com/username/proj/folder1/stuff1\r\n    import folderTwoStuff github.com/username/proj/folder2/stuff1\r\n    ...\r\n```\r\nNow I try to use bazel gazelle to generate build files for me. Therefor I followed this: https://github.com/bazelbuild/bazel-gazelle#running-gazelle-with-bazel\r\n\r\nIf I now run `$ bazel run //:gazelle`, I get an error stating that \"go prefix is not set, so importpath can't be determined for rules.\" even though my BUILD file has this line:\r\n```\r\n    # gazelle:prefix github.com/username/proj\r\n```\r\nI assume at this point that gazelle is having problems with my folder structure, can I fix this for automated build files or do I have to manually create build files?\r\n\r\nIs this a problem that is only solvable by changing my project structure, so rather a go project structure problem rather than a problem with me using bazel (wrong)?\r\n\r\nEverything I do you can find on this branch: https://github.com/tehcyx/cloud-build-poc/tree/feature/bazel\r\nI'm trying to run bazel out of a Docker container: https://github.com/tehcyx/cloud-build-poc/blob/feature/bazel/Dockerfile.bazel"},"comment":{"url":"https://api.github.com/repos/bazelbuild/bazel-gazelle/issues/comments/442477359","html_url":"https://github.com/bazelbuild/bazel-gazelle/issues/378#issuecomment-442477359","issue_url":"https://api.github.com/repos/bazelbuild/bazel-gazelle/issues/378","id":442477359,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MjQ3NzM1OQ==","user":{"login":"tehcyx","id":917785,"node_id":"MDQ6VXNlcjkxNzc4NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/917785?v=4","gravatar_id":"","url":"https://api.github.com/users/tehcyx","html_url":"https://github.com/tehcyx","followers_url":"https://api.github.com/users/tehcyx/followers","following_url":"https://api.github.com/users/tehcyx/following{/other_user}","gists_url":"https://api.github.com/users/tehcyx/gists{/gist_id}","starred_url":"https://api.github.com/users/tehcyx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tehcyx/subscriptions","organizations_url":"https://api.github.com/users/tehcyx/orgs","repos_url":"https://api.github.com/users/tehcyx/repos","events_url":"https://api.github.com/users/tehcyx/events{/privacy}","received_events_url":"https://api.github.com/users/tehcyx/received_events","type":"User","site_admin":false},"created_at":"2018-11-28T15:01:39Z","updated_at":"2018-11-28T15:01:39Z","author_association":"NONE","body":"@jayconrod thanks, I'll try that later today or on the weekend if I find the time and report back."}}
{"actor":{"display_login":"tehcyx"}}