Closed dzenbot closed 6 years ago
@dzenbot The repository was missing a tag for 0.11.0
. I just pushed it now. Could you try again?
Unfortunately, that didn't help. Any version after 0.8.0
is failing for us, which I can't seem to understand why...
Looking at the your CI logs, it looks like the error was caused by being unable to download the portable version of SwiftLint. What is your SWIFTLINT_VERSION
value by the way?
It is an environment variable that we've been using to fix a Swiftlint version, from https://github.com/ashfurrow/danger-swiftlint#usage
I think it was caused by GitHub API limit. You can install SwiftLint via Homebrew or CocoaPods instead.
Okay so this is mysterious – sorry about the problems you've been having.
Bundler is failing when installing danger-swiftlint
because the script to install swiftlint
is failing. What I don't understand is why Bundler is running the default Rake task when installing the gem.
This line is, I think, overriding the default task:
We should probably remove that line.
Does anyone know if bundle install
runs the default Rake task on install? I've not seen that before, but if that's the case, we should be more careful.
@ashfurrow bundle install
should indeed run the default Rake task on /ext folder. The reason is because it is configured on the gemspec
The idea is to always download a specific swiftlint version into the users's computer so we don't need to expect it to be already installed. The purpose is to have a more bullet proof and self contained installation process.
In the past people had either very old/super new versions of swiftlint and the danger plugin wasn't able to integrate with that correctly due to breaking changes between one and another.
Thanks for following up @thiagofelix – I didn't know that!
@dzenbot I'm trying to reproduce the bug but I'm running into problems. The installation is failing when installing SwiftLint here:
But I'm able to run that locally without issue. Can you try running these two commands?
curl -s -L https://github.com/realm/SwiftLint/releases/download/<SWIFTLINT_VERSION redacted>/portable_swiftlint.zip -o portable_swiftlint.zip
unzip -q portable_swiftlint.zip -d /private/tmp/sandbox/workspace/vendor/bundle/ruby/2.2.0/gems/danger-swiftlint-0.11.0/ext/swiftlint/bin
I think figuring out why this is failing is the next step. Thanks!
Also seeing this error on our Jenkins CI while getting Danger
and this plugin setup 😕 Oddly enough, I do not get this error locally.
@Kalvin126 I am not available this week to work on this issue – if you are able to follow the instructions above for reproducing the error in your CI environment, that would help us fix the problem.
I am a bit confused why it needs to download swxftlint if we could define a path to a swiftlint binary. Would it be possible to just pass a path to the report.json
so it does not have to run the binary?
I think the answer to that question is in @thiagofelix's comment earlier:
The idea is to always download a specific swiftlint version into the users's computer so we don't need to expect it to be already installed. The purpose is to have a more bullet proof and self contained installation process.
Without more info, I can't really diagnose the problem. You're welcome to work on a fork that removes this functionality, or send a PR that can optionally disable it.
Since we started using 0.12.1
, this has not been an issue for us.
Seems like this is resolved. Closing it.
Since https://github.com/ashfurrow/danger-swiftlint/pull/55 got merged and new versions have been release, we haven't been able to upgrade. Whatever new version of
danger-swiftlint
is released, we keep getting aGem::Ext::BuildError: ERROR: Failed to build gem native extension.
on the CI.Any version after
0.8.0
is failing for us.Any help would be greatly appreciated!
This is my Gemfile:
And the CI logs (buddybuild):