{"action":"created","comment":{"url":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/83545673","pull_request_review_id":1984212,"id":83545673,"diff_hunk":"@@ -127,9 +135,86 @@ Container.prototype = {\n    */\n   lookupFactory(fullName, options) {\n     assert('fullName must be a proper full name', this.registry.validateFullName(fullName));\n+\n+    if (isFeatureEnabled('container-factoryFor')) {\n+      deprecate('Using \"_lookupFactory\" is deprecated. Please use container.factoryFor instead.', false, { id: 'container-lookupFactory', until: '2.12.0', url: 'TODO' });\n+    }\n+\n     return factoryFor(this, this.registry.normalize(fullName), options);\n   },\n \n+  factoryFor(fullName, options = {}) {\n+    let container = this;\n+    let normalizedName = this.registry.normalize(fullName);\n+    assert('fullName must be a proper full name', this.registry.validateFullName(normalizedName));\n+\n+    if (options.source) {\n+      normalizedName = this.registry.expandLocalLookup(fullName, options);\n+      // if expandLocalLookup returns falsey, we do not support local lookup\n+      if (!normalizedName) { return; }\n+    }\n+\n+    let factory = this.registry.resolve(normalizedName);\n+\n+    if (factory === undefined) { return; }\n+\n+    let manager = {\n+      class: factory,\n+      create(options = {}) {","path":"packages/container/lib/container.js","position":48,"original_position":48,"commit_id":"f3ecc625c08b9276e0afcddc5a39cbf1b71781cd","original_commit_id":"f3ecc625c08b9276e0afcddc5a39cbf1b71781cd","user":{"login":"mixonic","id":8752,"avatar_url":"https://avatars.githubusercontent.com/u/8752?v=3","gravatar_id":"","url":"https://api.github.com/users/mixonic","html_url":"https://github.com/mixonic","followers_url":"https://api.github.com/users/mixonic/followers","following_url":"https://api.github.com/users/mixonic/following{/other_user}","gists_url":"https://api.github.com/users/mixonic/gists{/gist_id}","starred_url":"https://api.github.com/users/mixonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mixonic/subscriptions","organizations_url":"https://api.github.com/users/mixonic/orgs","repos_url":"https://api.github.com/users/mixonic/repos","events_url":"https://api.github.com/users/mixonic/events{/privacy}","received_events_url":"https://api.github.com/users/mixonic/received_events","type":"User","site_admin":false},"body":"I expected the implementation here to be\r\n\r\n```js\r\nlet factory = this._lookupFactory(name);\r\nreturn factory.create(options);\r\n```\r\n\r\nfor the initial pass of `factoryFor` `create` per https://github.com/emberjs/rfcs/blob/master/text/0000-factoryFor.md#detailed-design. Additionally https://github.com/emberjs/rfcs/blob/master/text/0000-factoryFor.md#development-mode-proxy. In practice literally implementing as `_lookupFactory(name).create(props)` might not work, but it seems like it should and would preserve the double-extend behavior during instance creation. We should decide if this is really needed, will raise it in some conversations.","created_at":"2016-10-16T05:35:33Z","updated_at":"2016-10-16T05:43:33Z","html_url":"https://github.com/emberjs/ember.js/pull/14360#discussion_r83545673","pull_request_url":"https://api.github.com/repos/emberjs/ember.js/pulls/14360","_links":{"self":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/comments/83545673"},"html":{"href":"https://github.com/emberjs/ember.js/pull/14360#discussion_r83545673"},"pull_request":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/14360"}}},"pull_request":{"url":"https://api.github.com/repos/emberjs/ember.js/pulls/14360","id":86829730,"html_url":"https://github.com/emberjs/ember.js/pull/14360","diff_url":"https://github.com/emberjs/ember.js/pull/14360.diff","patch_url":"https://github.com/emberjs/ember.js/pull/14360.patch","issue_url":"https://api.github.com/repos/emberjs/ember.js/issues/14360","number":14360,"state":"open","locked":false,"title":"[Feature] FactoryFor","user":{"login":"chadhietala","id":183799,"avatar_url":"https://avatars.githubusercontent.com/u/183799?v=3","gravatar_id":"","url":"https://api.github.com/users/chadhietala","html_url":"https://github.com/chadhietala","followers_url":"https://api.github.com/users/chadhietala/followers","following_url":"https://api.github.com/users/chadhietala/following{/other_user}","gists_url":"https://api.github.com/users/chadhietala/gists{/gist_id}","starred_url":"https://api.github.com/users/chadhietala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadhietala/subscriptions","organizations_url":"https://api.github.com/users/chadhietala/orgs","repos_url":"https://api.github.com/users/chadhietala/repos","events_url":"https://api.github.com/users/chadhietala/events{/privacy}","received_events_url":"https://api.github.com/users/chadhietala/received_events","type":"User","site_admin":false},"body":"See https://github.com/mixonic/rfcs/blob/factoryFor/text/0000-factoryFor.md\r\n\r\nI don't expect this to land until after the FCP period. I would like to add a cache in front of the injection lookups, but it should be measured.\r\n\r\nI will create another commit that pulls this new api through Ember.","created_at":"2016-09-26T22:18:49Z","updated_at":"2016-10-16T06:00:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2227648ba9effdb9fa39bba2bb04d2608db4e38b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/emberjs/ember.js/pulls/14360/commits","review_comments_url":"https://api.github.com/repos/emberjs/ember.js/pulls/14360/comments","review_comment_url":"https://api.github.com/repos/emberjs/ember.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/emberjs/ember.js/issues/14360/comments","statuses_url":"https://api.github.com/repos/emberjs/ember.js/statuses/f3ecc625c08b9276e0afcddc5a39cbf1b71781cd","head":{"label":"chadhietala:double-extend","ref":"double-extend","sha":"f3ecc625c08b9276e0afcddc5a39cbf1b71781cd","user":{"login":"chadhietala","id":183799,"avatar_url":"https://avatars.githubusercontent.com/u/183799?v=3","gravatar_id":"","url":"https://api.github.com/users/chadhietala","html_url":"https://github.com/chadhietala","followers_url":"https://api.github.com/users/chadhietala/followers","following_url":"https://api.github.com/users/chadhietala/following{/other_user}","gists_url":"https://api.github.com/users/chadhietala/gists{/gist_id}","starred_url":"https://api.github.com/users/chadhietala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadhietala/subscriptions","organizations_url":"https://api.github.com/users/chadhietala/orgs","repos_url":"https://api.github.com/users/chadhietala/repos","events_url":"https://api.github.com/users/chadhietala/events{/privacy}","received_events_url":"https://api.github.com/users/chadhietala/received_events","type":"User","site_admin":false},"repo":{"id":22746792,"name":"ember.js","full_name":"chadhietala/ember.js","owner":{"login":"chadhietala","id":183799,"avatar_url":"https://avatars.githubusercontent.com/u/183799?v=3","gravatar_id":"","url":"https://api.github.com/users/chadhietala","html_url":"https://github.com/chadhietala","followers_url":"https://api.github.com/users/chadhietala/followers","following_url":"https://api.github.com/users/chadhietala/following{/other_user}","gists_url":"https://api.github.com/users/chadhietala/gists{/gist_id}","starred_url":"https://api.github.com/users/chadhietala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chadhietala/subscriptions","organizations_url":"https://api.github.com/users/chadhietala/orgs","repos_url":"https://api.github.com/users/chadhietala/repos","events_url":"https://api.github.com/users/chadhietala/events{/privacy}","received_events_url":"https://api.github.com/users/chadhietala/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chadhietala/ember.js","description":"Ember.js - A JavaScript framework for creating ambitious web applications","fork":true,"url":"https://api.github.com/repos/chadhietala/ember.js","forks_url":"https://api.github.com/repos/chadhietala/ember.js/forks","keys_url":"https://api.github.com/repos/chadhietala/ember.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chadhietala/ember.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chadhietala/ember.js/teams","hooks_url":"https://api.github.com/repos/chadhietala/ember.js/hooks","issue_events_url":"https://api.github.com/repos/chadhietala/ember.js/issues/events{/number}","events_url":"https://api.github.com/repos/chadhietala/ember.js/events","assignees_url":"https://api.github.com/repos/chadhietala/ember.js/assignees{/user}","branches_url":"https://api.github.com/repos/chadhietala/ember.js/branches{/branch}","tags_url":"https://api.github.com/repos/chadhietala/ember.js/tags","blobs_url":"https://api.github.com/repos/chadhietala/ember.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chadhietala/ember.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chadhietala/ember.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/chadhietala/ember.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chadhietala/ember.js/statuses/{sha}","languages_url":"https://api.github.com/repos/chadhietala/ember.js/languages","stargazers_url":"https://api.github.com/repos/chadhietala/ember.js/stargazers","contributors_url":"https://api.github.com/repos/chadhietala/ember.js/contributors","subscribers_url":"https://api.github.com/repos/chadhietala/ember.js/subscribers","subscription_url":"https://api.github.com/repos/chadhietala/ember.js/subscription","commits_url":"https://api.github.com/repos/chadhietala/ember.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/chadhietala/ember.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/chadhietala/ember.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/chadhietala/ember.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/chadhietala/ember.js/contents/{+path}","compare_url":"https://api.github.com/repos/chadhietala/ember.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chadhietala/ember.js/merges","archive_url":"https://api.github.com/repos/chadhietala/ember.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chadhietala/ember.js/downloads","issues_url":"https://api.github.com/repos/chadhietala/ember.js/issues{/number}","pulls_url":"https://api.github.com/repos/chadhietala/ember.js/pulls{/number}","milestones_url":"https://api.github.com/repos/chadhietala/ember.js/milestones{/number}","notifications_url":"https://api.github.com/repos/chadhietala/ember.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chadhietala/ember.js/labels{/name}","releases_url":"https://api.github.com/repos/chadhietala/ember.js/releases{/id}","deployments_url":"https://api.github.com/repos/chadhietala/ember.js/deployments","created_at":"2014-08-08T05:15:30Z","updated_at":"2014-12-11T18:19:26Z","pushed_at":"2016-10-15T19:44:27Z","git_url":"git://github.com/chadhietala/ember.js.git","ssh_url":"git@github.com:chadhietala/ember.js.git","clone_url":"https://github.com/chadhietala/ember.js.git","svn_url":"https://github.com/chadhietala/ember.js","homepage":"http://www.emberjs.com","size":34766,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"emberjs:master","ref":"master","sha":"77c51f6e80322c9f0bd189be6c3c7bb5054a1bd1","user":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"repo":{"id":1801829,"name":"ember.js","full_name":"emberjs/ember.js","owner":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/emberjs/ember.js","description":"Ember.js - A JavaScript framework for creating ambitious web applications","fork":false,"url":"https://api.github.com/repos/emberjs/ember.js","forks_url":"https://api.github.com/repos/emberjs/ember.js/forks","keys_url":"https://api.github.com/repos/emberjs/ember.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emberjs/ember.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emberjs/ember.js/teams","hooks_url":"https://api.github.com/repos/emberjs/ember.js/hooks","issue_events_url":"https://api.github.com/repos/emberjs/ember.js/issues/events{/number}","events_url":"https://api.github.com/repos/emberjs/ember.js/events","assignees_url":"https://api.github.com/repos/emberjs/ember.js/assignees{/user}","branches_url":"https://api.github.com/repos/emberjs/ember.js/branches{/branch}","tags_url":"https://api.github.com/repos/emberjs/ember.js/tags","blobs_url":"https://api.github.com/repos/emberjs/ember.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emberjs/ember.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emberjs/ember.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/emberjs/ember.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emberjs/ember.js/statuses/{sha}","languages_url":"https://api.github.com/repos/emberjs/ember.js/languages","stargazers_url":"https://api.github.com/repos/emberjs/ember.js/stargazers","contributors_url":"https://api.github.com/repos/emberjs/ember.js/contributors","subscribers_url":"https://api.github.com/repos/emberjs/ember.js/subscribers","subscription_url":"https://api.github.com/repos/emberjs/ember.js/subscription","commits_url":"https://api.github.com/repos/emberjs/ember.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/emberjs/ember.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/emberjs/ember.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/emberjs/ember.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/emberjs/ember.js/contents/{+path}","compare_url":"https://api.github.com/repos/emberjs/ember.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emberjs/ember.js/merges","archive_url":"https://api.github.com/repos/emberjs/ember.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emberjs/ember.js/downloads","issues_url":"https://api.github.com/repos/emberjs/ember.js/issues{/number}","pulls_url":"https://api.github.com/repos/emberjs/ember.js/pulls{/number}","milestones_url":"https://api.github.com/repos/emberjs/ember.js/milestones{/number}","notifications_url":"https://api.github.com/repos/emberjs/ember.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emberjs/ember.js/labels{/name}","releases_url":"https://api.github.com/repos/emberjs/ember.js/releases{/id}","deployments_url":"https://api.github.com/repos/emberjs/ember.js/deployments","created_at":"2011-05-25T23:39:40Z","updated_at":"2016-10-16T02:25:04Z","pushed_at":"2016-10-15T19:49:08Z","git_url":"git://github.com/emberjs/ember.js.git","ssh_url":"git@github.com:emberjs/ember.js.git","clone_url":"https://github.com/emberjs/ember.js.git","svn_url":"https://github.com/emberjs/ember.js","homepage":"http://www.emberjs.com","size":80651,"stargazers_count":16946,"watchers_count":16946,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3590,"mirror_url":null,"open_issues_count":284,"forks":3590,"open_issues":284,"watchers":16946,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/14360"},"html":{"href":"https://github.com/emberjs/ember.js/pull/14360"},"issue":{"href":"https://api.github.com/repos/emberjs/ember.js/issues/14360"},"comments":{"href":"https://api.github.com/repos/emberjs/ember.js/issues/14360/comments"},"review_comments":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/14360/comments"},"review_comment":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/emberjs/ember.js/pulls/14360/commits"},"statuses":{"href":"https://api.github.com/repos/emberjs/ember.js/statuses/f3ecc625c08b9276e0afcddc5a39cbf1b71781cd"}}}}
{"actor":{"display_login":"mixonic"}}