Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SwiftLint (0.50.3) version in Dockerfile used in danger-swift-with-swiftlint container. #573

Merged
merged 1 commit into from
Mar 2, 2023

Conversation

JaviLorbada
Copy link
Contributor

This PR aims to update SwiftLint to version 0.50.3 used in danger-swift-with-swiftlint docker container.

SwiftLint release: https://github.com/realm/SwiftLint/releases/tag/0.50.3

@JaviLorbada
Copy link
Contributor Author

@f-meloni could we try to create a new version of the danger-swift-with-swiftlint container and bump swiftlint to 0.50.3?

If something fails while building the container we can easily roll back, although I tried docker build and everything seemed fine. Thanks so much.

@f-meloni
Copy link
Member

Yes, I'm currently not at home, but will be back and release beginning of next week 🙂

@JaviLorbada
Copy link
Contributor Author

Awesome! Thank you very much!

@f-meloni f-meloni merged commit 5a4b12f into danger:master Mar 2, 2023
@JaviLorbada
Copy link
Contributor Author

Thanks for merging @f-meloni! 🙏🏼 Is there any date scheduled for the next release? Is there a way I can fetch a docker container including these changes? Thank you.

@f-meloni
Copy link
Member

f-meloni commented Mar 5, 2023

I have done the release, but the build failed because the new swiftlint requires bazel

@JaviLorbada
Copy link
Contributor Author

Oh, no! I had no idea about that, sorry it broke the release.

@f-meloni
Copy link
Member

f-meloni commented Mar 6, 2023

No problem at all :) it can still be fixed or reverted, everything else but the container with swiftlint should be working ok

@icecoffin
Copy link

Any idea what could be the solution here to allow using the 3.16.0 container with SwiftLint? I believe Bazel can be installed via npm (npm install -g @bazel/bazelisk) which we already use to install Danger-JS. Alterrnatively, it can be installed using apt-get but the process looks a big more complicated (https://bazel.build/install/ubuntu). Would adding this extra step to the Dockerfile help?

@f-meloni
Copy link
Member

f-meloni commented Apr 16, 2023

Any idea what could be the solution here to allow using the 3.16.0 container with SwiftLint? I believe Bazel can be installed via npm (npm install -g @bazel/bazelisk) which we already use to install Danger-JS. Alterrnatively, it can be installed using apt-get but the process looks a big more complicated (https://bazel.build/install/ubuntu). Would adding this extra step to the Dockerfile help?

I had tried with apt get before, and had some issues with the versioning.
I have tried npm install -g @bazel/bazelisk and that seemed to work well, but then I found out that I also need ruby 😢

Error in fail: Command 'ruby' not found. Set $PATH or specify interpreter_path interpreter_path
#6 29.37 ERROR: /_swiftlint/WORKSPACE:71:22: fetching ruby_runtime rule //external:org_ruby_lang_ruby_toolchain: Traceback (most recent call last):
#6 29.37 	File "/root/.cache/bazel/_bazel_root/52554737be0413482e9bd72efb59fb14/external/bazelruby_rules_ruby/ruby/private/toolchains/ruby_runtime.bzl", line 128, column 13, in _ruby_runtime_impl
#6 29.37 		fail(
#6 29.37 Error in fail: Command 'ruby' not found. Set $PATH or specify interpreter_path interpreter_path

After installing that and setting CC=clang as required, I still get

#6 38.12 ERROR: /root/.cache/bazel/_bazel_root/52554737be0413482e9bd72efb59fb14/external/local_config_cc/BUILD:47:19: in cc_toolchain_suite rule @local_config_cc//:toolchain: cc_toolchain_suite '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'darwin_arm64'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants