{"action":"created","comment":{"url":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments/221419045","pull_request_review_id":160070210,"id":221419045,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTQxOTA0NQ==","diff_hunk":"@@ -388,8 +388,15 @@ public final class ProductBuildDescription {\n         args += [\"-L\", buildParameters.buildPath.asString]\n         args += [\"-o\", binary.asString]\n         args += [\"-module-name\", product.name]\n-        args += dylibs.map({ \"-l\" + $0.product.name })\n-\n+        \n+        func dylibsIn(product: ProductBuildDescription) -> [ProductBuildDescription] {\n+            return product.dylibs.reduce([product], {$0 + dylibsIn(product: $1)})\n+        }\n+        \n+        // Go through the nested dynamic libraries and add them\n+        // FIXME: Use a better algorithm, because if there is a cyclic dependency an error will occur\n+        args += dylibs.reduce([], {$0 + dylibsIn(product: $1)}).map({ \"-l\" + $0.product.name })","path":"Sources/Build/BuildPlan.swift","position":13,"original_position":13,"commit_id":"2a9ab90c22dab6df253d4972890c0868666cc816","original_commit_id":"2a9ab90c22dab6df253d4972890c0868666cc816","user":{"login":"fadi-botros","id":22801132,"node_id":"MDQ6VXNlcjIyODAxMTMy","avatar_url":"https://avatars2.githubusercontent.com/u/22801132?v=4","gravatar_id":"","url":"https://api.github.com/users/fadi-botros","html_url":"https://github.com/fadi-botros","followers_url":"https://api.github.com/users/fadi-botros/followers","following_url":"https://api.github.com/users/fadi-botros/following{/other_user}","gists_url":"https://api.github.com/users/fadi-botros/gists{/gist_id}","starred_url":"https://api.github.com/users/fadi-botros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fadi-botros/subscriptions","organizations_url":"https://api.github.com/users/fadi-botros/orgs","repos_url":"https://api.github.com/users/fadi-botros/repos","events_url":"https://api.github.com/users/fadi-botros/events{/privacy}","received_events_url":"https://api.github.com/users/fadi-botros/received_events","type":"User","site_admin":false},"body":"Applied your change and it succeeded the tests","created_at":"2018-09-29T07:10:58Z","updated_at":"2018-09-29T07:10:59Z","html_url":"https://github.com/apple/swift-package-manager/pull/1389#discussion_r221419045","pull_request_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/1389","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments/221419045"},"html":{"href":"https://github.com/apple/swift-package-manager/pull/1389#discussion_r221419045"},"pull_request":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/1389"}},"in_reply_to_id":196539042},"pull_request":{"url":"https://api.github.com/repos/apple/swift-package-manager/pulls/1389","id":151896803,"node_id":"MDExOlB1bGxSZXF1ZXN0MTUxODk2ODAz","html_url":"https://github.com/apple/swift-package-manager/pull/1389","diff_url":"https://github.com/apple/swift-package-manager/pull/1389.diff","patch_url":"https://github.com/apple/swift-package-manager/pull/1389.patch","issue_url":"https://api.github.com/repos/apple/swift-package-manager/issues/1389","number":1389,"state":"closed","locked":false,"title":"[SPM] [Fix] Dynamic libraries now are resolved recursively","user":{"login":"fadi-botros","id":22801132,"node_id":"MDQ6VXNlcjIyODAxMTMy","avatar_url":"https://avatars2.githubusercontent.com/u/22801132?v=4","gravatar_id":"","url":"https://api.github.com/users/fadi-botros","html_url":"https://github.com/fadi-botros","followers_url":"https://api.github.com/users/fadi-botros/followers","following_url":"https://api.github.com/users/fadi-botros/following{/other_user}","gists_url":"https://api.github.com/users/fadi-botros/gists{/gist_id}","starred_url":"https://api.github.com/users/fadi-botros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fadi-botros/subscriptions","organizations_url":"https://api.github.com/users/fadi-botros/orgs","repos_url":"https://api.github.com/users/fadi-botros/repos","events_url":"https://api.github.com/users/fadi-botros/events{/privacy}","received_events_url":"https://api.github.com/users/fadi-botros/received_events","type":"User","site_admin":false},"body":"I found an issue when you try to use dynamically linked libraries\r\nThe libraries are not recursively linked\r\n\r\n**For example:**\r\nIf you clone the Apple's example for Swift Package Manager itself (Dealer)\r\nAnd edit the packages and make the library type of each of them .dynamic\r\nAnd try to \"swift build\"\r\nIt will NOT link\r\n\r\nThis pull request is just a primitive solution, it doesn't check for cyclic dylibs dependcies\r\n\r\nTried to use the supplied graph algorithm, but ProductBuildDescription is not Hashable\r\nDidn't want to extend it and make a lot of changes\r\n\r\nThis is tested on Apple's example itself (Dealer) and succeeded","created_at":"2017-11-10T12:32:35Z","updated_at":"2018-09-29T07:10:59Z","closed_at":"2018-06-28T01:32:47Z","merged_at":null,"merge_commit_sha":"af55abf66e060765168b2a1e412a70553e51592d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":609948871,"node_id":"MDU6TGFiZWw2MDk5NDg4NzE=","url":"https://api.github.com/repos/apple/swift-package-manager/labels/awaiting%20review","name":"awaiting review","color":"f9d0c4","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/1389/commits","review_comments_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/1389/comments","review_comment_url":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apple/swift-package-manager/issues/1389/comments","statuses_url":"https://api.github.com/repos/apple/swift-package-manager/statuses/2a9ab90c22dab6df253d4972890c0868666cc816","head":{"label":"fadi-botros:master","ref":"master","sha":"2a9ab90c22dab6df253d4972890c0868666cc816","user":{"login":"fadi-botros","id":22801132,"node_id":"MDQ6VXNlcjIyODAxMTMy","avatar_url":"https://avatars2.githubusercontent.com/u/22801132?v=4","gravatar_id":"","url":"https://api.github.com/users/fadi-botros","html_url":"https://github.com/fadi-botros","followers_url":"https://api.github.com/users/fadi-botros/followers","following_url":"https://api.github.com/users/fadi-botros/following{/other_user}","gists_url":"https://api.github.com/users/fadi-botros/gists{/gist_id}","starred_url":"https://api.github.com/users/fadi-botros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fadi-botros/subscriptions","organizations_url":"https://api.github.com/users/fadi-botros/orgs","repos_url":"https://api.github.com/users/fadi-botros/repos","events_url":"https://api.github.com/users/fadi-botros/events{/privacy}","received_events_url":"https://api.github.com/users/fadi-botros/received_events","type":"User","site_admin":false},"repo":{"id":110244223,"node_id":"MDEwOlJlcG9zaXRvcnkxMTAyNDQyMjM=","name":"swift-package-manager","full_name":"fadi-botros/swift-package-manager","private":false,"owner":{"login":"fadi-botros","id":22801132,"node_id":"MDQ6VXNlcjIyODAxMTMy","avatar_url":"https://avatars2.githubusercontent.com/u/22801132?v=4","gravatar_id":"","url":"https://api.github.com/users/fadi-botros","html_url":"https://github.com/fadi-botros","followers_url":"https://api.github.com/users/fadi-botros/followers","following_url":"https://api.github.com/users/fadi-botros/following{/other_user}","gists_url":"https://api.github.com/users/fadi-botros/gists{/gist_id}","starred_url":"https://api.github.com/users/fadi-botros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fadi-botros/subscriptions","organizations_url":"https://api.github.com/users/fadi-botros/orgs","repos_url":"https://api.github.com/users/fadi-botros/repos","events_url":"https://api.github.com/users/fadi-botros/events{/privacy}","received_events_url":"https://api.github.com/users/fadi-botros/received_events","type":"User","site_admin":false},"html_url":"https://github.com/fadi-botros/swift-package-manager","description":"The Package Manager for the Swift Programming Language","fork":true,"url":"https://api.github.com/repos/fadi-botros/swift-package-manager","forks_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/forks","keys_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/teams","hooks_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/hooks","issue_events_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/issues/events{/number}","events_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/events","assignees_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/assignees{/user}","branches_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/branches{/branch}","tags_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/tags","blobs_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/languages","stargazers_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/stargazers","contributors_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/contributors","subscribers_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/subscribers","subscription_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/subscription","commits_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/contents/{+path}","compare_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/merges","archive_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/downloads","issues_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/issues{/number}","pulls_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/labels{/name}","releases_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/releases{/id}","deployments_url":"https://api.github.com/repos/fadi-botros/swift-package-manager/deployments","created_at":"2017-11-10T12:22:48Z","updated_at":"2018-09-29T07:10:37Z","pushed_at":"2018-09-29T07:10:35Z","git_url":"git://github.com/fadi-botros/swift-package-manager.git","ssh_url":"git@github.com:fadi-botros/swift-package-manager.git","clone_url":"https://github.com/fadi-botros/swift-package-manager.git","svn_url":"https://github.com/fadi-botros/swift-package-manager","homepage":"","size":6230,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apple:master","ref":"master","sha":"e36eebf55fe5d4f1fac2ec1c9b69e7614f7f4b3a","user":{"login":"apple","id":10639145,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjM5MTQ1","avatar_url":"https://avatars0.githubusercontent.com/u/10639145?v=4","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"repo":{"id":44840041,"node_id":"MDEwOlJlcG9zaXRvcnk0NDg0MDA0MQ==","name":"swift-package-manager","full_name":"apple/swift-package-manager","private":false,"owner":{"login":"apple","id":10639145,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwNjM5MTQ1","avatar_url":"https://avatars0.githubusercontent.com/u/10639145?v=4","gravatar_id":"","url":"https://api.github.com/users/apple","html_url":"https://github.com/apple","followers_url":"https://api.github.com/users/apple/followers","following_url":"https://api.github.com/users/apple/following{/other_user}","gists_url":"https://api.github.com/users/apple/gists{/gist_id}","starred_url":"https://api.github.com/users/apple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apple/subscriptions","organizations_url":"https://api.github.com/users/apple/orgs","repos_url":"https://api.github.com/users/apple/repos","events_url":"https://api.github.com/users/apple/events{/privacy}","received_events_url":"https://api.github.com/users/apple/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/apple/swift-package-manager","description":"The Package Manager for the Swift Programming Language","fork":false,"url":"https://api.github.com/repos/apple/swift-package-manager","forks_url":"https://api.github.com/repos/apple/swift-package-manager/forks","keys_url":"https://api.github.com/repos/apple/swift-package-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apple/swift-package-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apple/swift-package-manager/teams","hooks_url":"https://api.github.com/repos/apple/swift-package-manager/hooks","issue_events_url":"https://api.github.com/repos/apple/swift-package-manager/issues/events{/number}","events_url":"https://api.github.com/repos/apple/swift-package-manager/events","assignees_url":"https://api.github.com/repos/apple/swift-package-manager/assignees{/user}","branches_url":"https://api.github.com/repos/apple/swift-package-manager/branches{/branch}","tags_url":"https://api.github.com/repos/apple/swift-package-manager/tags","blobs_url":"https://api.github.com/repos/apple/swift-package-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apple/swift-package-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apple/swift-package-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/apple/swift-package-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apple/swift-package-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/apple/swift-package-manager/languages","stargazers_url":"https://api.github.com/repos/apple/swift-package-manager/stargazers","contributors_url":"https://api.github.com/repos/apple/swift-package-manager/contributors","subscribers_url":"https://api.github.com/repos/apple/swift-package-manager/subscribers","subscription_url":"https://api.github.com/repos/apple/swift-package-manager/subscription","commits_url":"https://api.github.com/repos/apple/swift-package-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/apple/swift-package-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/apple/swift-package-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/apple/swift-package-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/apple/swift-package-manager/contents/{+path}","compare_url":"https://api.github.com/repos/apple/swift-package-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apple/swift-package-manager/merges","archive_url":"https://api.github.com/repos/apple/swift-package-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apple/swift-package-manager/downloads","issues_url":"https://api.github.com/repos/apple/swift-package-manager/issues{/number}","pulls_url":"https://api.github.com/repos/apple/swift-package-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/apple/swift-package-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/apple/swift-package-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apple/swift-package-manager/labels{/name}","releases_url":"https://api.github.com/repos/apple/swift-package-manager/releases{/id}","deployments_url":"https://api.github.com/repos/apple/swift-package-manager/deployments","created_at":"2015-10-23T21:41:12Z","updated_at":"2018-09-29T05:49:22Z","pushed_at":"2018-09-29T05:49:18Z","git_url":"git://github.com/apple/swift-package-manager.git","ssh_url":"git@github.com:apple/swift-package-manager.git","clone_url":"https://github.com/apple/swift-package-manager.git","svn_url":"https://github.com/apple/swift-package-manager","homepage":"","size":7605,"stargazers_count":6474,"watchers_count":6474,"language":"Swift","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":749,"mirror_url":null,"archived":false,"open_issues_count":20,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":749,"open_issues":20,"watchers":6474,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/1389"},"html":{"href":"https://github.com/apple/swift-package-manager/pull/1389"},"issue":{"href":"https://api.github.com/repos/apple/swift-package-manager/issues/1389"},"comments":{"href":"https://api.github.com/repos/apple/swift-package-manager/issues/1389/comments"},"review_comments":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/1389/comments"},"review_comment":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apple/swift-package-manager/pulls/1389/commits"},"statuses":{"href":"https://api.github.com/repos/apple/swift-package-manager/statuses/2a9ab90c22dab6df253d4972890c0868666cc816"}},"author_association":"NONE"}}
{"actor":{"display_login":"fadi-botros"}}