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

Issue with running Komondor hooks #28

Closed
minuscorp opened this issue Sep 30, 2019 · 2 comments
Closed

Issue with running Komondor hooks #28

minuscorp opened this issue Sep 30, 2019 · 2 comments

Comments

@minuscorp
Copy link
Collaborator

I'm using the latest version (master) and I keep getting the same output when I try to run a hook:

13/13] Linking komondor
Package.swift:6:15: error: 'init(name:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageVersions:cLanguageStandard:cxxLanguageStandard:)' is unavailable
let package = Package(
              ^~~~~~~
PackageDescription.Package:29:12: note: 'init(name:platforms:pkgConfig:providers:products:dependencies:targets:swiftLanguageVersions:cLanguageStandard:cxxLanguageStandard:)' was introduced in PackageDescription 5
    public init(name: String, platforms: [PackageDescription.SupportedPlatform]? = nil, pkgConfig: String? = nil, providers: [PackageDescription.SystemPackageProvider]? = nil, products: [PackageDescription.Product] = [], dependencies: [PackageDescription.Package.Dependency] = [], targets: [PackageDescription.Target] = [], swiftLanguageVersions: [PackageDescription.SwiftVersion]? = nil, cLanguageStandard: PackageDescription.CLanguageStandard? = nil, cxxLanguageStandard: PackageDescription.CXXLanguageStandard? = nil)
           ^
Package.swift:35:10: error: 'target(name:dependencies:path:exclude:sources:publicHeadersPath:)' is unavailable
        .target(
         ^~~~~~
PackageDescription.Target:34:24: note: 'target(name:dependencies:path:exclude:sources:publicHeadersPath:)' was introduced in PackageDescription 4
    public static func target(name: String, dependencies: [PackageDescription.Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil, publicHeadersPath: String? = nil) -> PackageDescription.Target
                       ^
Package.swift:38:10: error: 'testTarget(name:dependencies:path:exclude:sources:)' is unavailable
        .testTarget(
         ^~~~~~~~~~
PackageDescription.Target:38:24: note: 'testTarget(name:dependencies:path:exclude:sources:)' was introduced in PackageDescription 4
    public static func testTarget(name: String, dependencies: [PackageDescription.Target.Dependency] = [], path: String? = nil, exclude: [String] = [], sources: [String]? = nil) -> PackageDescription.Target
                       ^
Fatal error: Error raised at top level: PackageConfig.Error(reason: "Could not find a file at /var/folders/n4/zbkl28756wj08660vtf58qz80000gn/T/package-config - something went wrong with compilation step probably"): file /BuildRoot/Library/Caches/com.apple.xbs/Sources/swiftlang/swiftlang-1100.8.259.70/swift/stdlib/public/core/ErrorType.swift, line 200
[1]    54676 illegal hardware instruction  swift run komondor run pre-commit

As if the Package.swift is wrong structured or something. But swift build and swift test doesn't complain about anything. I'm using // swift-tools-version:5.1 but I tried to downgrade until 4.2 with no success. Any thoughts?

@romainehinds17
Copy link

@minuscorp , I was running into a similar issue.

I ran:
swift run komondor install
swift run komondor run Running this showed more info, I had a typo. I fixed it then ran swift run komondor run again and got ERROR: [Komondor] The runner was called without a hook which turned out to be a good sign.
After that I did a normal git commit and it started working.

Probably worth mentioning that prior to running the above commands I ran swift package reset a few times when I was trying to figure out WTF is wrong.

Cheers.

@minuscorp
Copy link
Collaborator Author

This was fixed with the latest release, I'll close this.

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

No branches or pull requests

2 participants