{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular/pulls/comments/61980600","id":61980600,"diff_hunk":"@@ -32,26 +32,69 @@ export abstract class DelegatingHost implements ts.CompilerHost {\n export class TsickleHost extends DelegatingHost {\n   // Additional diagnostics gathered by pre- and post-emit transformations.\n   public diagnostics: ts.Diagnostic[] = [];\n+  // tsickle wants to use the program even though the reference usually goes the other way\n+  public program: ts.Program;\n   private TSICKLE_SUPPORT = `\n interface DecoratorInvocation {\n   type: Function;\n   args?: any[];\n }\n `;\n-  constructor(delegate: ts.CompilerHost, private options: ts.CompilerOptions) { super(delegate); }\n+  constructor(delegate: ts.CompilerHost, private options: ts.CompilerOptions,\n+              private ngOptions: AngularCompilerOptions) {\n+    super(delegate);\n+  }\n \n   getSourceFile =\n       (fileName: string, languageVersion: ts.ScriptTarget, onError?: (message: string) => void) => {\n-        const originalContent = this.delegate.readFile(fileName);\n-        let newContent = originalContent;\n-        if (!/\\.d\\.ts$/.test(fileName)) {\n-          const converted = convertDecorators(fileName, originalContent);\n+        let originalContent = this.delegate.readFile(fileName);\n+        if (/\\.d\\.ts$/.test(fileName)) {\n+          return ts.createSourceFile(fileName, originalContent, languageVersion, true);\n+        } else {\n+          let firstPass = originalContent;\n+          if (this.ngOptions.googleClosureOutput) {\n+            const annotateResult =\n+                tsickle.annotate(this.program, this.program.getSourceFile(fileName), {});","path":"modules/@angular/compiler_cli/src/compiler_host.ts","position":39,"original_position":39,"commit_id":"37e8b403f7d6738a65916601199cd3fb38debce6","original_commit_id":"37e8b403f7d6738a65916601199cd3fb38debce6","user":{"login":"martine","id":3847,"avatar_url":"https://avatars.githubusercontent.com/u/3847?v=3","gravatar_id":"","url":"https://api.github.com/users/martine","html_url":"https://github.com/martine","followers_url":"https://api.github.com/users/martine/followers","following_url":"https://api.github.com/users/martine/following{/other_user}","gists_url":"https://api.github.com/users/martine/gists{/gist_id}","starred_url":"https://api.github.com/users/martine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martine/subscriptions","organizations_url":"https://api.github.com/users/martine/orgs","repos_url":"https://api.github.com/users/martine/repos","events_url":"https://api.github.com/users/martine/events{/privacy}","received_events_url":"https://api.github.com/users/martine/received_events","type":"User","site_admin":false},"body":"Pass `untyped:true` here in the final argument.","created_at":"2016-05-04T01:06:44Z","updated_at":"2016-05-04T01:06:44Z","html_url":"https://github.com/angular/angular/pull/8444#discussion_r61980600","pull_request_url":"https://api.github.com/repos/angular/angular/pulls/8444","_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/comments/61980600"},"html":{"href":"https://github.com/angular/angular/pull/8444#discussion_r61980600"},"pull_request":{"href":"https://api.github.com/repos/angular/angular/pulls/8444"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular/pulls/8444","id":68783843,"html_url":"https://github.com/angular/angular/pull/8444","diff_url":"https://github.com/angular/angular/pull/8444.diff","patch_url":"https://github.com/angular/angular/pull/8444.patch","issue_url":"https://api.github.com/repos/angular/angular/issues/8444","number":8444,"state":"open","locked":false,"title":"HACK: offline compiler with closure bundle/minify","user":{"login":"alexeagle","id":47395,"avatar_url":"https://avatars.githubusercontent.com/u/47395?v=3","gravatar_id":"","url":"https://api.github.com/users/alexeagle","html_url":"https://github.com/alexeagle","followers_url":"https://api.github.com/users/alexeagle/followers","following_url":"https://api.github.com/users/alexeagle/following{/other_user}","gists_url":"https://api.github.com/users/alexeagle/gists{/gist_id}","starred_url":"https://api.github.com/users/alexeagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexeagle/subscriptions","organizations_url":"https://api.github.com/users/alexeagle/orgs","repos_url":"https://api.github.com/users/alexeagle/repos","events_url":"https://api.github.com/users/alexeagle/events{/privacy}","received_events_url":"https://api.github.com/users/alexeagle/received_events","type":"User","site_admin":false},"body":"notes to get it working\r\n\r\ngrab this tsickle patch https://reviews.angular.io/D107\r\nget the tsickle change into local angular\r\n\r\n$ NODE_PATH=$NODE_PATH:./dist/all\r\n$ ./build.sh\r\n\r\nnow dist/dist-packages/*/esm/*/*.js is closure-compatible ES6\r\n\r\n","created_at":"2016-05-03T22:12:13Z","updated_at":"2016-05-04T01:06:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b5c934a5f85adc5fa87c37c981ed6aa870f05a07","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/angular/angular/pulls/8444/commits","review_comments_url":"https://api.github.com/repos/angular/angular/pulls/8444/comments","review_comment_url":"https://api.github.com/repos/angular/angular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular/issues/8444/comments","statuses_url":"https://api.github.com/repos/angular/angular/statuses/37e8b403f7d6738a65916601199cd3fb38debce6","head":{"label":"alexeagle:compiler_cli","ref":"compiler_cli","sha":"37e8b403f7d6738a65916601199cd3fb38debce6","user":{"login":"alexeagle","id":47395,"avatar_url":"https://avatars.githubusercontent.com/u/47395?v=3","gravatar_id":"","url":"https://api.github.com/users/alexeagle","html_url":"https://github.com/alexeagle","followers_url":"https://api.github.com/users/alexeagle/followers","following_url":"https://api.github.com/users/alexeagle/following{/other_user}","gists_url":"https://api.github.com/users/alexeagle/gists{/gist_id}","starred_url":"https://api.github.com/users/alexeagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexeagle/subscriptions","organizations_url":"https://api.github.com/users/alexeagle/orgs","repos_url":"https://api.github.com/users/alexeagle/repos","events_url":"https://api.github.com/users/alexeagle/events{/privacy}","received_events_url":"https://api.github.com/users/alexeagle/received_events","type":"User","site_admin":false},"repo":{"id":30215210,"name":"angular","full_name":"alexeagle/angular","owner":{"login":"alexeagle","id":47395,"avatar_url":"https://avatars.githubusercontent.com/u/47395?v=3","gravatar_id":"","url":"https://api.github.com/users/alexeagle","html_url":"https://github.com/alexeagle","followers_url":"https://api.github.com/users/alexeagle/followers","following_url":"https://api.github.com/users/alexeagle/following{/other_user}","gists_url":"https://api.github.com/users/alexeagle/gists{/gist_id}","starred_url":"https://api.github.com/users/alexeagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexeagle/subscriptions","organizations_url":"https://api.github.com/users/alexeagle/orgs","repos_url":"https://api.github.com/users/alexeagle/repos","events_url":"https://api.github.com/users/alexeagle/events{/privacy}","received_events_url":"https://api.github.com/users/alexeagle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alexeagle/angular","description":"","fork":true,"url":"https://api.github.com/repos/alexeagle/angular","forks_url":"https://api.github.com/repos/alexeagle/angular/forks","keys_url":"https://api.github.com/repos/alexeagle/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alexeagle/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alexeagle/angular/teams","hooks_url":"https://api.github.com/repos/alexeagle/angular/hooks","issue_events_url":"https://api.github.com/repos/alexeagle/angular/issues/events{/number}","events_url":"https://api.github.com/repos/alexeagle/angular/events","assignees_url":"https://api.github.com/repos/alexeagle/angular/assignees{/user}","branches_url":"https://api.github.com/repos/alexeagle/angular/branches{/branch}","tags_url":"https://api.github.com/repos/alexeagle/angular/tags","blobs_url":"https://api.github.com/repos/alexeagle/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alexeagle/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alexeagle/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/alexeagle/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alexeagle/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/alexeagle/angular/languages","stargazers_url":"https://api.github.com/repos/alexeagle/angular/stargazers","contributors_url":"https://api.github.com/repos/alexeagle/angular/contributors","subscribers_url":"https://api.github.com/repos/alexeagle/angular/subscribers","subscription_url":"https://api.github.com/repos/alexeagle/angular/subscription","commits_url":"https://api.github.com/repos/alexeagle/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/alexeagle/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/alexeagle/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/alexeagle/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/alexeagle/angular/contents/{+path}","compare_url":"https://api.github.com/repos/alexeagle/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alexeagle/angular/merges","archive_url":"https://api.github.com/repos/alexeagle/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alexeagle/angular/downloads","issues_url":"https://api.github.com/repos/alexeagle/angular/issues{/number}","pulls_url":"https://api.github.com/repos/alexeagle/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/alexeagle/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/alexeagle/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alexeagle/angular/labels{/name}","releases_url":"https://api.github.com/repos/alexeagle/angular/releases{/id}","deployments_url":"https://api.github.com/repos/alexeagle/angular/deployments","created_at":"2015-02-02T23:49:55Z","updated_at":"2016-01-15T21:33:18Z","pushed_at":"2016-05-04T01:01:18Z","git_url":"git://github.com/alexeagle/angular.git","ssh_url":"git@github.com:alexeagle/angular.git","clone_url":"https://github.com/alexeagle/angular.git","svn_url":"https://github.com/alexeagle/angular","homepage":null,"size":154496,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"9485f5a81363a49ad5f5fc4a0bdd20ed94f6c6d8","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":24195339,"name":"angular","full_name":"angular/angular","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/angular","description":"","fork":false,"url":"https://api.github.com/repos/angular/angular","forks_url":"https://api.github.com/repos/angular/angular/forks","keys_url":"https://api.github.com/repos/angular/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular/teams","hooks_url":"https://api.github.com/repos/angular/angular/hooks","issue_events_url":"https://api.github.com/repos/angular/angular/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular/events","assignees_url":"https://api.github.com/repos/angular/angular/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular/tags","blobs_url":"https://api.github.com/repos/angular/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular/languages","stargazers_url":"https://api.github.com/repos/angular/angular/stargazers","contributors_url":"https://api.github.com/repos/angular/angular/contributors","subscribers_url":"https://api.github.com/repos/angular/angular/subscribers","subscription_url":"https://api.github.com/repos/angular/angular/subscription","commits_url":"https://api.github.com/repos/angular/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/angular/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular/merges","archive_url":"https://api.github.com/repos/angular/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular/downloads","issues_url":"https://api.github.com/repos/angular/angular/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular/releases{/id}","deployments_url":"https://api.github.com/repos/angular/angular/deployments","created_at":"2014-09-18T16:12:01Z","updated_at":"2016-05-04T00:17:15Z","pushed_at":"2016-05-04T01:04:54Z","git_url":"git://github.com/angular/angular.git","ssh_url":"git@github.com:angular/angular.git","clone_url":"https://github.com/angular/angular.git","svn_url":"https://github.com/angular/angular","homepage":"https://angular.io","size":590693,"stargazers_count":11398,"watchers_count":11398,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2971,"mirror_url":null,"open_issues_count":1581,"forks":2971,"open_issues":1581,"watchers":11398,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/8444"},"html":{"href":"https://github.com/angular/angular/pull/8444"},"issue":{"href":"https://api.github.com/repos/angular/angular/issues/8444"},"comments":{"href":"https://api.github.com/repos/angular/angular/issues/8444/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular/pulls/8444/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular/pulls/8444/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular/statuses/37e8b403f7d6738a65916601199cd3fb38debce6"}}}}