{"action":"closed","issue":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/2742","labels_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/2742/labels{/name}","comments_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/2742/comments","events_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/2742/events","html_url":"https://github.com/CocoaPods/CocoaPods/issues/2742","id":47011530,"number":2742,"title":"USER_HEADER_SEARCH_PATHS will be duplicated by each subspec. ","user":{"login":"liangshixing","id":8481414,"avatar_url":"https://avatars.githubusercontent.com/u/8481414?v=3","gravatar_id":"","url":"https://api.github.com/users/liangshixing","html_url":"https://github.com/liangshixing","followers_url":"https://api.github.com/users/liangshixing/followers","following_url":"https://api.github.com/users/liangshixing/following{/other_user}","gists_url":"https://api.github.com/users/liangshixing/gists{/gist_id}","starred_url":"https://api.github.com/users/liangshixing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liangshixing/subscriptions","organizations_url":"https://api.github.com/users/liangshixing/orgs","repos_url":"https://api.github.com/users/liangshixing/repos","events_url":"https://api.github.com/users/liangshixing/events{/privacy}","received_events_url":"https://api.github.com/users/liangshixing/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/labels/t3:discussion","name":"t3:discussion","color":"E10288"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-10-28T10:45:51Z","updated_at":"2015-05-31T05:40:29Z","closed_at":"2015-05-31T05:40:29Z","body":"In my podsepc file, I have several subspec(s) and 1 xcconfig item.\r\n\r\n```\r\n  ...\r\n  user_header_paths = [\r\n          '$(SRCROOT)/../path1/',\r\n          '$(SRCROOT)/../path2/',\r\n          '$(SRCROOT)/../path3/',\r\n          '$(SRCROOT)/../path4/',\r\n          '$(SRCROOT)/../path5/',\r\n          '$(SRCROOT)/../path6/',\r\n          '$(SRCROOT)/../path7/',\r\n          ]\r\n  s.xcconfig = { 'USER_HEADER_SEARCH_PATHS' => user_header_paths.join(' ') }\r\n  s.subspec \"SubModule1\" do |sp|\r\n    sp.source_files = 'SubModule1/*.{h,m}'\r\n    sp.subspec \"SubModule11\" do |ssp|\r\n      ssp.source_files = 'SubModule1/SubModule11/*.{h,m}'\r\n    end\r\n    sp.subspec \"SubModule12\" do |ssp|\r\n      ssp.source_files = 'SubModule1/SubModule12/*.{h,m}'\r\n    end\r\n    sp.subspec \"SubModule13\" do |ssp|\r\n      ssp.source_files = 'SubModule1/SubModule13/*.{h,m}'\r\n    end\r\n  end\r\n  s.subspec \"SubModule2\" do |sp|\r\n    sp.source_files = 'SubModule2/*.{h,m}'\r\n    sp.subspec \"SubModule21\" do |ssp|\r\n      ssp.source_files = 'SubModule2/SubModule21/*.{h,m}'\r\n    end\r\n    sp.subspec \"SubModule22\" do |ssp|\r\n      ssp.source_files = 'SubModule2/SubModule22/*.{h,m}'\r\n    end\r\n    sp.subspec \"SubModule23\" do |ssp|\r\n      ssp.source_files = 'SubModule1/SubModule23/*.{h,m}'\r\n    end\r\n  end\r\n  ...\r\n  \r\n\r\n```\r\nAfter 'pod install', you will get a project with very large user header paths. It will be duplicated by each subspec. And for the worse cases, will get a clang error: \r\n\r\n```\r\nclang: error: unable to execute command: posix_spawn failed: Argument list too long\r\nCommand /Applications/Xcode/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1\r\n```\r\nI think the user header search path should not be duplicated by each subspec or the final search path should be filttered without so many same content.\r\n"}}