{"action":"created","comment":{"url":"https://api.github.com/repos/AliSoftware/Dip/pulls/comments/45451390","id":45451390,"diff_hunk":"@@ -50,20 +50,62 @@ func ==(lhs: DefinitionKey, rhs: DefinitionKey) -> Bool {\n public enum ComponentScope {\n   /// Indicates that a new instance of the component will be created each time it's resolved.\n   case Prototype\n+  /// Indicates that instances will be reused during resolve but will be discurded when topmost `resolve` method returns.\n+  case ObjectGraph\n   /// Indicates that resolved component should be retained by container and always reused.\n   case Singleton\n }\n \n ///Definition of type T describes how instances of this type should be created when they are resolved by container.\n public final class DefinitionOf<T>: Definition {","path":"Dip/Dip/Definition.swift","position":11,"original_position":11,"commit_id":"77b9a66ce4c1e85b618f4f58beedece66f411a3b","original_commit_id":"77b9a66ce4c1e85b618f4f58beedece66f411a3b","user":{"login":"ilyapuchka","id":1488293,"avatar_url":"https://avatars.githubusercontent.com/u/1488293?v=3","gravatar_id":"","url":"https://api.github.com/users/ilyapuchka","html_url":"https://github.com/ilyapuchka","followers_url":"https://api.github.com/users/ilyapuchka/followers","following_url":"https://api.github.com/users/ilyapuchka/following{/other_user}","gists_url":"https://api.github.com/users/ilyapuchka/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyapuchka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyapuchka/subscriptions","organizations_url":"https://api.github.com/users/ilyapuchka/orgs","repos_url":"https://api.github.com/users/ilyapuchka/repos","events_url":"https://api.github.com/users/ilyapuchka/events{/privacy}","received_events_url":"https://api.github.com/users/ilyapuchka/received_events","type":"User","site_admin":false},"body":"That will not work because if those methods on `DefinitionOf` will produce new copies then we will need to replace them in registry. We could solve that by having `register<T>(definition: DefinitionOf<T>)` and creating definition manually, but that will break initially nice syntax in separate steps without adding anything valuable.","created_at":"2015-11-20T09:49:38Z","updated_at":"2015-11-20T09:49:38Z","html_url":"https://github.com/AliSoftware/Dip/pull/11#discussion_r45451390","pull_request_url":"https://api.github.com/repos/AliSoftware/Dip/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/AliSoftware/Dip/pulls/comments/45451390"},"html":{"href":"https://github.com/AliSoftware/Dip/pull/11#discussion_r45451390"},"pull_request":{"href":"https://api.github.com/repos/AliSoftware/Dip/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/AliSoftware/Dip/pulls/11","id":50430519,"html_url":"https://github.com/AliSoftware/Dip/pull/11","diff_url":"https://github.com/AliSoftware/Dip/pull/11.diff","patch_url":"https://github.com/AliSoftware/Dip/pull/11.patch","issue_url":"https://api.github.com/repos/AliSoftware/Dip/issues/11","number":11,"state":"open","locked":false,"title":"Circular dependencies","user":{"login":"ilyapuchka","id":1488293,"avatar_url":"https://avatars.githubusercontent.com/u/1488293?v=3","gravatar_id":"","url":"https://api.github.com/users/ilyapuchka","html_url":"https://github.com/ilyapuchka","followers_url":"https://api.github.com/users/ilyapuchka/followers","following_url":"https://api.github.com/users/ilyapuchka/following{/other_user}","gists_url":"https://api.github.com/users/ilyapuchka/gists{/gist_id}","starred_url":"https://api.github.com/users/ilyapuchka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilyapuchka/subscriptions","organizations_url":"https://api.github.com/users/ilyapuchka/orgs","repos_url":"https://api.github.com/users/ilyapuchka/repos","events_url":"https://api.github.com/users/ilyapuchka/events{/privacy}","received_events_url":"https://api.github.com/users/ilyapuchka/received_events","type":"User","site_admin":false},"body":"This PR adds support for circular dependencies. That feature and using `resolve` inside factory block requires recursion, but lock around `resolve` method causes deadlock. I removed locking completely and propose to managed thread safety on client side.","created_at":"2015-11-11T20:15:22Z","updated_at":"2015-11-20T09:49:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7da8285905a33ad4243d4b29c9e2c5c5c350094b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AliSoftware/Dip/pulls/11/commits","review_comments_url":"https://api.github.com/repos/AliSoftware/Dip/pulls/11/comments","review_comment_url":"https://api.github.com/repos/AliSoftware/Dip/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AliSoftware/Dip/issues/11/comments","statuses_url":"https://api.github.com/repos/AliSoftware/Dip/statuses/77b9a66ce4c1e85b618f4f58beedece66f411a3b","head":{"label":"AliSoftware:feature/circular-dependencies","ref":"feature/circular-dependencies","sha":"77b9a66ce4c1e85b618f4f58beedece66f411a3b","user":{"login":"AliSoftware","id":216089,"avatar_url":"https://avatars.githubusercontent.com/u/216089?v=3","gravatar_id":"","url":"https://api.github.com/users/AliSoftware","html_url":"https://github.com/AliSoftware","followers_url":"https://api.github.com/users/AliSoftware/followers","following_url":"https://api.github.com/users/AliSoftware/following{/other_user}","gists_url":"https://api.github.com/users/AliSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/AliSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AliSoftware/subscriptions","organizations_url":"https://api.github.com/users/AliSoftware/orgs","repos_url":"https://api.github.com/users/AliSoftware/repos","events_url":"https://api.github.com/users/AliSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/AliSoftware/received_events","type":"User","site_admin":false},"repo":{"id":43641724,"name":"Dip","full_name":"AliSoftware/Dip","owner":{"login":"AliSoftware","id":216089,"avatar_url":"https://avatars.githubusercontent.com/u/216089?v=3","gravatar_id":"","url":"https://api.github.com/users/AliSoftware","html_url":"https://github.com/AliSoftware","followers_url":"https://api.github.com/users/AliSoftware/followers","following_url":"https://api.github.com/users/AliSoftware/following{/other_user}","gists_url":"https://api.github.com/users/AliSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/AliSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AliSoftware/subscriptions","organizations_url":"https://api.github.com/users/AliSoftware/orgs","repos_url":"https://api.github.com/users/AliSoftware/repos","events_url":"https://api.github.com/users/AliSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/AliSoftware/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AliSoftware/Dip","description":"Simple Swift Dependency container. Use protocols to resolve your dependencies and avoid singletons / sharedInstances!","fork":false,"url":"https://api.github.com/repos/AliSoftware/Dip","forks_url":"https://api.github.com/repos/AliSoftware/Dip/forks","keys_url":"https://api.github.com/repos/AliSoftware/Dip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AliSoftware/Dip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AliSoftware/Dip/teams","hooks_url":"https://api.github.com/repos/AliSoftware/Dip/hooks","issue_events_url":"https://api.github.com/repos/AliSoftware/Dip/issues/events{/number}","events_url":"https://api.github.com/repos/AliSoftware/Dip/events","assignees_url":"https://api.github.com/repos/AliSoftware/Dip/assignees{/user}","branches_url":"https://api.github.com/repos/AliSoftware/Dip/branches{/branch}","tags_url":"https://api.github.com/repos/AliSoftware/Dip/tags","blobs_url":"https://api.github.com/repos/AliSoftware/Dip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AliSoftware/Dip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AliSoftware/Dip/git/refs{/sha}","trees_url":"https://api.github.com/repos/AliSoftware/Dip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AliSoftware/Dip/statuses/{sha}","languages_url":"https://api.github.com/repos/AliSoftware/Dip/languages","stargazers_url":"https://api.github.com/repos/AliSoftware/Dip/stargazers","contributors_url":"https://api.github.com/repos/AliSoftware/Dip/contributors","subscribers_url":"https://api.github.com/repos/AliSoftware/Dip/subscribers","subscription_url":"https://api.github.com/repos/AliSoftware/Dip/subscription","commits_url":"https://api.github.com/repos/AliSoftware/Dip/commits{/sha}","git_commits_url":"https://api.github.com/repos/AliSoftware/Dip/git/commits{/sha}","comments_url":"https://api.github.com/repos/AliSoftware/Dip/comments{/number}","issue_comment_url":"https://api.github.com/repos/AliSoftware/Dip/issues/comments{/number}","contents_url":"https://api.github.com/repos/AliSoftware/Dip/contents/{+path}","compare_url":"https://api.github.com/repos/AliSoftware/Dip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AliSoftware/Dip/merges","archive_url":"https://api.github.com/repos/AliSoftware/Dip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AliSoftware/Dip/downloads","issues_url":"https://api.github.com/repos/AliSoftware/Dip/issues{/number}","pulls_url":"https://api.github.com/repos/AliSoftware/Dip/pulls{/number}","milestones_url":"https://api.github.com/repos/AliSoftware/Dip/milestones{/number}","notifications_url":"https://api.github.com/repos/AliSoftware/Dip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AliSoftware/Dip/labels{/name}","releases_url":"https://api.github.com/repos/AliSoftware/Dip/releases{/id}","created_at":"2015-10-04T15:49:35Z","updated_at":"2015-11-18T08:29:31Z","pushed_at":"2015-11-16T14:20:48Z","git_url":"git://github.com/AliSoftware/Dip.git","ssh_url":"git@github.com:AliSoftware/Dip.git","clone_url":"https://github.com/AliSoftware/Dip.git","svn_url":"https://github.com/AliSoftware/Dip","homepage":null,"size":1346,"stargazers_count":46,"watchers_count":46,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":46,"default_branch":"master"}},"base":{"label":"AliSoftware:develop","ref":"develop","sha":"b15fc47935510cf18e935e91159eabfe3fc5a52f","user":{"login":"AliSoftware","id":216089,"avatar_url":"https://avatars.githubusercontent.com/u/216089?v=3","gravatar_id":"","url":"https://api.github.com/users/AliSoftware","html_url":"https://github.com/AliSoftware","followers_url":"https://api.github.com/users/AliSoftware/followers","following_url":"https://api.github.com/users/AliSoftware/following{/other_user}","gists_url":"https://api.github.com/users/AliSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/AliSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AliSoftware/subscriptions","organizations_url":"https://api.github.com/users/AliSoftware/orgs","repos_url":"https://api.github.com/users/AliSoftware/repos","events_url":"https://api.github.com/users/AliSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/AliSoftware/received_events","type":"User","site_admin":false},"repo":{"id":43641724,"name":"Dip","full_name":"AliSoftware/Dip","owner":{"login":"AliSoftware","id":216089,"avatar_url":"https://avatars.githubusercontent.com/u/216089?v=3","gravatar_id":"","url":"https://api.github.com/users/AliSoftware","html_url":"https://github.com/AliSoftware","followers_url":"https://api.github.com/users/AliSoftware/followers","following_url":"https://api.github.com/users/AliSoftware/following{/other_user}","gists_url":"https://api.github.com/users/AliSoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/AliSoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AliSoftware/subscriptions","organizations_url":"https://api.github.com/users/AliSoftware/orgs","repos_url":"https://api.github.com/users/AliSoftware/repos","events_url":"https://api.github.com/users/AliSoftware/events{/privacy}","received_events_url":"https://api.github.com/users/AliSoftware/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AliSoftware/Dip","description":"Simple Swift Dependency container. Use protocols to resolve your dependencies and avoid singletons / sharedInstances!","fork":false,"url":"https://api.github.com/repos/AliSoftware/Dip","forks_url":"https://api.github.com/repos/AliSoftware/Dip/forks","keys_url":"https://api.github.com/repos/AliSoftware/Dip/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AliSoftware/Dip/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AliSoftware/Dip/teams","hooks_url":"https://api.github.com/repos/AliSoftware/Dip/hooks","issue_events_url":"https://api.github.com/repos/AliSoftware/Dip/issues/events{/number}","events_url":"https://api.github.com/repos/AliSoftware/Dip/events","assignees_url":"https://api.github.com/repos/AliSoftware/Dip/assignees{/user}","branches_url":"https://api.github.com/repos/AliSoftware/Dip/branches{/branch}","tags_url":"https://api.github.com/repos/AliSoftware/Dip/tags","blobs_url":"https://api.github.com/repos/AliSoftware/Dip/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AliSoftware/Dip/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AliSoftware/Dip/git/refs{/sha}","trees_url":"https://api.github.com/repos/AliSoftware/Dip/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AliSoftware/Dip/statuses/{sha}","languages_url":"https://api.github.com/repos/AliSoftware/Dip/languages","stargazers_url":"https://api.github.com/repos/AliSoftware/Dip/stargazers","contributors_url":"https://api.github.com/repos/AliSoftware/Dip/contributors","subscribers_url":"https://api.github.com/repos/AliSoftware/Dip/subscribers","subscription_url":"https://api.github.com/repos/AliSoftware/Dip/subscription","commits_url":"https://api.github.com/repos/AliSoftware/Dip/commits{/sha}","git_commits_url":"https://api.github.com/repos/AliSoftware/Dip/git/commits{/sha}","comments_url":"https://api.github.com/repos/AliSoftware/Dip/comments{/number}","issue_comment_url":"https://api.github.com/repos/AliSoftware/Dip/issues/comments{/number}","contents_url":"https://api.github.com/repos/AliSoftware/Dip/contents/{+path}","compare_url":"https://api.github.com/repos/AliSoftware/Dip/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AliSoftware/Dip/merges","archive_url":"https://api.github.com/repos/AliSoftware/Dip/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AliSoftware/Dip/downloads","issues_url":"https://api.github.com/repos/AliSoftware/Dip/issues{/number}","pulls_url":"https://api.github.com/repos/AliSoftware/Dip/pulls{/number}","milestones_url":"https://api.github.com/repos/AliSoftware/Dip/milestones{/number}","notifications_url":"https://api.github.com/repos/AliSoftware/Dip/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AliSoftware/Dip/labels{/name}","releases_url":"https://api.github.com/repos/AliSoftware/Dip/releases{/id}","created_at":"2015-10-04T15:49:35Z","updated_at":"2015-11-18T08:29:31Z","pushed_at":"2015-11-16T14:20:48Z","git_url":"git://github.com/AliSoftware/Dip.git","ssh_url":"git@github.com:AliSoftware/Dip.git","clone_url":"https://github.com/AliSoftware/Dip.git","svn_url":"https://github.com/AliSoftware/Dip","homepage":null,"size":1346,"stargazers_count":46,"watchers_count":46,"language":"Swift","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AliSoftware/Dip/pulls/11"},"html":{"href":"https://github.com/AliSoftware/Dip/pull/11"},"issue":{"href":"https://api.github.com/repos/AliSoftware/Dip/issues/11"},"comments":{"href":"https://api.github.com/repos/AliSoftware/Dip/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/AliSoftware/Dip/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/AliSoftware/Dip/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AliSoftware/Dip/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/AliSoftware/Dip/statuses/77b9a66ce4c1e85b618f4f58beedece66f411a3b"}}}}