{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular/pulls/comments/67422068","id":67422068,"diff_hunk":"@@ -322,16 +328,57 @@ describe('StaticReflector', () => {\n         .toThrow(new Error(\n             'Recursion not supported, resolving symbol indirectRecursion in /tmp/src/function-reference.ts, resolving symbol  in /tmp/src/function-reference.ts'));\n   });\n+\n   it('should simplify a spread expression', () => {\n     expect(simplify(new StaticSymbol('/tmp/src/spread.ts', ''), {\n       __symbolic: 'reference',\n       name: 'spread'\n     })).toEqual([0, 1, 2, 3, 4, 5]);\n   });\n+\n+  it('should be able to get metadata from a ts file', () => {\n+    let metadata = reflector.getModuleMetadata('/tmp/src/custom-decorator-reference.ts');\n+    expect(metadata).toEqual({\n+      __symbolic: 'module',\n+      version: 1,\n+      metadata: {\n+        Foo: {\n+          __symbolic: 'class',\n+          decorators: [{\n+            __symbolic: 'call',\n+            expression:\n+                {__symbolic: 'reference', module: './custom-decorator', name: 'CustomDecorator'}\n+          }],\n+          members: {\n+            foo: [{\n+              __symbolic: 'property',\n+              decorators: [{\n+                __symbolic: 'call',\n+                expression: {\n+                  __symbolic: 'reference',\n+                  module: './custom-decorator',\n+                  name: 'CustomDecorator'\n+                }\n+              }]\n+            }]\n+          }\n+        }\n+      }\n+    });\n+  });\n+\n+  it('should be able to get metadata for a class containing a custom decorator', () => {\n+    let props = reflector.propMetadata(\n+        host.getStaticSymbol('/tmp/src/custom-decorator-reference.ts', 'Foo'));\n+    expect(props).toEqual({foo: []});\n+  });\n });\n \n class MockReflectorHost implements StaticReflectorHost {\n   private staticTypeCache = new Map<string, StaticSymbol>();\n+  private collector: MetadataCollector;\n+\n+  constructor() { this.collector = new MetadataCollector(); }","path":"modules/@angular/compiler-cli/test/static_reflector_spec.ts","position":null,"original_position":67,"commit_id":"b4a79a076aa15bb29537f39101745e69effbeb47","original_commit_id":"18dabb79eef509e9b3847ef734c5a8b49857e2e5","user":{"login":"chuckjaz","id":372013,"avatar_url":"https://avatars.githubusercontent.com/u/372013?v=3","gravatar_id":"","url":"https://api.github.com/users/chuckjaz","html_url":"https://github.com/chuckjaz","followers_url":"https://api.github.com/users/chuckjaz/followers","following_url":"https://api.github.com/users/chuckjaz/following{/other_user}","gists_url":"https://api.github.com/users/chuckjaz/gists{/gist_id}","starred_url":"https://api.github.com/users/chuckjaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuckjaz/subscriptions","organizations_url":"https://api.github.com/users/chuckjaz/orgs","repos_url":"https://api.github.com/users/chuckjaz/repos","events_url":"https://api.github.com/users/chuckjaz/events{/privacy}","received_events_url":"https://api.github.com/users/chuckjaz/received_events","type":"User","site_admin":false},"body":"Fixed the instantiation.\r\nDecided off-line that we should decide on a convention globally and stick to it. Right now we are inconsistent. This can be fixed with the conversion to the global convention.","created_at":"2016-06-16T20:54:04Z","updated_at":"2016-06-16T20:54:04Z","html_url":"https://github.com/angular/angular/pull/9266#discussion_r67422068","pull_request_url":"https://api.github.com/repos/angular/angular/pulls/9266","_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/comments/67422068"},"html":{"href":"https://github.com/angular/angular/pull/9266#discussion_r67422068"},"pull_request":{"href":"https://api.github.com/repos/angular/angular/pulls/9266"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular/pulls/9266","id":74116045,"html_url":"https://github.com/angular/angular/pull/9266","diff_url":"https://github.com/angular/angular/pull/9266.diff","patch_url":"https://github.com/angular/angular/pull/9266.patch","issue_url":"https://api.github.com/repos/angular/angular/issues/9266","number":9266,"state":"open","locked":false,"title":"fix(compiler): StaticReflector ignores unregistered decorators.","user":{"login":"chuckjaz","id":372013,"avatar_url":"https://avatars.githubusercontent.com/u/372013?v=3","gravatar_id":"","url":"https://api.github.com/users/chuckjaz","html_url":"https://github.com/chuckjaz","followers_url":"https://api.github.com/users/chuckjaz/followers","following_url":"https://api.github.com/users/chuckjaz/following{/other_user}","gists_url":"https://api.github.com/users/chuckjaz/gists{/gist_id}","starred_url":"https://api.github.com/users/chuckjaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuckjaz/subscriptions","organizations_url":"https://api.github.com/users/chuckjaz/orgs","repos_url":"https://api.github.com/users/chuckjaz/repos","events_url":"https://api.github.com/users/chuckjaz/events{/privacy}","received_events_url":"https://api.github.com/users/chuckjaz/received_events","type":"User","site_admin":false},"body":"**Please check if the PR fulfills these requirements**\r\n- [x] The commit message follows our guidelines: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit-message-format\r\n- [x] Tests for the changes have been added (for bug fixes / features)\r\n- [ ] Docs have been added / updated (for bug fixes / features)\r\n\r\n\r\n**What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)\r\n- [x] Bugfix\r\n- [ ] Feature\r\n- [ ] Code style update (formatting, local variables)\r\n- [ ] Refactoring (no functional changes, no api changes)\r\n- [ ] Build related changes\r\n- [ ] CI related changes\r\n- [ ] Other... Please describe:\r\n\r\n**What is the current behavior?** (You can also link to an open issue here)\r\n\r\n#9265\r\n\r\n**What is the new behavior?**\r\n\r\nUnrecognized decorators are ignored.\r\n\r\n**Does this PR introduce a breaking change?**\r\n- [ ] Yes\r\n- [x] No\r\n\r\n**Other information**:\r\n\r\n\r\nAlso modified static reflector to allow writing tests in using\r\nthe .ts and using the MetadataCollector.\r\n\r\nAlso made MetadataCollector be able to use SourceFiles that have\r\nnot been bound (that is, don't have the parent property set).\r\n\r\nFixes #9182\r\nFixes #9265","created_at":"2016-06-16T16:58:23Z","updated_at":"2016-06-16T20:54:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0dfce52b05053a1bde1862b7727443900cc4d01","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/angular/angular/pulls/9266/commits","review_comments_url":"https://api.github.com/repos/angular/angular/pulls/9266/comments","review_comment_url":"https://api.github.com/repos/angular/angular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular/issues/9266/comments","statuses_url":"https://api.github.com/repos/angular/angular/statuses/b4a79a076aa15bb29537f39101745e69effbeb47","head":{"label":"chuckjaz:issue9182","ref":"issue9182","sha":"b4a79a076aa15bb29537f39101745e69effbeb47","user":{"login":"chuckjaz","id":372013,"avatar_url":"https://avatars.githubusercontent.com/u/372013?v=3","gravatar_id":"","url":"https://api.github.com/users/chuckjaz","html_url":"https://github.com/chuckjaz","followers_url":"https://api.github.com/users/chuckjaz/followers","following_url":"https://api.github.com/users/chuckjaz/following{/other_user}","gists_url":"https://api.github.com/users/chuckjaz/gists{/gist_id}","starred_url":"https://api.github.com/users/chuckjaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuckjaz/subscriptions","organizations_url":"https://api.github.com/users/chuckjaz/orgs","repos_url":"https://api.github.com/users/chuckjaz/repos","events_url":"https://api.github.com/users/chuckjaz/events{/privacy}","received_events_url":"https://api.github.com/users/chuckjaz/received_events","type":"User","site_admin":false},"repo":{"id":50690962,"name":"angular","full_name":"chuckjaz/angular","owner":{"login":"chuckjaz","id":372013,"avatar_url":"https://avatars.githubusercontent.com/u/372013?v=3","gravatar_id":"","url":"https://api.github.com/users/chuckjaz","html_url":"https://github.com/chuckjaz","followers_url":"https://api.github.com/users/chuckjaz/followers","following_url":"https://api.github.com/users/chuckjaz/following{/other_user}","gists_url":"https://api.github.com/users/chuckjaz/gists{/gist_id}","starred_url":"https://api.github.com/users/chuckjaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuckjaz/subscriptions","organizations_url":"https://api.github.com/users/chuckjaz/orgs","repos_url":"https://api.github.com/users/chuckjaz/repos","events_url":"https://api.github.com/users/chuckjaz/events{/privacy}","received_events_url":"https://api.github.com/users/chuckjaz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chuckjaz/angular","description":"","fork":true,"url":"https://api.github.com/repos/chuckjaz/angular","forks_url":"https://api.github.com/repos/chuckjaz/angular/forks","keys_url":"https://api.github.com/repos/chuckjaz/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chuckjaz/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chuckjaz/angular/teams","hooks_url":"https://api.github.com/repos/chuckjaz/angular/hooks","issue_events_url":"https://api.github.com/repos/chuckjaz/angular/issues/events{/number}","events_url":"https://api.github.com/repos/chuckjaz/angular/events","assignees_url":"https://api.github.com/repos/chuckjaz/angular/assignees{/user}","branches_url":"https://api.github.com/repos/chuckjaz/angular/branches{/branch}","tags_url":"https://api.github.com/repos/chuckjaz/angular/tags","blobs_url":"https://api.github.com/repos/chuckjaz/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chuckjaz/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chuckjaz/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/chuckjaz/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chuckjaz/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/chuckjaz/angular/languages","stargazers_url":"https://api.github.com/repos/chuckjaz/angular/stargazers","contributors_url":"https://api.github.com/repos/chuckjaz/angular/contributors","subscribers_url":"https://api.github.com/repos/chuckjaz/angular/subscribers","subscription_url":"https://api.github.com/repos/chuckjaz/angular/subscription","commits_url":"https://api.github.com/repos/chuckjaz/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/chuckjaz/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/chuckjaz/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/chuckjaz/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/chuckjaz/angular/contents/{+path}","compare_url":"https://api.github.com/repos/chuckjaz/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chuckjaz/angular/merges","archive_url":"https://api.github.com/repos/chuckjaz/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chuckjaz/angular/downloads","issues_url":"https://api.github.com/repos/chuckjaz/angular/issues{/number}","pulls_url":"https://api.github.com/repos/chuckjaz/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/chuckjaz/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/chuckjaz/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chuckjaz/angular/labels{/name}","releases_url":"https://api.github.com/repos/chuckjaz/angular/releases{/id}","deployments_url":"https://api.github.com/repos/chuckjaz/angular/deployments","created_at":"2016-01-29T21:00:52Z","updated_at":"2016-01-29T21:01:07Z","pushed_at":"2016-06-16T20:52:33Z","git_url":"git://github.com/chuckjaz/angular.git","ssh_url":"git@github.com:chuckjaz/angular.git","clone_url":"https://github.com/chuckjaz/angular.git","svn_url":"https://github.com/chuckjaz/angular","homepage":"https://angular.io","size":145076,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"a3f6e1988144865bfe3ec1c30cffa58582d29655","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-06-16T20:43:02Z","pushed_at":"2016-06-16T20:52:35Z","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":624630,"stargazers_count":12918,"watchers_count":12918,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3340,"mirror_url":null,"open_issues_count":1386,"forks":3340,"open_issues":1386,"watchers":12918,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/9266"},"html":{"href":"https://github.com/angular/angular/pull/9266"},"issue":{"href":"https://api.github.com/repos/angular/angular/issues/9266"},"comments":{"href":"https://api.github.com/repos/angular/angular/issues/9266/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular/pulls/9266/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular/pulls/9266/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular/statuses/b4a79a076aa15bb29537f39101745e69effbeb47"}}}}
{"actor":{"display_login":"chuckjaz"}}