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

SwiftLint v0.54.0 fails to be installed with Mint #5348

Closed
2 tasks done
asa08 opened this issue Nov 14, 2023 · 15 comments
Closed
2 tasks done

SwiftLint v0.54.0 fails to be installed with Mint #5348

asa08 opened this issue Nov 14, 2023 · 15 comments
Labels
help integration Issues related to integration of SwiftLint into toolchains.

Comments

@asa08
Copy link

asa08 commented Nov 14, 2023

New Issue Checklist

Describe the bug

An error occurs when executing the following commands.

mint bootstrap
Complete output when running SwiftLint, including the stack trace and command used
$ mint bootstrap
🌱 Cloning SwiftLint 0.54.0
🌱 Resolving package
🌱 Building product swiftlint
Building for production...
[0/11] Compiling SourceKit SourceKit.c
[1/11] Compiling Clang_C Clang_C.c
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[3/13] Compiling SwiftSyntax509 Empty.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[3/13] Compiling DyldWarningWorkaround DyldWarningWorkaround.c
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[4/15] Compiling writer.c
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[5/16] Compiling parser.c
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[6/16] Compiling reader.c
[7/17] Compiling emitter.c
[8/17] Compiling scanner.c
[9/17] Compiling api.c
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[11/18] Compiling CollectionConcurrencyKit CollectionConcurrencyKit.swift
[12/18] Compiling ArgumentParserToolInfo ToolInfo.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[13/19] Compiling SwiftyTextTable TextTable.swift
[14/19] Compiling SWXMLHash XMLAttributeDeserializable.swift
[15/19] Compiling Yams Constructor.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[16/20] Compiling ArgumentParser BashCompletionsGenerator.swift
[17/20] Compiling SourceKittenFramework ByteCount.swift
[18/20] Compiling SwiftSyntax AbsolutePosition.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[19/24] Compiling SwiftIDEUtils SwiftIDEUtilsCompatibility.swift
[20/24] Compiling SwiftBasicFormat BasicFormat.swift
[21/24] Compiling SwiftDiagnostics Convenience.swift
[22/24] Compiling SwiftParser Attributes.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[23/26] Compiling SwiftOperators Operator.swift
[24/26] Compiling SwiftParserDiagnostics DiagnosticExtensions.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[25/27] Compiling SwiftSyntaxBuilder ConvenienceInitializers.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[26/28] Compiling SwiftSyntaxMacros AbstractSourceLocation.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[27/29] Compiling SwiftSyntaxMacroExpansion BasicMacroExpansionContext.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[28/30] Compiling SwiftCompilerPluginMessageHandling CompilerPluginMessageHandler.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[29/31] Compiling SwiftCompilerPlugin CompilerPlugin.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[30/32] Compiling SwiftLintCoreMacros RuleConfigurationMacros.swift
[30/32] Linking SwiftLintCoreMacros
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization
[32/33] Compiling SwiftLintCore RuleDocumentation.swift
rosetta error: Failed to open libRosettaRuntime
 <unknown>:0: warning: compiler plugin not loaded: '/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/.build/x86_64-apple-macosx/release/SwiftLintCoreMacros; failed to initialize
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/ViolationSeverity.swift:3:13: error: external macro implementation type 'SwiftLintCoreMacros.MakeAcceptableByConfigurationElement' could not be found for macro 'MakeAcceptableByConfigurationElement()'
public enum ViolationSeverity: String, Comparable, Codable, InlinableOptionType {
            ^
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Helpers/Macros.swift:18:14: note: 'MakeAcceptableByConfigurationElement()' declared here
public macro MakeAcceptableByConfigurationElement() = #externalMacro(
             ^
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Helpers/Macros.swift:7:14: warning: external macro implementation type 'SwiftLintCoreMacros.AutoApply' could not be found for macro 'AutoApply()'
public macro AutoApply() = #externalMacro(
             ^
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Helpers/Macros.swift:18:14: warning: external macro implementation type 'SwiftLintCoreMacros.MakeAcceptableByConfigurationElement' could not be found for macro 'MakeAcceptableByConfigurationElement()'
public macro MakeAcceptableByConfigurationElement() = #externalMacro(
             ^
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Helpers/Macros.swift:37:14: warning: external macro implementation type 'SwiftLintCoreMacros.SwiftSyntaxRule' could not be found for macro 'SwiftSyntaxRule(foldExpressions:explicitRewriter:)'
public macro SwiftSyntaxRule(foldExpressions: Bool = false, explicitRewriter: Bool = false) = #externalMacro(
             ^
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/SeverityConfiguration.swift:8:6: error: generic struct 'ConfigurationElement' requires that 'ViolationSeverity' conform to 'AcceptableByConfigurationElement'
    @ConfigurationElement(key: "severity")
     ^
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/RuleConfigurationDescription.swift:393:15: note: where 'T' = 'ViolationSeverity'
public struct ConfigurationElement<T: AcceptableByConfigurationElement & Equatable>: Equatable {
              ^
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/SeverityConfiguration.swift:8:6: note: did you mean to use '.rawValue'?
    @ConfigurationElement(key: "severity")
     ^
                         .rawValue
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/SeverityConfiguration.swift:8:6: error: generic struct 'ConfigurationElement' requires that 'ViolationSeverity' conform to 'AcceptableByConfigurationElement'
    @ConfigurationElement(key: "severity")
     ^
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/RuleConfigurationDescription.swift:393:15: note: where 'T' = 'ViolationSeverity'
public struct ConfigurationElement<T: AcceptableByConfigurationElement & Equatable>: Equatable {
              ^
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/SeverityConfiguration.swift:8:6: note: did you mean to use '.rawValue'?
    @ConfigurationElement(key: "severity")
     ^
                         .rawValue
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/SeverityConfiguration.swift:8:6: error: generic struct 'ConfigurationElement' requires that 'ViolationSeverity' conform to 'AcceptableByConfigurationElement'
    @ConfigurationElement(key: "severity")
     ^
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/RuleConfigurationDescription.swift:393:15: note: where 'T' = 'ViolationSeverity'
public struct ConfigurationElement<T: AcceptableByConfigurationElement & Equatable>: Equatable {
              ^
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/SeverityConfiguration.swift:8:6: note: did you mean to use '.rawValue'?
    @ConfigurationElement(key: "severity")
     ^
                         .rawValue
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/SeverityConfiguration.swift:2:15: error: type 'SeverityConfiguration<Parent>' does not conform to protocol 'Equatable'
public struct SeverityConfiguration<Parent: Rule>: SeverityBasedRuleConfiguration {
              ^
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/SeverityConfiguration.swift:9:9: note: stored property type '<<error type>>' does not conform to protocol 'Equatable', preventing synthesized conformance of 'SeverityConfiguration<Parent>' to 'Equatable'
    var severity = ViolationSeverity.warning
        ^
Swift.==:1:24: note: candidate would match if 'SeverityConfiguration<Parent>' conformed to 'RawRepresentable'
@inlinable public func == <T>(lhs: T, rhs: T) -> Bool where T : RawRepresentable, T.RawValue : Equatable
                       ^
Swift.FloatingPoint:2:24: note: candidate would match if 'SeverityConfiguration<Parent>' conformed to 'FloatingPoint'
    public static func == (lhs: Self, rhs: Self) -> Bool
                       ^
Swift.BinaryInteger:2:24: note: candidate would match if 'SeverityConfiguration<Parent>' conformed to 'BinaryInteger'
    public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : BinaryInteger
                       ^
Swift._Pointer:2:24: note: candidate would match if 'SeverityConfiguration<Parent>' conformed to '_Pointer'
    public static func == (lhs: Self, rhs: Self) -> Bool
                       ^
Swift._Pointer:3:35: note: candidate would match if 'SeverityConfiguration<Parent>' conformed to '_Pointer'
    @inlinable public static func == <Other>(lhs: Self, rhs: Other) -> Bool where Other : _Pointer
                                  ^
Swift.Strideable:3:35: note: candidate would match if 'SeverityConfiguration<Parent>' conformed to 'Strideable'
    @inlinable public static func == (x: Self, y: Self) -> Bool
                                  ^
Swift.StringProtocol:2:35: note: candidate would match if 'SeverityConfiguration<Parent>' conformed to 'StringProtocol'
    @inlinable public static func == <RHS>(lhs: Self, rhs: RHS) -> Bool where RHS : StringProtocol
                                  ^
Swift.SIMD:4:24: note: candidate would match if 'SeverityConfiguration<Parent>' conformed to 'SIMD'
    public static func == (a: Self, b: Self) -> Bool
                       ^
Swift.Equatable:2:17: note: protocol requires function '==' with type '(SeverityConfiguration<Parent>, SeverityConfiguration<Parent>) -> Bool'
    static func == (lhs: Self, rhs: Self) -> Bool
                ^
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/SeverityConfiguration.swift:19:14: error: cannot assign to property: 'severity' is a get-only property
        self.severity = severity
        ~~~~~^~~~~~~~
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/SeverityConfiguration.swift:29:14: error: cannot assign to property: 'severity' is a get-only property
        self.severity = severity
        ~~~~~^~~~~~~~
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/ViolationSeverity.swift:3:13: error: type 'ViolationSeverity' does not conform to protocol 'AcceptableByConfigurationElement'
public enum ViolationSeverity: String, Comparable, Codable, InlinableOptionType {
            ^
/private/var/folders/rj/r1dvm6cd12s1cwvfk70xzx780000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/RuleConfigurationDescription.swift:354:17: note: type 'ViolationSeverity' does not conform to inherited protocol 'AcceptableByConfigurationElement'
public protocol InlinableOptionType: AcceptableByConfigurationElement {}
                ^
error: fatalError
🌱 Encountered error during "swift build -c release --product swiftlint -Xswiftc -target -Xswiftc x86_64-apple-macosx13.5". Use --verbose to see full output
🌱  Failed to build SwiftLint 0.54.0 with SPM
iMac-mm-6201:newspicks-app-ios mu$ mint install realm/SwiftLint@0.54.0
🌱 Cloning SwiftLint 0.54.0
🌱 Resolving package
🌱 Building product swiftlint

Environment

  • SwiftLint version 0.54.0
  • Installation method used Mint version 0.17.5.
  • Paste your configuration file:
disabled_rules:
  - identifier_name
  - line_length
  - file_length
  - type_body_length
  - force_cast
  - type_name
  - cyclomatic_complexity
  - function_body_length
  - force_try
  - nesting
  - function_parameter_count
  - large_tuple

included:
  - xxx(Confidential information)
  • Xcode Version 15.0
@jpsim
Copy link
Collaborator

jpsim commented Nov 14, 2023

rosetta error: Failed to open libRosettaRuntime

Have you tried installing Rosetta?

@SimplyDanny SimplyDanny added integration Issues related to integration of SwiftLint into toolchains. help labels Nov 14, 2023
@erikkerber
Copy link

erikkerber commented Nov 21, 2023

@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)

@SimplyDanny
Copy link
Collaborator

Nothing requires Rosetta in SwiftLint itself.

If I run swift build -c release --product swiftlint -Xswiftc -target -Xswiftc x86_64-apple-macosx13.5 on an Apple Silicon Mac, I see the exact same error, even with Rosetta installed. The x86_64-apple-macosx13.5 target seems wrong to me. If the Mint command is run on an Arm-based Mac, we wouldn't see the x86_64. On the other hand, running the command on an Intel-based Mac wouldn't require Rosetta.

@asa08: On which platform do you run the command?

@jpsim
Copy link
Collaborator

jpsim commented Nov 22, 2023

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?

@erikkerber
Copy link

erikkerber commented Nov 22, 2023

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

ERROR: /private/var/tmp/_bazel_buildkite/e21df498267afdbcbfd273d3ab407ad2/external/swiftlint~0.54.0/BUILD:48:14: Compiling Swift module @@swiftlint~0.54.0//:SwiftLintCore failed: (Exit 1): worker failed: error executing SwiftCompile command (from target @@swiftlint~0.54.0//:SwiftLintCore)
--
  | (cd /private/var/tmp/_bazel_buildkite/e21df498267afdbcbfd273d3ab407ad2/execroot/_main && \
  | exec env - \
  | APPLE_SDK_PLATFORM=MacOSX \
  | APPLE_SDK_VERSION_OVERRIDE=14.0 \
  | PATH=/bin:/usr/bin:/usr/local/bin \
  | SWIFT_AVOID_WARNING_USING_OLD_DRIVER=1 \
  | XCODE_VERSION_OVERRIDE=15.0.0.15A240d \
  | ZERO_AR_DATE=1 \
  | bazel-out/darwin_x86_64-opt-exec-ST-13d3ddad9198/bin/external/rules_swift~1.13.0/tools/worker/worker swiftc @bazel-out/darwin_x86_64-dbg/bin/external/swiftlint~0.54.0/SwiftLintCore.swiftmodule-0.params)
  | # Configuration: d18ff59a88335a8e65c7576b51d3557be72a9bdefd3da972549ee68dd90e23ee
  | # Execution platform: @@local_config_platform//:host
  | error: emit-module command failed with exit code 1 (use -v to see invocation)
  | rosetta error: Failed to open libRosettaRuntime
  | <unknown>:0: warning: compiler plugin not loaded: '/private/var/tmp/_bazel_buildkite/e21df498267afdbcbfd273d3ab407ad2/execroot/_main/bazel-out/darwin_x86_64-opt-exec-ST-13d3ddad9198/bin/external/swiftlint~0.54.0/SwiftLintCoreMacros; failed to initialize
  | external/swiftlint~0.54.0/Source/SwiftLintCore/Helpers/Macros.swift:7:14: warning: external macro implementation type 'SwiftLintCoreMacros.AutoApply' could not be found for macro 'AutoApply()'
  | public macro AutoApply() = #externalMacro(
...

I also see darwin_x86_64-dbg in there. This is on an Apple Silicon machine. It's 13.5 (my local machine is 14.1).

@jpsim
Copy link
Collaborator

jpsim commented Nov 22, 2023

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.

@SimplyDanny
Copy link
Collaborator

SimplyDanny commented Nov 22, 2023

I'm on M1, macOS 14.1.1, with Xcode 15.0 (15A240d) installed and selected.

Same for me. Both work. Cross-compiling with swift build -c release --product swiftlint -Xswiftc -target -Xswiftc x86_64-apple-macosx14.1 produces the reported error though. Might be caused by SPM not yet supporting cross-compilation?

@pdrcabrod
Copy link

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

@erikkerber
Copy link

We were also spawning from an x86/Rosetta process (forgotten x86 Danger binary). Sorry for the added noise 🙇

@SimplyDanny
Copy link
Collaborator

Seems like this is resolved then. @asa08, feel free to reopen if not for you.

@yamataku29
Copy link

@SimplyDanny
Hi Danny.
I have a similar problems is occurring in my environment.

There're some fatalError in SeverityConfiguration.swift and ViolationSeverity.swift.
You can see it in attached images.

Could you tell me the solution?

スクリーンショット 2024-02-06 16 01 23

スクリーンショット 2024-02-06 16 01 26

I let you know some information text in bellow.

■fatalError

/private/var/folders/51/lhm4698x3gzb7_lxrw5gcgvw0000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/SeverityConfiguration.swift:2:15 type 'SeverityConfiguration' does not conform to protocol 'Equatable'

/private/var/folders/51/lhm4698x3gzb7_lxrw5gcgvw0000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/SeverityConfiguration.swift:8:6 generic struct 'ConfigurationElement' requires that 'ViolationSeverity' conform to 'AcceptableByConfigurationElement'

/private/var/folders/51/lhm4698x3gzb7_lxrw5gcgvw0000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/SeverityConfiguration.swift:19:14 cannot assign to property: 'severity' is a get-only property

/private/var/folders/51/lhm4698x3gzb7_lxrw5gcgvw0000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/SeverityConfiguration.swift:29:14 cannot assign to property: 'severity' is a get-only property

/private/var/folders/51/lhm4698x3gzb7_lxrw5gcgvw0000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/ViolationSeverity.swift:3:13 external macro implementation type 'SwiftLintCoreMacros.MakeAcceptableByConfigurationElement' could not be found for macro 'MakeAcceptableByConfigurationElement()'

/private/var/folders/51/lhm4698x3gzb7_lxrw5gcgvw0000gn/T/mint/github.com_realm_SwiftLint/Source/SwiftLintCore/Models/ViolationSeverity.swift:3:13 type 'ViolationSeverity' does not conform to protocol 'AcceptableByConfigurationElement'

SwiftGen/SwiftGen@6.6.2
realm/SwiftLint@0.53.0

@yamataku29
Copy link

I send you more Information.
I did comment out like bellow.

export PATH="/opt/homebrew/bin:$PATH"

if which mint >/dev/null; then
  #xcrun --sdk macosx mint run swiftlint swiftlint --fix
  #xcrun --sdk macosx mint run swiftlint swiftlint
  echo "testtest"
else
  echo "warning: Mint not installed, download from https://github.com/yonaskolb/Mint"
fi

Then, it start working.

@exevil
Copy link

exevil commented Feb 13, 2024

The same problem happens while installing 0.54.0 using pre-commit. 0.53.0 works as expected.

@SimplyDanny
Copy link
Collaborator

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.

@mactkg
Copy link

mactkg commented Mar 8, 2024

my co-worker was encountered this issue, but we could resolved.

tl;dr

If you installed mint with homebrew, reinstall homebrew without Rosetta. And reinstall mint, SwiftLint without Rosetta.

details

my co-worker was encountered this issue, but we could resolved the issue with this approach.

#5348 (comment)

If homebrew was installed in Rosetta environment, homebrew is seems to install packages for x86_64 architecture even if Terminal launched without Rosetta.
In fact, mint binary is built for x86_64 arch.

$ 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:

  • Uninstall homebrew(in Rosetta environment)
  • Install homebrew(in non Rosetta environment)
  • Install mint by homebrew
  • Install SwiftLint by mint
  • It will work...!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help integration Issues related to integration of SwiftLint into toolchains.
Projects
None yet
Development

No branches or pull requests

8 participants