huge wait during Pod install
Closed this issue · 3 comments
Hi, I have a problem with the pod install
command.
cocoapod-core version 1.2.1
it hangs on a certain line of code with the master repo:
def source_with_url(url)
UI.message "source_with_url(#{url} <#{url.class}>)"
url = url.downcase.gsub(/.git$/, '')
url = 'https://github.com/cocoapods/specs' if url =~ %r{github.com[:/]+cocoapods/specs}
UI.message "all.size #{all.size}"
res = all.find do |source|
UI.message "src=#{source}"
UI.message "same=#{source.url.downcase.gsub(/.git$/, '') == url}"
UI.message "same=#{source.url && source.url.downcase.gsub(/.git$/, '') == url}"
bb = source.url && source.url.downcase.gsub(/.git$/, '') == url
UI.message "foudn #{bb}"
bb
end
UI.message "returning #{res}"
res
end
obtaining:
[03:04:39]: ▸ Preparing
[03:04:39]: ▸ fetching sources
[03:04:39]: ▸ config phase done
[03:04:39]: ▸ finding https://stash.cleafy.org/scm/cmob/pod-specs.git...
[03:04:39]: ▸ source_with_url(https://stash.cleafy.org/scm/cmob/pod-specs.git <String>)
[03:04:39]: ▸ all.size 2
[03:04:39]: ▸ src=cleafy-scm-cmob-pod-specs
[03:04:39]: ▸ same=true
[03:04:39]: ▸ same=true
[03:04:39]: ▸ foudn true
[03:04:39]: ▸ returning cleafy-scm-cmob-pod-specs
[03:04:39]: ▸ returning cleafy-scm-cmob-pod-specs
[03:04:39]: ▸ finding https://github.com/CocoaPods/Specs.git...
[03:04:39]: ▸ source_with_url(https://github.com/CocoaPods/Specs.git <String>)
[03:04:39]: ▸ all.size 2
[03:04:39]: ▸ src=cleafy-scm-cmob-pod-specs
[03:04:39]: ▸ same=false
[03:04:39]: ▸ same=false
[03:04:39]: ▸ foudn false
[03:04:39]: ▸ src=master
[03:04:39]: ▸ same=true
[03:04:39]: ▸ same=true
[03:07:25]: ▸ foudn true
[03:07:25]: ▸ returning master
As you can see that string comparison took about 3 minutes, any coue about what is going on ?
OS: System Version: OS X 10.11.6 (15G31)
Using fastlane bundle with ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin15]
Thank you for any help 😊
Given that you perform the same exact ==
comparison on the line above, in the string interpolation for message
, I highly doubt that's the cause
Thank you for your hint 😊
Putting a STDOUT.flush
after the UI.message
let me saw the message before the delay.
So the delay comes when iterating to the next item in all
. Looking deeper.
Going to go ahead an close this as it doesn't seem to be reproducible. Feel free to comment with additional info or open another issue if you find the root of the issue