{"action":"created","comment":{"url":"https://api.github.com/repos/pantsbuild/pants/pulls/comments/242029580","pull_request_review_id":185441974,"id":242029580,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjAyOTU4MA==","diff_hunk":"@@ -216,16 +257,25 @@ def is_conflicting(target, dependency):\n         self.context.log.warn(error_message)\n         return error_message\n \n-  def _create_individual_error_message(self, target, invalid_dependencies):\n+  @classmethod\n+  def _get_platform_error_description(cls, target, jvm_platform_map):\n+    if target.platform:\n+      return '{} (explicitly specified)'.format(target.platform.name)\n+    else:\n+      return jvm_platform_map[target].transitive_assignment_description","path":"src/python/pants/backend/jvm/tasks/jvm_platform_analysis.py","position":100,"original_position":100,"commit_id":"5c16eef4ea6effe7758a12a903ec033eb3ac4bbd","original_commit_id":"5c16eef4ea6effe7758a12a903ec033eb3ac4bbd","user":{"login":"Eric-Arellano","id":14852634,"node_id":"MDQ6VXNlcjE0ODUyNjM0","avatar_url":"https://avatars3.githubusercontent.com/u/14852634?v=4","gravatar_id":"","url":"https://api.github.com/users/Eric-Arellano","html_url":"https://github.com/Eric-Arellano","followers_url":"https://api.github.com/users/Eric-Arellano/followers","following_url":"https://api.github.com/users/Eric-Arellano/following{/other_user}","gists_url":"https://api.github.com/users/Eric-Arellano/gists{/gist_id}","starred_url":"https://api.github.com/users/Eric-Arellano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eric-Arellano/subscriptions","organizations_url":"https://api.github.com/users/Eric-Arellano/orgs","repos_url":"https://api.github.com/users/Eric-Arellano/repos","events_url":"https://api.github.com/users/Eric-Arellano/events{/privacy}","received_events_url":"https://api.github.com/users/Eric-Arellano/received_events","type":"User","site_admin":false},"body":"Awesome, this function is very helpful! Good idea to add.","created_at":"2018-12-17T05:30:28Z","updated_at":"2018-12-17T05:35:59Z","html_url":"https://github.com/pantsbuild/pants/pull/6948#discussion_r242029580","pull_request_url":"https://api.github.com/repos/pantsbuild/pants/pulls/6948","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/pantsbuild/pants/pulls/comments/242029580"},"html":{"href":"https://github.com/pantsbuild/pants/pull/6948#discussion_r242029580"},"pull_request":{"href":"https://api.github.com/repos/pantsbuild/pants/pulls/6948"}}},"pull_request":{"url":"https://api.github.com/repos/pantsbuild/pants/pulls/6948","id":239017552,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM5MDE3NTUy","html_url":"https://github.com/pantsbuild/pants/pull/6948","diff_url":"https://github.com/pantsbuild/pants/pull/6948.diff","patch_url":"https://github.com/pantsbuild/pants/pull/6948.patch","issue_url":"https://api.github.com/repos/pantsbuild/pants/issues/6948","number":6948,"state":"open","locked":false,"title":"don't eagerly set jvm target platform when not specified in order to increase the default jvm platform for testprojects integration to java8","user":{"login":"cosmicexplorer","id":1305167,"node_id":"MDQ6VXNlcjEzMDUxNjc=","avatar_url":"https://avatars1.githubusercontent.com/u/1305167?v=4","gravatar_id":"","url":"https://api.github.com/users/cosmicexplorer","html_url":"https://github.com/cosmicexplorer","followers_url":"https://api.github.com/users/cosmicexplorer/followers","following_url":"https://api.github.com/users/cosmicexplorer/following{/other_user}","gists_url":"https://api.github.com/users/cosmicexplorer/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmicexplorer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmicexplorer/subscriptions","organizations_url":"https://api.github.com/users/cosmicexplorer/orgs","repos_url":"https://api.github.com/users/cosmicexplorer/repos","events_url":"https://api.github.com/users/cosmicexplorer/events{/privacy}","received_events_url":"https://api.github.com/users/cosmicexplorer/received_events","type":"User","site_admin":false},"body":"### Problem\r\n\r\nIn #6945 we realized we needed to increase the default jvm platform to support java code generated by the new version of Scrooge. In doing so, we found that we are eagerly assigning the jvm platform to `JvmTarget`s in the `.platform` property, which is incorrect behavior, or at least very surprising. This surfaced an error in the testprojects integration testing, which can be seen on master:\r\n\r\n```\r\n> ./pants jvm-platform-validate testprojects/src/java/org/pantsbuild/testproject/targetlevels/unspecified:lib testprojects/src/java/org/pantsbuild/testproject/targetlevels/unspecified:java7\r\n\r\n18:12:13 00:00 [main]\r\n               (To run a reporting server: ./pants server)\r\n18:12:14 00:01   [setup]\r\n18:12:14 00:01     [parse]\r\n               Executing tasks in goals: jvm-platform-validate\r\n18:12:14 00:01   [jvm-platform-validate]\r\n18:12:14 00:01     [jvm-platform-validate]\r\n                   Invalidated 2 targets.\r\nFAILURE: Dependencies cannot have a higher java target level than dependees!\r\n\r\n  testprojects/src/java/org/pantsbuild/testproject/targetlevels/unspecified:lib targeting \"java8\"\r\n  is depended on by: \r\n    testprojects/src/java/org/pantsbuild/testproject/targetlevels/unspecified:java7 targeting \"java7\"\r\n\r\nConsider running ./pants jvm-platform-explain with the same targets for more details.\r\n``` \r\n\r\n### Solution\r\n\r\n- Return `None` for `JvmTarget#platform` when it's not explicitly specified on the target.\r\n- Update all consumers of the `.platform` property to handle a `None` platform.\r\n- Increase the jvm default platform for the testprojects integration testing to `java8`.\r\n- Properly propagate any explicitly-specified jvm platform to intermediate jvm targets in the `jvm-platform-validate` task, and add a test case for this.\r\n  - This part is necessary to allow the non-eager evaluation of the target jvm platform when unspecified.\r\n\r\n### Result\r\n\r\n`JvmTarget`s which don't specify a platform can be depended on by targets which do, even if the default jvm platform is greater than the one explicitly specified on a target. When there is a conflict due to transitive constraints, the error message makes it clear where the constraint is coming from.","created_at":"2018-12-17T03:27:19Z","updated_at":"2018-12-17T05:35:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7ac00c6b72d7e2fc3581f61cfe5c631f38c412a7","assignee":null,"assignees":[],"requested_reviewers":[{"login":"baroquebobcat","id":7378,"node_id":"MDQ6VXNlcjczNzg=","avatar_url":"https://avatars0.githubusercontent.com/u/7378?v=4","gravatar_id":"","url":"https://api.github.com/users/baroquebobcat","html_url":"https://github.com/baroquebobcat","followers_url":"https://api.github.com/users/baroquebobcat/followers","following_url":"https://api.github.com/users/baroquebobcat/following{/other_user}","gists_url":"https://api.github.com/users/baroquebobcat/gists{/gist_id}","starred_url":"https://api.github.com/users/baroquebobcat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baroquebobcat/subscriptions","organizations_url":"https://api.github.com/users/baroquebobcat/orgs","repos_url":"https://api.github.com/users/baroquebobcat/repos","events_url":"https://api.github.com/users/baroquebobcat/events{/privacy}","received_events_url":"https://api.github.com/users/baroquebobcat/received_events","type":"User","site_admin":false},{"login":"stuhood","id":46740,"node_id":"MDQ6VXNlcjQ2NzQw","avatar_url":"https://avatars1.githubusercontent.com/u/46740?v=4","gravatar_id":"","url":"https://api.github.com/users/stuhood","html_url":"https://github.com/stuhood","followers_url":"https://api.github.com/users/stuhood/followers","following_url":"https://api.github.com/users/stuhood/following{/other_user}","gists_url":"https://api.github.com/users/stuhood/gists{/gist_id}","starred_url":"https://api.github.com/users/stuhood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stuhood/subscriptions","organizations_url":"https://api.github.com/users/stuhood/orgs","repos_url":"https://api.github.com/users/stuhood/repos","events_url":"https://api.github.com/users/stuhood/events{/privacy}","received_events_url":"https://api.github.com/users/stuhood/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pantsbuild/pants/pulls/6948/commits","review_comments_url":"https://api.github.com/repos/pantsbuild/pants/pulls/6948/comments","review_comment_url":"https://api.github.com/repos/pantsbuild/pants/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pantsbuild/pants/issues/6948/comments","statuses_url":"https://api.github.com/repos/pantsbuild/pants/statuses/5c16eef4ea6effe7758a12a903ec033eb3ac4bbd","head":{"label":"cosmicexplorer:fix-jvm-platform-order-dependence","ref":"fix-jvm-platform-order-dependence","sha":"5c16eef4ea6effe7758a12a903ec033eb3ac4bbd","user":{"login":"cosmicexplorer","id":1305167,"node_id":"MDQ6VXNlcjEzMDUxNjc=","avatar_url":"https://avatars1.githubusercontent.com/u/1305167?v=4","gravatar_id":"","url":"https://api.github.com/users/cosmicexplorer","html_url":"https://github.com/cosmicexplorer","followers_url":"https://api.github.com/users/cosmicexplorer/followers","following_url":"https://api.github.com/users/cosmicexplorer/following{/other_user}","gists_url":"https://api.github.com/users/cosmicexplorer/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmicexplorer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmicexplorer/subscriptions","organizations_url":"https://api.github.com/users/cosmicexplorer/orgs","repos_url":"https://api.github.com/users/cosmicexplorer/repos","events_url":"https://api.github.com/users/cosmicexplorer/events{/privacy}","received_events_url":"https://api.github.com/users/cosmicexplorer/received_events","type":"User","site_admin":false},"repo":{"id":59165183,"node_id":"MDEwOlJlcG9zaXRvcnk1OTE2NTE4Mw==","name":"pants","full_name":"cosmicexplorer/pants","private":false,"owner":{"login":"cosmicexplorer","id":1305167,"node_id":"MDQ6VXNlcjEzMDUxNjc=","avatar_url":"https://avatars1.githubusercontent.com/u/1305167?v=4","gravatar_id":"","url":"https://api.github.com/users/cosmicexplorer","html_url":"https://github.com/cosmicexplorer","followers_url":"https://api.github.com/users/cosmicexplorer/followers","following_url":"https://api.github.com/users/cosmicexplorer/following{/other_user}","gists_url":"https://api.github.com/users/cosmicexplorer/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmicexplorer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmicexplorer/subscriptions","organizations_url":"https://api.github.com/users/cosmicexplorer/orgs","repos_url":"https://api.github.com/users/cosmicexplorer/repos","events_url":"https://api.github.com/users/cosmicexplorer/events{/privacy}","received_events_url":"https://api.github.com/users/cosmicexplorer/received_events","type":"User","site_admin":false},"html_url":"https://github.com/cosmicexplorer/pants","description":"Pants Build System","fork":true,"url":"https://api.github.com/repos/cosmicexplorer/pants","forks_url":"https://api.github.com/repos/cosmicexplorer/pants/forks","keys_url":"https://api.github.com/repos/cosmicexplorer/pants/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cosmicexplorer/pants/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cosmicexplorer/pants/teams","hooks_url":"https://api.github.com/repos/cosmicexplorer/pants/hooks","issue_events_url":"https://api.github.com/repos/cosmicexplorer/pants/issues/events{/number}","events_url":"https://api.github.com/repos/cosmicexplorer/pants/events","assignees_url":"https://api.github.com/repos/cosmicexplorer/pants/assignees{/user}","branches_url":"https://api.github.com/repos/cosmicexplorer/pants/branches{/branch}","tags_url":"https://api.github.com/repos/cosmicexplorer/pants/tags","blobs_url":"https://api.github.com/repos/cosmicexplorer/pants/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cosmicexplorer/pants/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cosmicexplorer/pants/git/refs{/sha}","trees_url":"https://api.github.com/repos/cosmicexplorer/pants/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cosmicexplorer/pants/statuses/{sha}","languages_url":"https://api.github.com/repos/cosmicexplorer/pants/languages","stargazers_url":"https://api.github.com/repos/cosmicexplorer/pants/stargazers","contributors_url":"https://api.github.com/repos/cosmicexplorer/pants/contributors","subscribers_url":"https://api.github.com/repos/cosmicexplorer/pants/subscribers","subscription_url":"https://api.github.com/repos/cosmicexplorer/pants/subscription","commits_url":"https://api.github.com/repos/cosmicexplorer/pants/commits{/sha}","git_commits_url":"https://api.github.com/repos/cosmicexplorer/pants/git/commits{/sha}","comments_url":"https://api.github.com/repos/cosmicexplorer/pants/comments{/number}","issue_comment_url":"https://api.github.com/repos/cosmicexplorer/pants/issues/comments{/number}","contents_url":"https://api.github.com/repos/cosmicexplorer/pants/contents/{+path}","compare_url":"https://api.github.com/repos/cosmicexplorer/pants/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cosmicexplorer/pants/merges","archive_url":"https://api.github.com/repos/cosmicexplorer/pants/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cosmicexplorer/pants/downloads","issues_url":"https://api.github.com/repos/cosmicexplorer/pants/issues{/number}","pulls_url":"https://api.github.com/repos/cosmicexplorer/pants/pulls{/number}","milestones_url":"https://api.github.com/repos/cosmicexplorer/pants/milestones{/number}","notifications_url":"https://api.github.com/repos/cosmicexplorer/pants/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cosmicexplorer/pants/labels{/name}","releases_url":"https://api.github.com/repos/cosmicexplorer/pants/releases{/id}","deployments_url":"https://api.github.com/repos/cosmicexplorer/pants/deployments","created_at":"2016-05-19T01:53:21Z","updated_at":"2018-12-16T21:48:55Z","pushed_at":"2018-12-17T05:01:31Z","git_url":"git://github.com/cosmicexplorer/pants.git","ssh_url":"git@github.com:cosmicexplorer/pants.git","clone_url":"https://github.com/cosmicexplorer/pants.git","svn_url":"https://github.com/cosmicexplorer/pants","homepage":"http://pantsbuild.github.io/","size":91704,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pantsbuild:master","ref":"master","sha":"4d9a0b5f51a933c7d1c09fce0e9d9ee51a2fded9","user":{"login":"pantsbuild","id":3065172,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwNjUxNzI=","avatar_url":"https://avatars0.githubusercontent.com/u/3065172?v=4","gravatar_id":"","url":"https://api.github.com/users/pantsbuild","html_url":"https://github.com/pantsbuild","followers_url":"https://api.github.com/users/pantsbuild/followers","following_url":"https://api.github.com/users/pantsbuild/following{/other_user}","gists_url":"https://api.github.com/users/pantsbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/pantsbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pantsbuild/subscriptions","organizations_url":"https://api.github.com/users/pantsbuild/orgs","repos_url":"https://api.github.com/users/pantsbuild/repos","events_url":"https://api.github.com/users/pantsbuild/events{/privacy}","received_events_url":"https://api.github.com/users/pantsbuild/received_events","type":"Organization","site_admin":false},"repo":{"id":7209075,"node_id":"MDEwOlJlcG9zaXRvcnk3MjA5MDc1","name":"pants","full_name":"pantsbuild/pants","private":false,"owner":{"login":"pantsbuild","id":3065172,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMwNjUxNzI=","avatar_url":"https://avatars0.githubusercontent.com/u/3065172?v=4","gravatar_id":"","url":"https://api.github.com/users/pantsbuild","html_url":"https://github.com/pantsbuild","followers_url":"https://api.github.com/users/pantsbuild/followers","following_url":"https://api.github.com/users/pantsbuild/following{/other_user}","gists_url":"https://api.github.com/users/pantsbuild/gists{/gist_id}","starred_url":"https://api.github.com/users/pantsbuild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pantsbuild/subscriptions","organizations_url":"https://api.github.com/users/pantsbuild/orgs","repos_url":"https://api.github.com/users/pantsbuild/repos","events_url":"https://api.github.com/users/pantsbuild/events{/privacy}","received_events_url":"https://api.github.com/users/pantsbuild/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pantsbuild/pants","description":"The Pants Build System","fork":false,"url":"https://api.github.com/repos/pantsbuild/pants","forks_url":"https://api.github.com/repos/pantsbuild/pants/forks","keys_url":"https://api.github.com/repos/pantsbuild/pants/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pantsbuild/pants/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pantsbuild/pants/teams","hooks_url":"https://api.github.com/repos/pantsbuild/pants/hooks","issue_events_url":"https://api.github.com/repos/pantsbuild/pants/issues/events{/number}","events_url":"https://api.github.com/repos/pantsbuild/pants/events","assignees_url":"https://api.github.com/repos/pantsbuild/pants/assignees{/user}","branches_url":"https://api.github.com/repos/pantsbuild/pants/branches{/branch}","tags_url":"https://api.github.com/repos/pantsbuild/pants/tags","blobs_url":"https://api.github.com/repos/pantsbuild/pants/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pantsbuild/pants/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pantsbuild/pants/git/refs{/sha}","trees_url":"https://api.github.com/repos/pantsbuild/pants/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pantsbuild/pants/statuses/{sha}","languages_url":"https://api.github.com/repos/pantsbuild/pants/languages","stargazers_url":"https://api.github.com/repos/pantsbuild/pants/stargazers","contributors_url":"https://api.github.com/repos/pantsbuild/pants/contributors","subscribers_url":"https://api.github.com/repos/pantsbuild/pants/subscribers","subscription_url":"https://api.github.com/repos/pantsbuild/pants/subscription","commits_url":"https://api.github.com/repos/pantsbuild/pants/commits{/sha}","git_commits_url":"https://api.github.com/repos/pantsbuild/pants/git/commits{/sha}","comments_url":"https://api.github.com/repos/pantsbuild/pants/comments{/number}","issue_comment_url":"https://api.github.com/repos/pantsbuild/pants/issues/comments{/number}","contents_url":"https://api.github.com/repos/pantsbuild/pants/contents/{+path}","compare_url":"https://api.github.com/repos/pantsbuild/pants/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pantsbuild/pants/merges","archive_url":"https://api.github.com/repos/pantsbuild/pants/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pantsbuild/pants/downloads","issues_url":"https://api.github.com/repos/pantsbuild/pants/issues{/number}","pulls_url":"https://api.github.com/repos/pantsbuild/pants/pulls{/number}","milestones_url":"https://api.github.com/repos/pantsbuild/pants/milestones{/number}","notifications_url":"https://api.github.com/repos/pantsbuild/pants/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pantsbuild/pants/labels{/name}","releases_url":"https://api.github.com/repos/pantsbuild/pants/releases{/id}","deployments_url":"https://api.github.com/repos/pantsbuild/pants/deployments","created_at":"2012-12-17T17:39:04Z","updated_at":"2018-12-15T23:42:49Z","pushed_at":"2018-12-17T05:01:33Z","git_url":"git://github.com/pantsbuild/pants.git","ssh_url":"git@github.com:pantsbuild/pants.git","clone_url":"https://github.com/pantsbuild/pants.git","svn_url":"https://github.com/pantsbuild/pants","homepage":"http://pantsbuild.org/","size":89431,"stargazers_count":1063,"watchers_count":1063,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":309,"mirror_url":null,"archived":false,"open_issues_count":791,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":309,"open_issues":791,"watchers":1063,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pantsbuild/pants/pulls/6948"},"html":{"href":"https://github.com/pantsbuild/pants/pull/6948"},"issue":{"href":"https://api.github.com/repos/pantsbuild/pants/issues/6948"},"comments":{"href":"https://api.github.com/repos/pantsbuild/pants/issues/6948/comments"},"review_comments":{"href":"https://api.github.com/repos/pantsbuild/pants/pulls/6948/comments"},"review_comment":{"href":"https://api.github.com/repos/pantsbuild/pants/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pantsbuild/pants/pulls/6948/commits"},"statuses":{"href":"https://api.github.com/repos/pantsbuild/pants/statuses/5c16eef4ea6effe7758a12a903ec033eb3ac4bbd"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Eric-Arellano"}}