{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/xcbuild/pulls/comments/73283929","id":73283929,"diff_hunk":"@@ -268,6 +269,135 @@ ResolveFrameworkStructure(Phase::Environment const &phaseEnvironment, Phase::Con\n     return true;\n }\n \n+static ext::optional<std::string>\n+FindUmbrellaHeaderName(pbxsetting::Environment const &environment, std::string const &moduleName, pbxproj::PBX::Target::shared_ptr const &target)\n+{\n+    std::string lowerModuleName;\n+    std::transform(moduleName.begin(), moduleName.end(), std::back_inserter(lowerModuleName), ::tolower);\n+\n+    ext::optional<std::string> umbrellaHeader;\n+    for (pbxproj::PBX::BuildPhase::shared_ptr const &buildPhase : target->buildPhases()) {\n+        if (buildPhase->type() != pbxproj::PBX::BuildPhase::Type::Headers) {\n+            continue;\n+        }\n+\n+        for (pbxproj::PBX::BuildFile::shared_ptr const &buildFile : buildPhase->files()) {\n+            if (buildFile->fileRef() == nullptr) {\n+                continue;\n+            }\n+\n+            std::string filePath = environment.expand(buildFile->fileRef()->resolve());\n+            if (FSUtil::GetFileExtension(filePath) == \"h\") {\n+                std::string baseName = FSUtil::GetBaseNameWithoutExtension(filePath);\n+\n+                std::string lowerBaseName;\n+                std::transform(baseName.begin(), baseName.end(), std::back_inserter(lowerBaseName), ::tolower);\n+\n+                if (lowerBaseName == lowerModuleName) {\n+                    return baseName;\n+                }\n+            }\n+        }\n+    }\n+\n+    return ext::nullopt;\n+}\n+\n+static bool\n+ResolveModuleMap(Phase::Environment const &phaseEnvironment, Phase::Context *phaseContext, pbxsetting::Environment const &environment)","path":"Libraries/pbxbuild/Sources/Phase/ProductTypeResolver.cpp","position":null,"original_position":47,"commit_id":"a62b943a25e91c23850ca47be89a8eb3178feda8","original_commit_id":"75f1091df1c332eb9e8f0aaee9857dcfa7e60b8c","user":{"login":"grp","id":163390,"avatar_url":"https://avatars.githubusercontent.com/u/163390?v=3","gravatar_id":"","url":"https://api.github.com/users/grp","html_url":"https://github.com/grp","followers_url":"https://api.github.com/users/grp/followers","following_url":"https://api.github.com/users/grp/following{/other_user}","gists_url":"https://api.github.com/users/grp/gists{/gist_id}","starred_url":"https://api.github.com/users/grp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grp/subscriptions","organizations_url":"https://api.github.com/users/grp/orgs","repos_url":"https://api.github.com/users/grp/repos","events_url":"https://api.github.com/users/grp/events{/privacy}","received_events_url":"https://api.github.com/users/grp/received_events","type":"User","site_admin":false},"body":"Ah! I only see one real choice: passing a copy separate from the caller (i.e. pass-by-value), or passing a pointer to change the caller's value (i.e. pass-by-reference). Then the question is what the best way is to implement each of those.\r\n\r\nFor passing a copy, a const reference has the same semantics of passing a copy — but without the performance cost of actually copying. So a const reference is just an optimization or implementation detail of the semantics of pass by value. For passing a pointer, both options have the same performance. So it falls back to the argument about which is most obvious to the caller about what might be mutated.\r\n\r\nThe other two cases, const pointer and non-const reference, end up not fitting into either group, so I don't use them much. Unused features are what make C++ fun, I guess.","created_at":"2016-08-03T05:50:16Z","updated_at":"2016-08-03T05:50:16Z","html_url":"https://github.com/facebook/xcbuild/pull/93#discussion_r73283929","pull_request_url":"https://api.github.com/repos/facebook/xcbuild/pulls/93","_links":{"self":{"href":"https://api.github.com/repos/facebook/xcbuild/pulls/comments/73283929"},"html":{"href":"https://github.com/facebook/xcbuild/pull/93#discussion_r73283929"},"pull_request":{"href":"https://api.github.com/repos/facebook/xcbuild/pulls/93"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/xcbuild/pulls/93","id":77914006,"html_url":"https://github.com/facebook/xcbuild/pull/93","diff_url":"https://github.com/facebook/xcbuild/pull/93.diff","patch_url":"https://github.com/facebook/xcbuild/pull/93.patch","issue_url":"https://api.github.com/repos/facebook/xcbuild/issues/93","number":93,"state":"open","locked":false,"title":"Add support for `MODULEMAP_FILE` build setting. Fixes #88.","user":{"login":"grp","id":163390,"avatar_url":"https://avatars.githubusercontent.com/u/163390?v=3","gravatar_id":"","url":"https://api.github.com/users/grp","html_url":"https://github.com/grp","followers_url":"https://api.github.com/users/grp/followers","following_url":"https://api.github.com/users/grp/following{/other_user}","gists_url":"https://api.github.com/users/grp/gists{/gist_id}","starred_url":"https://api.github.com/users/grp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grp/subscriptions","organizations_url":"https://api.github.com/users/grp/orgs","repos_url":"https://api.github.com/users/grp/repos","events_url":"https://api.github.com/users/grp/events{/privacy}","received_events_url":"https://api.github.com/users/grp/received_events","type":"User","site_admin":false},"body":"Implements the module map features needed for #88. They're part of the grab bag of build things in `ProductTypeResolver`; that probably should be split up in a later PR. For now, this fixes that task and should be a big help for any Swift projects using CocoaPods.","created_at":"2016-07-19T03:47:57Z","updated_at":"2016-08-03T05:50:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5dccfc8a79fc1f8dee24591ee0ff4695e206324c","assignee":{"login":"Ktwu","id":470651,"avatar_url":"https://avatars.githubusercontent.com/u/470651?v=3","gravatar_id":"","url":"https://api.github.com/users/Ktwu","html_url":"https://github.com/Ktwu","followers_url":"https://api.github.com/users/Ktwu/followers","following_url":"https://api.github.com/users/Ktwu/following{/other_user}","gists_url":"https://api.github.com/users/Ktwu/gists{/gist_id}","starred_url":"https://api.github.com/users/Ktwu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ktwu/subscriptions","organizations_url":"https://api.github.com/users/Ktwu/orgs","repos_url":"https://api.github.com/users/Ktwu/repos","events_url":"https://api.github.com/users/Ktwu/events{/privacy}","received_events_url":"https://api.github.com/users/Ktwu/received_events","type":"User","site_admin":false},"assignees":[{"login":"Ktwu","id":470651,"avatar_url":"https://avatars.githubusercontent.com/u/470651?v=3","gravatar_id":"","url":"https://api.github.com/users/Ktwu","html_url":"https://github.com/Ktwu","followers_url":"https://api.github.com/users/Ktwu/followers","following_url":"https://api.github.com/users/Ktwu/following{/other_user}","gists_url":"https://api.github.com/users/Ktwu/gists{/gist_id}","starred_url":"https://api.github.com/users/Ktwu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ktwu/subscriptions","organizations_url":"https://api.github.com/users/Ktwu/orgs","repos_url":"https://api.github.com/users/Ktwu/repos","events_url":"https://api.github.com/users/Ktwu/events{/privacy}","received_events_url":"https://api.github.com/users/Ktwu/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/xcbuild/pulls/93/commits","review_comments_url":"https://api.github.com/repos/facebook/xcbuild/pulls/93/comments","review_comment_url":"https://api.github.com/repos/facebook/xcbuild/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/xcbuild/issues/93/comments","statuses_url":"https://api.github.com/repos/facebook/xcbuild/statuses/a62b943a25e91c23850ca47be89a8eb3178feda8","head":{"label":"facebook:grp/modulemap-file","ref":"grp/modulemap-file","sha":"a62b943a25e91c23850ca47be89a8eb3178feda8","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":43019030,"name":"xcbuild","full_name":"facebook/xcbuild","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/xcbuild","description":"Xcode-compatible build tool.","fork":false,"url":"https://api.github.com/repos/facebook/xcbuild","forks_url":"https://api.github.com/repos/facebook/xcbuild/forks","keys_url":"https://api.github.com/repos/facebook/xcbuild/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/xcbuild/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/xcbuild/teams","hooks_url":"https://api.github.com/repos/facebook/xcbuild/hooks","issue_events_url":"https://api.github.com/repos/facebook/xcbuild/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/xcbuild/events","assignees_url":"https://api.github.com/repos/facebook/xcbuild/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/xcbuild/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/xcbuild/tags","blobs_url":"https://api.github.com/repos/facebook/xcbuild/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/xcbuild/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/xcbuild/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/xcbuild/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/xcbuild/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/xcbuild/languages","stargazers_url":"https://api.github.com/repos/facebook/xcbuild/stargazers","contributors_url":"https://api.github.com/repos/facebook/xcbuild/contributors","subscribers_url":"https://api.github.com/repos/facebook/xcbuild/subscribers","subscription_url":"https://api.github.com/repos/facebook/xcbuild/subscription","commits_url":"https://api.github.com/repos/facebook/xcbuild/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/xcbuild/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/xcbuild/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/xcbuild/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/xcbuild/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/xcbuild/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/xcbuild/merges","archive_url":"https://api.github.com/repos/facebook/xcbuild/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/xcbuild/downloads","issues_url":"https://api.github.com/repos/facebook/xcbuild/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/xcbuild/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/xcbuild/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/xcbuild/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/xcbuild/labels{/name}","releases_url":"https://api.github.com/repos/facebook/xcbuild/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/xcbuild/deployments","created_at":"2015-09-23T18:24:01Z","updated_at":"2016-08-02T21:02:03Z","pushed_at":"2016-08-01T19:13:40Z","git_url":"git://github.com/facebook/xcbuild.git","ssh_url":"git@github.com:facebook/xcbuild.git","clone_url":"https://github.com/facebook/xcbuild.git","svn_url":"https://github.com/facebook/xcbuild","homepage":null,"size":3805,"stargazers_count":1024,"watchers_count":1024,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":52,"mirror_url":null,"open_issues_count":31,"forks":52,"open_issues":31,"watchers":1024,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"f0e3ace4a3eea82be5dc31ed9c8cb085c5b0842b","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":43019030,"name":"xcbuild","full_name":"facebook/xcbuild","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/xcbuild","description":"Xcode-compatible build tool.","fork":false,"url":"https://api.github.com/repos/facebook/xcbuild","forks_url":"https://api.github.com/repos/facebook/xcbuild/forks","keys_url":"https://api.github.com/repos/facebook/xcbuild/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/xcbuild/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/xcbuild/teams","hooks_url":"https://api.github.com/repos/facebook/xcbuild/hooks","issue_events_url":"https://api.github.com/repos/facebook/xcbuild/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/xcbuild/events","assignees_url":"https://api.github.com/repos/facebook/xcbuild/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/xcbuild/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/xcbuild/tags","blobs_url":"https://api.github.com/repos/facebook/xcbuild/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/xcbuild/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/xcbuild/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/xcbuild/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/xcbuild/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/xcbuild/languages","stargazers_url":"https://api.github.com/repos/facebook/xcbuild/stargazers","contributors_url":"https://api.github.com/repos/facebook/xcbuild/contributors","subscribers_url":"https://api.github.com/repos/facebook/xcbuild/subscribers","subscription_url":"https://api.github.com/repos/facebook/xcbuild/subscription","commits_url":"https://api.github.com/repos/facebook/xcbuild/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/xcbuild/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/xcbuild/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/xcbuild/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/xcbuild/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/xcbuild/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/xcbuild/merges","archive_url":"https://api.github.com/repos/facebook/xcbuild/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/xcbuild/downloads","issues_url":"https://api.github.com/repos/facebook/xcbuild/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/xcbuild/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/xcbuild/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/xcbuild/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/xcbuild/labels{/name}","releases_url":"https://api.github.com/repos/facebook/xcbuild/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/xcbuild/deployments","created_at":"2015-09-23T18:24:01Z","updated_at":"2016-08-02T21:02:03Z","pushed_at":"2016-08-01T19:13:40Z","git_url":"git://github.com/facebook/xcbuild.git","ssh_url":"git@github.com:facebook/xcbuild.git","clone_url":"https://github.com/facebook/xcbuild.git","svn_url":"https://github.com/facebook/xcbuild","homepage":null,"size":3805,"stargazers_count":1024,"watchers_count":1024,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":52,"mirror_url":null,"open_issues_count":31,"forks":52,"open_issues":31,"watchers":1024,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/xcbuild/pulls/93"},"html":{"href":"https://github.com/facebook/xcbuild/pull/93"},"issue":{"href":"https://api.github.com/repos/facebook/xcbuild/issues/93"},"comments":{"href":"https://api.github.com/repos/facebook/xcbuild/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/xcbuild/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/xcbuild/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/xcbuild/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/xcbuild/statuses/a62b943a25e91c23850ca47be89a8eb3178feda8"}}}}
{"actor":{"display_login":"grp"}}