{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/Sonar/issues/93","repository_url":"https://api.github.com/repos/facebook/Sonar","labels_url":"https://api.github.com/repos/facebook/Sonar/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/facebook/Sonar/issues/93/comments","events_url":"https://api.github.com/repos/facebook/Sonar/issues/93/events","html_url":"https://github.com/facebook/Sonar/issues/93","id":333881936,"node_id":"MDU6SXNzdWUzMzM4ODE5MzY=","number":93,"title":"Refactor Sonar Podspec to include all of its dependencies","user":{"login":"pkrmf","id":1714267,"node_id":"MDQ6VXNlcjE3MTQyNjc=","avatar_url":"https://avatars3.githubusercontent.com/u/1714267?v=4","gravatar_id":"","url":"https://api.github.com/users/pkrmf","html_url":"https://github.com/pkrmf","followers_url":"https://api.github.com/users/pkrmf/followers","following_url":"https://api.github.com/users/pkrmf/following{/other_user}","gists_url":"https://api.github.com/users/pkrmf/gists{/gist_id}","starred_url":"https://api.github.com/users/pkrmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkrmf/subscriptions","organizations_url":"https://api.github.com/users/pkrmf/orgs","repos_url":"https://api.github.com/users/pkrmf/repos","events_url":"https://api.github.com/users/pkrmf/events{/privacy}","received_events_url":"https://api.github.com/users/pkrmf/received_events","type":"User","site_admin":false},"labels":[{"id":962271268,"node_id":"MDU6TGFiZWw5NjIyNzEyNjg=","url":"https://api.github.com/repos/facebook/Sonar/labels/iOS","name":"iOS","color":"0644EE","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2018-06-20T00:15:23Z","updated_at":"2018-06-26T04:49:43Z","closed_at":null,"author_association":"NONE","body":"We should make sure to declare all the Sonar dependencies within Sonar's podspec, and make sure they point to the versions they depend on(we could also use the ~> for floating versions). \r\n\r\nIt is very hard to maintain an application consuming Sonar since its Podfile has to manually define all Sonar's dependencies and the paths to the each one of the podspecs. What happens if we update Sonar? Then we also might have to manually update the dependencies Sonar is depending on.\r\n\r\nThere are two ways to prevent this from happening:\r\n- Upload all the Sonar's dependencies podspecs to the cocoapods public master repo along with Sonar podspec and make sure we define those dependencies in the Sonar's podspec.\r\n- Create a private repo and push the Sonar's podspec and its podspec dependencies to it. Then communicate to consumers of Sonar that they have to include the source of the private repo within the Podfile.\r\n\r\nSonar's consumers would go from this:\r\n\r\n```\r\nplatform :ios, '8.0'\r\nswift_version = '4.1'\r\n\r\ntarget 'MyApp' do\r\n\r\n  pod 'RSocket', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/RSocket.podspec'\r\n  pod 'DoubleConversion', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/DoubleConversion.podspec'\r\n  pod 'glog', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/glog.podspec'\r\n  pod 'Folly', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/Folly.podspec'\r\n  pod 'PeerTalk', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/PeerTalk.podspec'\r\n  pod 'Yoga','~>1.8.1', :modular_headers => true\r\n  pod 'Sonar', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/xplat/Sonar/Sonar.podspec'\r\n  pod 'SonarKit', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/SonarKit.podspec'\r\n  pod 'SonarKit/SonarKitLayoutComponentKitSupport', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/SonarKit.podspec'\r\n  pod 'SonarKit/SKIOSNetworkPlugin', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/SonarKit.podspec'\r\n  pod 'ComponentKit', :podspec => 'https://raw.githubusercontent.com/facebook/Sonar/master/iOS/third-party-podspecs/ComponentKit.podspec'\r\n  post_install do |installer|\r\n        installer.pods_project.targets.each do |target|\r\n            if ['YogaKit'].include? target.name\r\n                target.build_configurations.each do |config|\r\n                    config.build_settings['SWIFT_VERSION'] = swift_version\r\n                end\r\n            end\r\n        end\r\n    end\r\nend\r\n```\r\n\r\nTo this:\r\n```\r\nplatform :ios, '8.0'\r\nswift_version = '4.1'\r\n# The path to the private repo source if we decide pod specs need to be hosted in a private repo.\r\nsource 'https://path/to/private/repo'\r\ntarget 'MyApp' do\r\n   pod 'Sonar', '~>x.y'\r\nend\r\n```\r\n\r\nIf you guys are OK with this approach I can make the changes, create the private repo and submit the merge request."},"comment":{"url":"https://api.github.com/repos/facebook/Sonar/issues/comments/400177621","html_url":"https://github.com/facebook/Sonar/issues/93#issuecomment-400177621","issue_url":"https://api.github.com/repos/facebook/Sonar/issues/93","id":400177621,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDE3NzYyMQ==","user":{"login":"pkrmf","id":1714267,"node_id":"MDQ6VXNlcjE3MTQyNjc=","avatar_url":"https://avatars3.githubusercontent.com/u/1714267?v=4","gravatar_id":"","url":"https://api.github.com/users/pkrmf","html_url":"https://github.com/pkrmf","followers_url":"https://api.github.com/users/pkrmf/followers","following_url":"https://api.github.com/users/pkrmf/following{/other_user}","gists_url":"https://api.github.com/users/pkrmf/gists{/gist_id}","starred_url":"https://api.github.com/users/pkrmf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkrmf/subscriptions","organizations_url":"https://api.github.com/users/pkrmf/orgs","repos_url":"https://api.github.com/users/pkrmf/repos","events_url":"https://api.github.com/users/pkrmf/events{/privacy}","received_events_url":"https://api.github.com/users/pkrmf/received_events","type":"User","site_admin":false},"created_at":"2018-06-26T04:49:43Z","updated_at":"2018-06-26T04:49:43Z","author_association":"NONE","body":"@noahsark769 That is correct sir!\r\n@priteshrnandgaonkar Pull [my fork](https://github.com/pkrmf/Sonar) and pod install the sample app. As you can see, it pod installs and runs the app without any problem. [Link to Podfile in my fork](https://github.com/pkrmf/Sonar/blob/master/iOS/Sample/Podfile)"}}
{"actor":{"display_login":"pkrmf"}}