{"action":"created","issue":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/8012","repository_url":"https://api.github.com/repos/CocoaPods/CocoaPods","labels_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/8012/labels{/name}","comments_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/8012/comments","events_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/8012/events","html_url":"https://github.com/CocoaPods/CocoaPods/issues/8012","id":350612329,"node_id":"MDU6SXNzdWUzNTA2MTIzMjk=","number":8012,"title":"Libraries with conflicting names with vendored_libraries from two different dependencies","user":{"login":"marcelomp","id":1036399,"node_id":"MDQ6VXNlcjEwMzYzOTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1036399?v=4","gravatar_id":"","url":"https://api.github.com/users/marcelomp","html_url":"https://github.com/marcelomp","followers_url":"https://api.github.com/users/marcelomp/followers","following_url":"https://api.github.com/users/marcelomp/following{/other_user}","gists_url":"https://api.github.com/users/marcelomp/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelomp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelomp/subscriptions","organizations_url":"https://api.github.com/users/marcelomp/orgs","repos_url":"https://api.github.com/users/marcelomp/repos","events_url":"https://api.github.com/users/marcelomp/events{/privacy}","received_events_url":"https://api.github.com/users/marcelomp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-14T21:55:56Z","updated_at":"2018-08-14T21:59:49Z","closed_at":null,"author_association":"NONE","body":"Using CocoaPods <= 1.5.3\r\nUsing Xcode 9.2: Requires CocoaPods 1.5.3.\r\n\r\n# Report\r\n\r\n## What did you do?\r\n\r\n    'pod install'\r\n\r\n## What did you expect to happen?\r\n\r\n    Install all pod dependencies correctly.\r\n\r\n## What happened instead?\r\n\r\n[!] The 'Pods-MyApp' target has libraries with conflicting names: libCommonDependency.a and libCommonDependency-simulator.a.\r\n\r\n## CocoaPods Environment\r\n\r\n### Stack\r\n\r\n```\r\nCocoaPods : 1.5.3\r\n        Ruby : ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]\r\n    RubyGems : 2.5.2\r\n        Host : Mac OS X 10.13.5 (17F77)\r\n    Xcode : 9.2 (9C40b)\r\n        Git : git version 2.14.3 (Apple Git-98)\r\nRuby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib\r\nRepositories : master - https://github.com/CocoaPods/Specs.git @ 4ebd1a592e014393618ef654e557862d2653d3d9\r\n            produbanbr-br-arch-mobile-stspec - https://gitlab.produbanbr.corp/BR-ARCH-MOBILE/STSpec.git @ 51e7a9516319b6e9c4dbb695fd7c31c27c015f24\r\n```\r\n\r\n### Installation Source\r\n\r\n```\r\nExecutable Path: /usr/local/bin/pod\r\n```\r\n\r\n### Plugins\r\n\r\n```\r\ncocoapods-deintegrate : 1.0.2\r\ncocoapods-plugins     : 1.0.0\r\ncocoapods-search      : 1.0.0\r\ncocoapods-stats       : 1.0.0\r\ncocoapods-trunk       : 1.3.0\r\ncocoapods-try         : 1.1.0\r\n```\r\n\r\n### Podfile\r\n\r\nsource 'https://github.com/CocoaPods/Specs.git'\r\n\r\ntarget 'MyApp' do\r\n    \r\n  use_frameworks!\r\n\r\n  pod 'Dependency1'\r\n  pod 'Dependency2'\r\n\r\nend\r\n\r\n# Detailed Description\r\n\r\nI have one common dependency that defines a pod that only exports a common .a library, \r\na second and a third dependency that both depend on that common dependency and an App that depend on these two dependencies\r\nbelow are the sample .podspec files to each dependency and the Podfile for the App,\r\n\r\n// Common Dependency .podspec\r\n```\r\n    Pod::Spec.new do |s|\r\n        s.name = \"CommonDependency\"\r\n        ....\r\n        s.vendored_libraries = 'libs/libCommonDependency.a', 'libs/libCommonDependency.a'\r\n        ....\r\n    end\r\n````\r\n\r\n// Dependency 1 .podspec\r\n```\r\n    Pod::Spec.new do |s|\r\n        s.name = \"Dependency1\"\r\n        ....\r\n        s.dependency 'CommonDependency'\r\n        ...\r\n    end\r\n````\r\n\r\n// Dependency 2 .podspec\r\n```\r\n    Pod::Spec.new do |s|\r\n        s.name = \"Dependency2\"\r\n        ....\r\n        s.dependency 'CommonDependency'\r\n        ....\r\n    end\r\n````\r\n\r\n// App Podfile\r\n```\r\nsource 'https://github.com/CocoaPods/Specs.git'\r\n\r\ntarget 'MyApp' do\r\n    \r\n  use_frameworks!\r\n\r\n  pod 'Dependency1'\r\n  pod 'Dependency2'\r\n\r\nend\r\n```\r\n\r\nAfter I run a pod install I get the following error,\r\n\r\n[!] The 'Pods-MyApp' target has libraries with conflicting names: libCommonDependency.a and libCommonDependency-simulator.a.\r\n\r\nThat happen because the method verify_no_duplicate_names in file target_validator.rb contains duplicated instances from those libs,\r\nthat where added from two diferent dependencies, \r\n\r\n```\r\ndef verify_no_duplicate_names(names, label, type)\r\n    duplicates = names.map { |n| n.to_s.downcase }.group_by { |f| f }.select { |_, v| v.size > 1 }.keys\r\n    unless duplicates.empty?\r\n    raise Informative, \"The '#{label}' target has \" \\\r\n        \"#{type} with conflicting names: #{duplicates.to_sentence}.\"\r\n    end\r\nend\r\n````\r\n\r\nIf i ignore the error (comment that method out) the project compiles fine, I suspect that method should consider duplicated libs from the \r\nsame dependency but not from diferent dependencies, as the project file was created fine and there are no linking errors."},"comment":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/comments/413030090","html_url":"https://github.com/CocoaPods/CocoaPods/issues/8012#issuecomment-413030090","issue_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/8012","id":413030090,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzAzMDA5MA==","user":{"login":"dnkoutso","id":310370,"node_id":"MDQ6VXNlcjMxMDM3MA==","avatar_url":"https://avatars2.githubusercontent.com/u/310370?v=4","gravatar_id":"","url":"https://api.github.com/users/dnkoutso","html_url":"https://github.com/dnkoutso","followers_url":"https://api.github.com/users/dnkoutso/followers","following_url":"https://api.github.com/users/dnkoutso/following{/other_user}","gists_url":"https://api.github.com/users/dnkoutso/gists{/gist_id}","starred_url":"https://api.github.com/users/dnkoutso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dnkoutso/subscriptions","organizations_url":"https://api.github.com/users/dnkoutso/orgs","repos_url":"https://api.github.com/users/dnkoutso/repos","events_url":"https://api.github.com/users/dnkoutso/events{/privacy}","received_events_url":"https://api.github.com/users/dnkoutso/received_events","type":"User","site_admin":false},"created_at":"2018-08-14T21:59:49Z","updated_at":"2018-08-14T21:59:49Z","author_association":"CONTRIBUTOR","body":"Want to attempt to fix this with a PR and a test?"}}
{"actor":{"display_login":"dnkoutso"}}