-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
SwiftLint v0.54.0 fails to be installed with Mint #5348
Comments
Have you tried installing Rosetta? |
@jpsim Very LQ: What is requiring Rosetta as of 0.54.0? We don't install it on our CI, so wondering if there's a reason we should/need to going forward? (We install via the bzlmod BCR) |
Nothing requires Rosetta in SwiftLint itself. If I run @asa08: On which platform do you run the command? |
The main change that I think could cause this in 0.54.0 is the addition of Swift macros. Does Mint have trouble installing other projects using macros? |
Sorry I should have clarified. We aren't using Mint, we're using Bazel with bzlmod. bazel_dep(name = "swiftlint", version = "0.54.0") We get the same Rosetta-ish error when (it appears) it's compiling macros
I also see |
Trying and failing to reproduce this. $ mint run realm/SwiftLint@0.54.0 version
0.54.0 So that works for me. I also tried with Bazel / bzlmod: $ git clone https://github.com/jpsim/swiftlint-bazel-example
$ cd swiftlint-bazel-example
$ bazel run -c opt @SwiftLint//:swiftlint -- version
INFO: Analyzed target @swiftlint~0.54.0//:swiftlint (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
Target @swiftlint~0.54.0//:swiftlint up-to-date:
bazel-bin/external/swiftlint~0.54.0/swiftlint
INFO: Elapsed time: 0.072s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Running command line: bazel-bin/external/swiftlint~0.54.0/swiftlint version
0.54.0 I'm on M1, macOS 14.1.1, with Xcode 15.0 (15A240d) installed and selected. |
Same for me. Both work. Cross-compiling with |
I was having the issue. Sharing my observations in case it helps somebody else In my case the problem was that I had Homebrew installed for intel chipsets (prefix /usr/local). Migrating Homebrew to the M1 chipset, then install mint using the new Homebrew installation, did the trick |
We were also spawning from an x86/Rosetta process (forgotten x86 Danger binary). Sorry for the added noise 🙇 |
Seems like this is resolved then. @asa08, feel free to reopen if not for you. |
@SimplyDanny There're some fatalError in SeverityConfiguration.swift and ViolationSeverity.swift. Could you tell me the solution? I let you know some information text in bellow. ■fatalError
|
I send you more Information.
Then, it start working. |
The same problem happens while installing 0.54.0 using pre-commit. 0.53.0 works as expected. |
0.54.0 is the first version requiring Swift 5.9 to make use of the macro feature. @yamataku29: In your logs, we see that the macros cannot be resolved. I'm not a Mint user. So I cannot tell from my experience what's wrong. |
my co-worker was encountered this issue, but we could resolved. tl;drIf you installed mint with homebrew, reinstall homebrew without Rosetta. And reinstall mint, SwiftLint without Rosetta. detailsmy co-worker was encountered this issue, but we could resolved the issue with this approach. If homebrew was installed in Rosetta environment, homebrew is seems to install packages for x86_64 architecture even if Terminal launched without Rosetta. $ file /usr/local/bin/mint
/usr/local/bin/mint: Mach-O 64-bit executable x86_64 Again, it can't change architecture to arm64 even if reinstall mint with non rosetta emulated Terminal.app. Reinstall homebrew for x86_64 arch(without rosetta) to resolve this issue. Steps:
|
New Issue Checklist
Describe the bug
An error occurs when executing the following commands.
Complete output when running SwiftLint, including the stack trace and command used
Environment
The text was updated successfully, but these errors were encountered: