{"action":"created","issue":{"url":"https://api.github.com/repos/pantsbuild/intellij-pants-plugin/issues/79","labels_url":"https://api.github.com/repos/pantsbuild/intellij-pants-plugin/issues/79/labels{/name}","comments_url":"https://api.github.com/repos/pantsbuild/intellij-pants-plugin/issues/79/comments","events_url":"https://api.github.com/repos/pantsbuild/intellij-pants-plugin/issues/79/events","html_url":"https://github.com/pantsbuild/intellij-pants-plugin/issues/79","id":120295783,"number":79,"title":"Python code in BUILD files","user":{"login":"benjyw","id":512764,"avatar_url":"https://avatars.githubusercontent.com/u/512764?v=3","gravatar_id":"","url":"https://api.github.com/users/benjyw","html_url":"https://github.com/benjyw","followers_url":"https://api.github.com/users/benjyw/followers","following_url":"https://api.github.com/users/benjyw/following{/other_user}","gists_url":"https://api.github.com/users/benjyw/gists{/gist_id}","starred_url":"https://api.github.com/users/benjyw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjyw/subscriptions","organizations_url":"https://api.github.com/users/benjyw/orgs","repos_url":"https://api.github.com/users/benjyw/repos","events_url":"https://api.github.com/users/benjyw/events{/privacy}","received_events_url":"https://api.github.com/users/benjyw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"wisechengyi","id":596358,"avatar_url":"https://avatars.githubusercontent.com/u/596358?v=3","gravatar_id":"","url":"https://api.github.com/users/wisechengyi","html_url":"https://github.com/wisechengyi","followers_url":"https://api.github.com/users/wisechengyi/followers","following_url":"https://api.github.com/users/wisechengyi/following{/other_user}","gists_url":"https://api.github.com/users/wisechengyi/gists{/gist_id}","starred_url":"https://api.github.com/users/wisechengyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wisechengyi/subscriptions","organizations_url":"https://api.github.com/users/wisechengyi/orgs","repos_url":"https://api.github.com/users/wisechengyi/repos","events_url":"https://api.github.com/users/wisechengyi/events{/privacy}","received_events_url":"https://api.github.com/users/wisechengyi/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-12-03T23:25:27Z","updated_at":"2016-01-05T19:40:40Z","closed_at":null,"body":"3rdparty/intellij/BUILD contains a ton of Python code. Other BUILD files may too, I haven't checked.\r\n\r\nWe really want to have BUILD files that are purely declarative, that's the future of Pants. :)"},"comment":{"url":"https://api.github.com/repos/pantsbuild/intellij-pants-plugin/issues/comments/169107725","html_url":"https://github.com/pantsbuild/intellij-pants-plugin/issues/79#issuecomment-169107725","issue_url":"https://api.github.com/repos/pantsbuild/intellij-pants-plugin/issues/79","id":169107725,"user":{"login":"ericzundel","id":119728,"avatar_url":"https://avatars.githubusercontent.com/u/119728?v=3","gravatar_id":"","url":"https://api.github.com/users/ericzundel","html_url":"https://github.com/ericzundel","followers_url":"https://api.github.com/users/ericzundel/followers","following_url":"https://api.github.com/users/ericzundel/following{/other_user}","gists_url":"https://api.github.com/users/ericzundel/gists{/gist_id}","starred_url":"https://api.github.com/users/ericzundel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericzundel/subscriptions","organizations_url":"https://api.github.com/users/ericzundel/orgs","repos_url":"https://api.github.com/users/ericzundel/repos","events_url":"https://api.github.com/users/ericzundel/events{/privacy}","received_events_url":"https://api.github.com/users/ericzundel/received_events","type":"User","site_admin":false},"created_at":"2016-01-05T19:40:40Z","updated_at":"2016-01-05T19:40:40Z","body":"We could invent some kind of interpolation for common things like\nsubstituting environment variables into BUILD files.\n\nHowever, using the environment variable like this with pants seems at odds\nwith the goal of creating a hermetic build. I'm not sure this is a practice\nwe want to officially sanction, just like using python code in the BUILD\nfile.\n\n\nOn Mon, Jan 4, 2016 at 8:58 PM Yi Cheng <notifications@github.com> wrote:\n\n> The reason of having python code is that we want to use some jars in the\n> to-be downloaded IntelliJ dist. For example with intellij build 143.381\n>\n> jar_library(\n>     name = 'junit-plugin',\n>     jars = [\n>         _intellij_plugin_jar(path) for path in _find_all_jars(\n>             os.path.join(os.environ['INTELLIJ_HOME'], 'plugins', 'junit', 'lib')\n>         )\n>     ]\n> )\n>\n> It is trying to look into\n> .cache/intellij/IC-143.381/idea-dist/plugins/junit/lib/, and it is just for\n> one version of the intellij. The build file is ideal to be purely\n> declarative, but we may need a work around for this first, and please\n> kindly suggest if there is a better way to do so.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/pantsbuild/intellij-pants-plugin/issues/79#issuecomment-168869626>\n> .\n>\n"}}