{"action":"created","comment":{"url":"https://api.github.com/repos/angular/clutz/pulls/comments/55872739","id":55872739,"diff_hunk":"@@ -409,14 +416,39 @@ private boolean isDefaultExport(TypedVar symbol) {\n         || symbol.getType().isFunctionType() || isTypedef(symbol.getType());\n   }\n \n-  // For platform externs we skip emitting .d.ts, to avoid collisions with lib.d.ts.\n-  // TODO(rado): Platform is too ill-defined, and this often filters too much.\n-  // Replace with a list of externs that *only* contain symbols in lib.d.ts.\n-  private boolean isPlatformExtern(String name) {\n-    name = name.replace(\"externs.zip//\", \"\");\n-    // mostly matching what is in https://github.com/google/closure-compiler/tree/master/externs.\n-    return Pattern.matches(\"javascript/externs/[^/]*.js\", name) || name.startsWith(\"es\")\n-        || name.startsWith(\"w3c\") || name.startsWith(\"ie_\") || name.startsWith(\"browser\");\n+  // For platform externs we skip emitting, to avoid collisions with lib.d.ts.\n+  private boolean isPlatformExtern(String filePath, String symbolName) {\n+    // Some symbols are not yet provided by lib.d.ts, so we have to emit them.\n+    if (emittedPlatformSymbols.contains(symbolName)) return false;\n+    // This matches our test setup.\n+    if (filePath.startsWith(\"externs.zip//\")) return true;\n+    String fileName = Iterables.getLast(Splitter.on(\"/\").split(filePath));","path":"src/main/java/com/google/javascript/clutz/DeclarationGenerator.java","position":null,"original_position":41,"commit_id":"4606e52931d7322fb70644e06b72548258aaa490","original_commit_id":"6e75d8dbeaede04e96d6b05149cb66d7f614ff30","user":{"login":"rkirov","id":95713,"avatar_url":"https://avatars.githubusercontent.com/u/95713?v=3","gravatar_id":"","url":"https://api.github.com/users/rkirov","html_url":"https://github.com/rkirov","followers_url":"https://api.github.com/users/rkirov/followers","following_url":"https://api.github.com/users/rkirov/following{/other_user}","gists_url":"https://api.github.com/users/rkirov/gists{/gist_id}","starred_url":"https://api.github.com/users/rkirov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkirov/subscriptions","organizations_url":"https://api.github.com/users/rkirov/orgs","repos_url":"https://api.github.com/users/rkirov/repos","events_url":"https://api.github.com/users/rkirov/events{/privacy}","received_events_url":"https://api.github.com/users/rkirov/received_events","type":"User","site_admin":false},"body":"done","created_at":"2016-03-11T19:03:30Z","updated_at":"2016-03-11T19:03:30Z","html_url":"https://github.com/angular/clutz/pull/259#discussion_r55872739","pull_request_url":"https://api.github.com/repos/angular/clutz/pulls/259","_links":{"self":{"href":"https://api.github.com/repos/angular/clutz/pulls/comments/55872739"},"html":{"href":"https://github.com/angular/clutz/pull/259#discussion_r55872739"},"pull_request":{"href":"https://api.github.com/repos/angular/clutz/pulls/259"}}},"pull_request":{"url":"https://api.github.com/repos/angular/clutz/pulls/259","id":62486195,"html_url":"https://github.com/angular/clutz/pull/259","diff_url":"https://github.com/angular/clutz/pull/259.diff","patch_url":"https://github.com/angular/clutz/pull/259.patch","issue_url":"https://api.github.com/repos/angular/clutz/issues/259","number":259,"state":"open","locked":false,"title":"tighten what is considered a platform extern.","user":{"login":"rkirov","id":95713,"avatar_url":"https://avatars.githubusercontent.com/u/95713?v=3","gravatar_id":"","url":"https://api.github.com/users/rkirov","html_url":"https://github.com/rkirov","followers_url":"https://api.github.com/users/rkirov/followers","following_url":"https://api.github.com/users/rkirov/following{/other_user}","gists_url":"https://api.github.com/users/rkirov/gists{/gist_id}","starred_url":"https://api.github.com/users/rkirov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rkirov/subscriptions","organizations_url":"https://api.github.com/users/rkirov/orgs","repos_url":"https://api.github.com/users/rkirov/repos","events_url":"https://api.github.com/users/rkirov/events{/privacy}","received_events_url":"https://api.github.com/users/rkirov/received_events","type":"User","site_admin":false},"body":"Adds an extra file general_with_platform.d.ts which will contain all\r\nexpected output from the platfrom externs.","created_at":"2016-03-11T01:44:06Z","updated_at":"2016-03-11T19:03:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2637a04557314e23b1d2528a74596cd454aeb1c","assignee":{"login":"mprobst","id":7208,"avatar_url":"https://avatars.githubusercontent.com/u/7208?v=3","gravatar_id":"","url":"https://api.github.com/users/mprobst","html_url":"https://github.com/mprobst","followers_url":"https://api.github.com/users/mprobst/followers","following_url":"https://api.github.com/users/mprobst/following{/other_user}","gists_url":"https://api.github.com/users/mprobst/gists{/gist_id}","starred_url":"https://api.github.com/users/mprobst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mprobst/subscriptions","organizations_url":"https://api.github.com/users/mprobst/orgs","repos_url":"https://api.github.com/users/mprobst/repos","events_url":"https://api.github.com/users/mprobst/events{/privacy}","received_events_url":"https://api.github.com/users/mprobst/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/angular/clutz/pulls/259/commits","review_comments_url":"https://api.github.com/repos/angular/clutz/pulls/259/comments","review_comment_url":"https://api.github.com/repos/angular/clutz/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/clutz/issues/259/comments","statuses_url":"https://api.github.com/repos/angular/clutz/statuses/4606e52931d7322fb70644e06b72548258aaa490","head":{"label":"angular:is_common_extern","ref":"is_common_extern","sha":"4606e52931d7322fb70644e06b72548258aaa490","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":31076984,"name":"clutz","full_name":"angular/clutz","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/clutz","description":"Closure to TypeScript `.d.ts` generator","fork":false,"url":"https://api.github.com/repos/angular/clutz","forks_url":"https://api.github.com/repos/angular/clutz/forks","keys_url":"https://api.github.com/repos/angular/clutz/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/clutz/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/clutz/teams","hooks_url":"https://api.github.com/repos/angular/clutz/hooks","issue_events_url":"https://api.github.com/repos/angular/clutz/issues/events{/number}","events_url":"https://api.github.com/repos/angular/clutz/events","assignees_url":"https://api.github.com/repos/angular/clutz/assignees{/user}","branches_url":"https://api.github.com/repos/angular/clutz/branches{/branch}","tags_url":"https://api.github.com/repos/angular/clutz/tags","blobs_url":"https://api.github.com/repos/angular/clutz/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/clutz/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/clutz/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/clutz/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/clutz/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/clutz/languages","stargazers_url":"https://api.github.com/repos/angular/clutz/stargazers","contributors_url":"https://api.github.com/repos/angular/clutz/contributors","subscribers_url":"https://api.github.com/repos/angular/clutz/subscribers","subscription_url":"https://api.github.com/repos/angular/clutz/subscription","commits_url":"https://api.github.com/repos/angular/clutz/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/clutz/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/clutz/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/clutz/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/clutz/contents/{+path}","compare_url":"https://api.github.com/repos/angular/clutz/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/clutz/merges","archive_url":"https://api.github.com/repos/angular/clutz/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/clutz/downloads","issues_url":"https://api.github.com/repos/angular/clutz/issues{/number}","pulls_url":"https://api.github.com/repos/angular/clutz/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/clutz/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/clutz/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/clutz/labels{/name}","releases_url":"https://api.github.com/repos/angular/clutz/releases{/id}","deployments_url":"https://api.github.com/repos/angular/clutz/deployments","created_at":"2015-02-20T17:52:24Z","updated_at":"2016-02-20T13:37:35Z","pushed_at":"2016-03-11T18:53:33Z","git_url":"git://github.com/angular/clutz.git","ssh_url":"git@github.com:angular/clutz.git","clone_url":"https://github.com/angular/clutz.git","svn_url":"https://github.com/angular/clutz","homepage":"","size":553,"stargazers_count":10,"watchers_count":10,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":24,"forks":1,"open_issues":24,"watchers":10,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"9a7d43ad87beb8448f1a7440a82f84a63c9f35e1","user":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":31076984,"name":"clutz","full_name":"angular/clutz","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars.githubusercontent.com/u/139426?v=3","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/clutz","description":"Closure to TypeScript `.d.ts` generator","fork":false,"url":"https://api.github.com/repos/angular/clutz","forks_url":"https://api.github.com/repos/angular/clutz/forks","keys_url":"https://api.github.com/repos/angular/clutz/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/clutz/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/clutz/teams","hooks_url":"https://api.github.com/repos/angular/clutz/hooks","issue_events_url":"https://api.github.com/repos/angular/clutz/issues/events{/number}","events_url":"https://api.github.com/repos/angular/clutz/events","assignees_url":"https://api.github.com/repos/angular/clutz/assignees{/user}","branches_url":"https://api.github.com/repos/angular/clutz/branches{/branch}","tags_url":"https://api.github.com/repos/angular/clutz/tags","blobs_url":"https://api.github.com/repos/angular/clutz/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/clutz/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/clutz/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/clutz/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/clutz/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/clutz/languages","stargazers_url":"https://api.github.com/repos/angular/clutz/stargazers","contributors_url":"https://api.github.com/repos/angular/clutz/contributors","subscribers_url":"https://api.github.com/repos/angular/clutz/subscribers","subscription_url":"https://api.github.com/repos/angular/clutz/subscription","commits_url":"https://api.github.com/repos/angular/clutz/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/clutz/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/clutz/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/clutz/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/clutz/contents/{+path}","compare_url":"https://api.github.com/repos/angular/clutz/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/clutz/merges","archive_url":"https://api.github.com/repos/angular/clutz/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/clutz/downloads","issues_url":"https://api.github.com/repos/angular/clutz/issues{/number}","pulls_url":"https://api.github.com/repos/angular/clutz/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/clutz/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/clutz/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/clutz/labels{/name}","releases_url":"https://api.github.com/repos/angular/clutz/releases{/id}","deployments_url":"https://api.github.com/repos/angular/clutz/deployments","created_at":"2015-02-20T17:52:24Z","updated_at":"2016-02-20T13:37:35Z","pushed_at":"2016-03-11T18:53:33Z","git_url":"git://github.com/angular/clutz.git","ssh_url":"git@github.com:angular/clutz.git","clone_url":"https://github.com/angular/clutz.git","svn_url":"https://github.com/angular/clutz","homepage":"","size":553,"stargazers_count":10,"watchers_count":10,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":24,"forks":1,"open_issues":24,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/clutz/pulls/259"},"html":{"href":"https://github.com/angular/clutz/pull/259"},"issue":{"href":"https://api.github.com/repos/angular/clutz/issues/259"},"comments":{"href":"https://api.github.com/repos/angular/clutz/issues/259/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/clutz/pulls/259/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/clutz/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/clutz/pulls/259/commits"},"statuses":{"href":"https://api.github.com/repos/angular/clutz/statuses/4606e52931d7322fb70644e06b72548258aaa490"}}}}