You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've added SwiftLint to .pre-commit-config.yaml and run pre-commit install, then pre-commit run --all-files. Pre-commit clones the SwiftLint repo, but installation fails.
Complete output when running SwiftLintpre-commit, including the stack trace and command used
$ pre-commit install
pre-commit installed at .git/hooks/pre-commit
$ pre-commit run --all-files
[INFO] Initializing environment for https://github.com/realm/SwiftLint.
[INFO] Installing environment for https://github.com/realm/SwiftLint.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/usr/bin/swift', 'build', '-C', '/Users/mikozik/.cache/pre-commit/repognosv8l2', '-c', 'release', '--build-path', '/Users/mikozik/.cache/pre-commit/repognosv8l2/swift_env-default/.build')
return code: 1
expected return code: 0
stdout:
Compiling plugin GenerateManualPlugin...
Compiling plugin SwiftLintPlugin...
Building for production...
[0/14] Compiling SourceKit SourceKit.c
[1/14] Compiling Clang_C Clang_C.c
remark: Incremental compilation has been disabled: it is not compatible with whole module optimizationremark: Incremental compilation has been disabled: it is not compatible with whole module optimizationremark: Incremental compilation has been disabled: it is not compatible with whole module optimizationremark: Incremental compilation has been disabled: it is not compatible with whole module optimizationremark: Incremental compilation has been disabled: it is not compatible with whole module optimization[2/19] Compiling reader.c
[3/19] Compiling parser.c
[4/19] Compiling writer.c
[5/19] Compiling api.c
[7/19] Compiling CollectionConcurrencyKit CollectionConcurrencyKit.swift
[7/19] Compiling emitter.c
[8/19] Compiling scanner.c
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization[10/20] Compiling ArgumentParserToolInfo ToolInfo.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization[11/21] Compiling SwiftyTextTable TextTable.swift
[12/21] Compiling SWXMLHash XMLAttributeDeserializable.swift
[13/21] Compiling Yams Constructor.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization[14/22] Compiling ArgumentParser BashCompletionsGenerator.swift
[15/22] Compiling SourceKittenFramework ByteCount.swift
[16/22] Compiling SwiftSyntax AbsolutePosition.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimizationremark: Incremental compilation has been disabled: it is not compatible with whole module optimizationremark: Incremental compilation has been disabled: it is not compatible with whole module optimization[16/25] Archiving libSwiftSyntax.a
[18/25] Compiling SwiftBasicFormat SyntaxProtocol+Formatted.swift
[19/25] Compiling IDEUtils Syntax+Classifications.swift
[19/25] Archiving libIDEUtils.a
[21/25] Compiling SwiftDiagnostics Diagnostic.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization[22/26] Compiling SwiftParser Attributes.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimizationremark: Incremental compilation has been disabled: it is not compatible with whole module optimization[22/28] Archiving libSwiftParser.a
[24/28] Compiling SwiftOperators Operator.swift
[24/28] Archiving libSwiftOperators.a
[26/28] Compiling SwiftParserDiagnostics DiagnosticExtensions.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization[27/29] Compiling SwiftSyntaxBuilder ConvenienceInitializers.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimization[27/29] Archiving libSwiftSyntaxBuilder.a
[29/30] Compiling SwiftLintFramework RuleDocumentation.swift
remark: Incremental compilation has been disabled: it is not compatible with whole module optimizationremark: Incremental compilation has been disabled: it is not compatible with whole module optimization[30/32] Compiling swiftlint Analyze.swift
[31/32] Compiling SwiftLintTestHelpers RuleDescription+Examples.swift
/Users/mikozik/.cache/pre-commit/repognosv8l2/Tests/SwiftLintTestHelpers/TestHelpers.swift:3:18: error: module 'SwiftLintFramework' was not compiled for testing
@testable import SwiftLintFramework
~~~~~~~~~~ ^
swift_driver/main.swift:42: Fatal error: Invalid state, could not kill process
[31/32] Linking swiftlint
stderr:
warning: '--build-path' option is deprecated; use '--scratch-path' instead
warning: '--chdir/-C' option is deprecated; use '--package-path' instead
Fetching https://github.com/apple/swift-syntax.git from cache
Fetched https://github.com/apple/swift-syntax.git (1.13s)
Fetching https://github.com/jpsim/SourceKitten.git from cache
Fetched https://github.com/jpsim/SourceKitten.git (0.75s)
Fetching https://github.com/apple/swift-argument-parser.git from cache
Fetching https://github.com/JohnSundell/CollectionConcurrencyKit.git from cache
Fetching https://github.com/scottrhoyt/SwiftyTextTable.git from cache
Fetched https://github.com/apple/swift-argument-parser.git (0.79s)
Fetching https://github.com/drmohundro/SWXMLHash.git from cache
Fetched https://github.com/scottrhoyt/SwiftyTextTable.git (0.79s)
Fetching https://github.com/jpsim/Yams.git from cache
Fetched https://github.com/JohnSundell/CollectionConcurrencyKit.git (0.79s)
Fetched https://github.com/drmohundro/SWXMLHash.git (0.80s)
Fetched https://github.com/jpsim/Yams.git (0.80s)
Computing version for https://github.com/jpsim/Yams.git
Computed https://github.com/jpsim/Yams.git at 5.0.1 (0.86s)
Computing version for https://github.com/drmohundro/SWXMLHash.git
Computed https://github.com/drmohundro/SWXMLHash.git at 7.0.1 (0.81s)
Computing version for https://github.com/apple/swift-argument-parser.git
Computed https://github.com/apple/swift-argument-parser.git at 1.1.4 (0.93s)
Computing version for https://github.com/JohnSundell/CollectionConcurrencyKit.git
Computed https://github.com/JohnSundell/CollectionConcurrencyKit.git at 0.2.0 (0.88s)
Computing version for https://github.com/scottrhoyt/SwiftyTextTable.git
Computed https://github.com/scottrhoyt/SwiftyTextTable.git at 0.9.0 (0.92s)
Creating working copy for https://github.com/apple/swift-syntax.git
Working copy of https://github.com/apple/swift-syntax.git resolved at b0b5f8d73ff5ddc0c1d6ececcc094995e8bf57dd
Creating working copy for https://github.com/apple/swift-argument-parser.git
Working copy of https://github.com/apple/swift-argument-parser.git resolved at 1.1.4
Creating working copy for https://github.com/JohnSundell/CollectionConcurrencyKit.git
Working copy of https://github.com/JohnSundell/CollectionConcurrencyKit.git resolved at 0.2.0
Creating working copy for https://github.com/jpsim/SourceKitten.git
Working copy of https://github.com/jpsim/SourceKitten.git resolved at a9e6df65d8e31e0fa6e8a05ffe40ecd54a645871
Creating working copy for https://github.com/scottrhoyt/SwiftyTextTable.git
Working copy of https://github.com/scottrhoyt/SwiftyTextTable.git resolved at 0.9.0
Creating working copy for https://github.com/jpsim/Yams.git
Working copy of https://github.com/jpsim/Yams.git resolved at 5.0.1
Creating working copy for https://github.com/drmohundro/SWXMLHash.git
Working copy of https://github.com/drmohundro/SWXMLHash.git resolved at 7.0.1
Environment
SwiftLint version (run swiftlint version to be sure)?
0.50.0
Installation method used (Homebrew, CocoaPods, building from source, etc)?
Please only build the CLI with swift build -c release --product swiftlint instead of everything, including the test helper module introduced in 0.50.0, as is done with swift build -c release
New Issue Checklist
Describe the bug
I've added SwiftLint to
.pre-commit-config.yaml
and runpre-commit install
, thenpre-commit run --all-files
. Pre-commit clones the SwiftLint repo, but installation fails.Complete output when running
SwiftLintpre-commit
, including the stack trace and command usedEnvironment
swiftlint version
to be sure)?xcodebuild -version
)?Other:
The text was updated successfully, but these errors were encountered: