{"action":"opened","number":9,"pull_request":{"url":"https://api.github.com/repos/kisielk/vendorize/pulls/9","id":33095116,"html_url":"https://github.com/kisielk/vendorize/pull/9","diff_url":"https://github.com/kisielk/vendorize/pull/9.diff","patch_url":"https://github.com/kisielk/vendorize/pull/9.patch","issue_url":"https://api.github.com/repos/kisielk/vendorize/issues/9","number":9,"state":"open","locked":false,"title":"Fix infinite loop","user":{"login":"cespare","id":318501,"avatar_url":"https://avatars.githubusercontent.com/u/318501?v=3","gravatar_id":"","url":"https://api.github.com/users/cespare","html_url":"https://github.com/cespare","followers_url":"https://api.github.com/users/cespare/followers","following_url":"https://api.github.com/users/cespare/following{/other_user}","gists_url":"https://api.github.com/users/cespare/gists{/gist_id}","starred_url":"https://api.github.com/users/cespare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cespare/subscriptions","organizations_url":"https://api.github.com/users/cespare/orgs","repos_url":"https://api.github.com/users/cespare/repos","events_url":"https://api.github.com/users/cespare/events{/privacy}","received_events_url":"https://api.github.com/users/cespare/received_events","type":"User","site_admin":false},"body":"If foo_test depends on bar and bar depends on foo, vendorize goes into\r\nan infinite loop.\r\n\r\nI ran into this in trying to vendor something that uses github.com/garyburd/redigo/redis. The test depends on github.com/garyburd/internal/redistest, which in turn depends on github.com/garyburd/redigo/redis.\r\n\r\n(What's happening here is that although go packages cannot have circular imports, vendorize lumps packages with their tests; the graph where each node is [pkg, pkg_test] may indeed have cycles.)\r\n\r\nThe easy fix is to mark a package as visited as soon as we discover it, not after we process it. I think this is still correct? At least I haven't found any edge cases suggesting otherwise :)","created_at":"2015-04-11T01:20:18Z","updated_at":"2015-04-11T01:20:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kisielk/vendorize/pulls/9/commits","review_comments_url":"https://api.github.com/repos/kisielk/vendorize/pulls/9/comments","review_comment_url":"https://api.github.com/repos/kisielk/vendorize/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kisielk/vendorize/issues/9/comments","statuses_url":"https://api.github.com/repos/kisielk/vendorize/statuses/b892a726e6194a1d328863676ee029f39a9d59f8","head":{"label":"liftoffio:infinite-loop-fix","ref":"infinite-loop-fix","sha":"b892a726e6194a1d328863676ee029f39a9d59f8","user":{"login":"liftoffio","id":4211746,"avatar_url":"https://avatars.githubusercontent.com/u/4211746?v=3","gravatar_id":"","url":"https://api.github.com/users/liftoffio","html_url":"https://github.com/liftoffio","followers_url":"https://api.github.com/users/liftoffio/followers","following_url":"https://api.github.com/users/liftoffio/following{/other_user}","gists_url":"https://api.github.com/users/liftoffio/gists{/gist_id}","starred_url":"https://api.github.com/users/liftoffio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liftoffio/subscriptions","organizations_url":"https://api.github.com/users/liftoffio/orgs","repos_url":"https://api.github.com/users/liftoffio/repos","events_url":"https://api.github.com/users/liftoffio/events{/privacy}","received_events_url":"https://api.github.com/users/liftoffio/received_events","type":"Organization","site_admin":false},"repo":{"id":33756836,"name":"vendorize","full_name":"liftoffio/vendorize","owner":{"login":"liftoffio","id":4211746,"avatar_url":"https://avatars.githubusercontent.com/u/4211746?v=3","gravatar_id":"","url":"https://api.github.com/users/liftoffio","html_url":"https://github.com/liftoffio","followers_url":"https://api.github.com/users/liftoffio/followers","following_url":"https://api.github.com/users/liftoffio/following{/other_user}","gists_url":"https://api.github.com/users/liftoffio/gists{/gist_id}","starred_url":"https://api.github.com/users/liftoffio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liftoffio/subscriptions","organizations_url":"https://api.github.com/users/liftoffio/orgs","repos_url":"https://api.github.com/users/liftoffio/repos","events_url":"https://api.github.com/users/liftoffio/events{/privacy}","received_events_url":"https://api.github.com/users/liftoffio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/liftoffio/vendorize","description":"vendorize is a tool for vendorizing go imports, including transitive dependencies","fork":true,"url":"https://api.github.com/repos/liftoffio/vendorize","forks_url":"https://api.github.com/repos/liftoffio/vendorize/forks","keys_url":"https://api.github.com/repos/liftoffio/vendorize/keys{/key_id}","collaborators_url":"https://api.github.com/repos/liftoffio/vendorize/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/liftoffio/vendorize/teams","hooks_url":"https://api.github.com/repos/liftoffio/vendorize/hooks","issue_events_url":"https://api.github.com/repos/liftoffio/vendorize/issues/events{/number}","events_url":"https://api.github.com/repos/liftoffio/vendorize/events","assignees_url":"https://api.github.com/repos/liftoffio/vendorize/assignees{/user}","branches_url":"https://api.github.com/repos/liftoffio/vendorize/branches{/branch}","tags_url":"https://api.github.com/repos/liftoffio/vendorize/tags","blobs_url":"https://api.github.com/repos/liftoffio/vendorize/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/liftoffio/vendorize/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/liftoffio/vendorize/git/refs{/sha}","trees_url":"https://api.github.com/repos/liftoffio/vendorize/git/trees{/sha}","statuses_url":"https://api.github.com/repos/liftoffio/vendorize/statuses/{sha}","languages_url":"https://api.github.com/repos/liftoffio/vendorize/languages","stargazers_url":"https://api.github.com/repos/liftoffio/vendorize/stargazers","contributors_url":"https://api.github.com/repos/liftoffio/vendorize/contributors","subscribers_url":"https://api.github.com/repos/liftoffio/vendorize/subscribers","subscription_url":"https://api.github.com/repos/liftoffio/vendorize/subscription","commits_url":"https://api.github.com/repos/liftoffio/vendorize/commits{/sha}","git_commits_url":"https://api.github.com/repos/liftoffio/vendorize/git/commits{/sha}","comments_url":"https://api.github.com/repos/liftoffio/vendorize/comments{/number}","issue_comment_url":"https://api.github.com/repos/liftoffio/vendorize/issues/comments{/number}","contents_url":"https://api.github.com/repos/liftoffio/vendorize/contents/{+path}","compare_url":"https://api.github.com/repos/liftoffio/vendorize/compare/{base}...{head}","merges_url":"https://api.github.com/repos/liftoffio/vendorize/merges","archive_url":"https://api.github.com/repos/liftoffio/vendorize/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/liftoffio/vendorize/downloads","issues_url":"https://api.github.com/repos/liftoffio/vendorize/issues{/number}","pulls_url":"https://api.github.com/repos/liftoffio/vendorize/pulls{/number}","milestones_url":"https://api.github.com/repos/liftoffio/vendorize/milestones{/number}","notifications_url":"https://api.github.com/repos/liftoffio/vendorize/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/liftoffio/vendorize/labels{/name}","releases_url":"https://api.github.com/repos/liftoffio/vendorize/releases{/id}","created_at":"2015-04-11T00:36:39Z","updated_at":"2015-04-11T00:36:39Z","pushed_at":"2015-04-11T01:18:36Z","git_url":"git://github.com/liftoffio/vendorize.git","ssh_url":"git@github.com:liftoffio/vendorize.git","clone_url":"https://github.com/liftoffio/vendorize.git","svn_url":"https://github.com/liftoffio/vendorize","homepage":null,"size":88,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"kisielk:master","ref":"master","sha":"dca267f2521a68e7fa9ef7ca4f82377f7d1d81a2","user":{"login":"kisielk","id":58618,"avatar_url":"https://avatars.githubusercontent.com/u/58618?v=3","gravatar_id":"","url":"https://api.github.com/users/kisielk","html_url":"https://github.com/kisielk","followers_url":"https://api.github.com/users/kisielk/followers","following_url":"https://api.github.com/users/kisielk/following{/other_user}","gists_url":"https://api.github.com/users/kisielk/gists{/gist_id}","starred_url":"https://api.github.com/users/kisielk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kisielk/subscriptions","organizations_url":"https://api.github.com/users/kisielk/orgs","repos_url":"https://api.github.com/users/kisielk/repos","events_url":"https://api.github.com/users/kisielk/events{/privacy}","received_events_url":"https://api.github.com/users/kisielk/received_events","type":"User","site_admin":false},"repo":{"id":13355615,"name":"vendorize","full_name":"kisielk/vendorize","owner":{"login":"kisielk","id":58618,"avatar_url":"https://avatars.githubusercontent.com/u/58618?v=3","gravatar_id":"","url":"https://api.github.com/users/kisielk","html_url":"https://github.com/kisielk","followers_url":"https://api.github.com/users/kisielk/followers","following_url":"https://api.github.com/users/kisielk/following{/other_user}","gists_url":"https://api.github.com/users/kisielk/gists{/gist_id}","starred_url":"https://api.github.com/users/kisielk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kisielk/subscriptions","organizations_url":"https://api.github.com/users/kisielk/orgs","repos_url":"https://api.github.com/users/kisielk/repos","events_url":"https://api.github.com/users/kisielk/events{/privacy}","received_events_url":"https://api.github.com/users/kisielk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kisielk/vendorize","description":"vendorize is a tool for vendorizing go imports, including transitive dependencies","fork":false,"url":"https://api.github.com/repos/kisielk/vendorize","forks_url":"https://api.github.com/repos/kisielk/vendorize/forks","keys_url":"https://api.github.com/repos/kisielk/vendorize/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kisielk/vendorize/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kisielk/vendorize/teams","hooks_url":"https://api.github.com/repos/kisielk/vendorize/hooks","issue_events_url":"https://api.github.com/repos/kisielk/vendorize/issues/events{/number}","events_url":"https://api.github.com/repos/kisielk/vendorize/events","assignees_url":"https://api.github.com/repos/kisielk/vendorize/assignees{/user}","branches_url":"https://api.github.com/repos/kisielk/vendorize/branches{/branch}","tags_url":"https://api.github.com/repos/kisielk/vendorize/tags","blobs_url":"https://api.github.com/repos/kisielk/vendorize/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kisielk/vendorize/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kisielk/vendorize/git/refs{/sha}","trees_url":"https://api.github.com/repos/kisielk/vendorize/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kisielk/vendorize/statuses/{sha}","languages_url":"https://api.github.com/repos/kisielk/vendorize/languages","stargazers_url":"https://api.github.com/repos/kisielk/vendorize/stargazers","contributors_url":"https://api.github.com/repos/kisielk/vendorize/contributors","subscribers_url":"https://api.github.com/repos/kisielk/vendorize/subscribers","subscription_url":"https://api.github.com/repos/kisielk/vendorize/subscription","commits_url":"https://api.github.com/repos/kisielk/vendorize/commits{/sha}","git_commits_url":"https://api.github.com/repos/kisielk/vendorize/git/commits{/sha}","comments_url":"https://api.github.com/repos/kisielk/vendorize/comments{/number}","issue_comment_url":"https://api.github.com/repos/kisielk/vendorize/issues/comments{/number}","contents_url":"https://api.github.com/repos/kisielk/vendorize/contents/{+path}","compare_url":"https://api.github.com/repos/kisielk/vendorize/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kisielk/vendorize/merges","archive_url":"https://api.github.com/repos/kisielk/vendorize/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kisielk/vendorize/downloads","issues_url":"https://api.github.com/repos/kisielk/vendorize/issues{/number}","pulls_url":"https://api.github.com/repos/kisielk/vendorize/pulls{/number}","milestones_url":"https://api.github.com/repos/kisielk/vendorize/milestones{/number}","notifications_url":"https://api.github.com/repos/kisielk/vendorize/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kisielk/vendorize/labels{/name}","releases_url":"https://api.github.com/repos/kisielk/vendorize/releases{/id}","created_at":"2013-10-06T01:42:53Z","updated_at":"2014-12-20T14:09:40Z","pushed_at":"2015-04-11T01:20:18Z","git_url":"git://github.com/kisielk/vendorize.git","ssh_url":"git@github.com:kisielk/vendorize.git","clone_url":"https://github.com/kisielk/vendorize.git","svn_url":"https://github.com/kisielk/vendorize","homepage":null,"size":139,"stargazers_count":14,"watchers_count":14,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":6,"forks":4,"open_issues":6,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kisielk/vendorize/pulls/9"},"html":{"href":"https://github.com/kisielk/vendorize/pull/9"},"issue":{"href":"https://api.github.com/repos/kisielk/vendorize/issues/9"},"comments":{"href":"https://api.github.com/repos/kisielk/vendorize/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/kisielk/vendorize/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/kisielk/vendorize/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kisielk/vendorize/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/kisielk/vendorize/statuses/b892a726e6194a1d328863676ee029f39a9d59f8"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}