Open gunesmes opened 4 years ago
@jpsim @freddi-kit could you please review this?
Thank you for fixing my bug! 👍 I did not notice
@freddi-kit could you please review changes?
@gunesmes
Could you help to run bundle exec rubocop -a
again? robocop is reporting some code have to be fixed.
@gunesmes Could you help to run
bundle exec rubocop -a
again? robocop is reporting some code have to be fixed.
To solve all offenses, we should have made the number_of_try
optional param. I have updated to fix this.
dmg_path = download(progress, nil, number_of_try)
@jpsim fixed the issues, could you please accept the pr?
@jpsim who can push to gem? it would be helpful the person who have network issue of curl.
Is there something holding up this pull-request? It sounds like the work has been completed.
I tried just cloning the repo and running from this branch, but I can't seem to get it to work. I think it's likely my lack of Ruby knowledge is the problem though. I get an error running bundle install
that it needs an older version of bundler
, but using the older version tells me it needs the newer version.
If this isn't ready to be merged, could someone offer some guidance on how I can get this branch working as a temporary fix?
@traviswimer someone who have write access should approve this PR and then push the gem for the new release. @joshdholtz @KrauseFx @orta or @steipete
@gunesmes On it! And just for record... I’m the only one out of those 4 mentioned that are associated with this project ATM so no need to mention them in the future 😉 Just trying to save everyone from some extra GitHub notifications 🙃
@joshdholtz to fix the Assignment Branch Condition
, separated the curl part of the function to new function as curl_file
.
@gunesmes Thank you! Testing this out one more time by downloading some Xcode but code is looking 💯
@gunesmes What is this PR originally just for? Was this just for really adding the --retry-count
to the simulators
command? 😇
Yes this is fixing the simulator part for adding retry-count.
@gunesmes Okay, thank you! I’ll dig in to see what’s going on. I might end up redoing some of the argument name changes to make it backwards compatible with the previous version but I will make sure that parameter works 😇 Hopefully we can get this merged and released for you tomorrow!
How is this progressed?
@joshdholtz do you have any update for the your testing?
Can we please bump the default retry count to 10 because there is no way this succeeds in three attempts.
But on the other side, it looks like xcversion
does not really understand what's happening in curl
. I still see this as a bug, because it's clear that curl knows that there is more data left to download, yet it stops for no apparent reason.
I think the code handling the retry count should be fixed, i.e:
let CURLE_PARTIAL_FILE = 18
if curl.exitCode == CURLE_PARTIAL_FILE, downloadFileSize < expectedFileSize {
continueDownload()
} else {
retryCount += 1
if retryCount > maxRetryCount {
reportFailure()
} else {
continueDownload()
}
}
That's the thing I continue witnessing for years now:
xcversion simulators --install="iOS 10.3.1"
Installing iOS 10.3.1 Simulator for Xcode 12.4.0...
13 1883M 13 249M 0 0 2882k 0 0:11:09 0:01:28 0:09:41 2562k%
curl: (18) transfer closed with 1713831788 bytes remaining to read
22 1634M 22 361M 0 0 2475k 0 0:11:16 0:02:29 0:08:47 2399k%
curl: (18) transfer closed with 1334473327 bytes remaining to read
12 1272M 12 165M 0 0 3026k 0 0:07:10 0:00:55 0:06:15 3755k%^R
24 1272M 24 305M 0 0 2764k 0 0:07:51 0:01:53 0:05:58 2404k%
curl: (18) transfer closed with 1013687667 bytes remaining to read
%[!] Failed to download iOS 10.3.1 Simulator.
Update retrial count to 10
I am not sure what is missing to put the changes here to a release. It looks like it could be missing some kind of approval from @joshdholtz
I am trying to install simulators with xcversion, but it fails every time. I tried already around 10 times. I would like this to be more reliable, because we want to use this for the setup of our CI machines.
xcversion is an amazing tool and it helps us already a lot with installing different kind of Xcode versions, thanks a lot! :-)
@joshdholtz this is still waiting for your approval, any chance you can review it?
While I was submitting my PR https://github.com/xcpretty/xcode-install/pull/404, it was already solved by @freddi-kit with https://github.com/xcpretty/xcode-install/pull/400. However this PR includes an update for downloading simulators but the corresponding part was not implemented to
simulators.rb
so this will cause a bug for downloading simulators, as following:or
This PR is fixing this
Simulator
without
--retry_download_count
, default is 3with
--retry-download-count=5
will try to dowload 5 times