swiftlang / swift-package-manager

The Package Manager for the Swift Programming Language
Apache License 2.0
9.73k stars 1.34k forks source link

Internal error #6618

Open dabrahams opened 1 year ago

dabrahams commented 1 year ago

Description

swift test --filter _val
warning: InternalError(description: "Internal error. Please file a bug at https://bugs.swift.org with this info. Expected associated value")

Expected behavior

No response

Actual behavior

No response

Steps to reproduce

  1. Check out the plugin-displayname-bug tag of https://github.com/val-lang/val
  2. Do not have the llvm.pc file installed in /usr/local/pkgconfig
  3. cd into the directory and swift test --filter _val twice.

Swift Package Manager version/commit hash

Swift Package Manager - Swift 5.8.0

Swift & OS version (output of swift --version ; uname -a)

swift-driver version: 1.75.2 Apple Swift version 5.8 (swiftlang-5.8.0.124.2 clang-1403.0.22.11.100) Target: arm64-apple-macosx13.0 Darwin Pebbles-3.localdomain 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103 arm64

neonichu commented 1 year ago

I don't think we have any errors mentioning bugs.swift.org except for ToolsVersionParser, so this might be coming from some other place like e.g. the compiler. Not 100% sure, though.

neonichu commented 1 year ago

Ah no, we changed the string in https://github.com/apple/swift-package-manager/pull/6033, that's why I couldn't find it.

dabrahams commented 1 year ago

Bump? I'm getting this error again, just trying to build the latest state of Val.

neonichu commented 1 year ago

Hm, "Expected associated value" seems to be something in the pkg-config parser: https://github.com/apple/swift-package-manager/blob/main/Sources/PackageLoading/Target%2BPkgConfig.swift#L246

Not really familiar with that code, so not sure if that suggest a bug in the parser or an issue with some pkg-config file installed on the system.

dabrahams commented 1 year ago

I think it was caused by the latter, but the fact that the code responds this way is certainly an example of the former!

neonichu commented 1 year ago

At a minimum, we should pinpoint the specific file we're failing to parse, so that there's a chance of determining what's going on.

Separately, I find the formatting of the error message very odd, I would expect the actual error to appear before the call to action to filing a bug.

dabrahams commented 1 year ago

It’s the .pc file generated by the Swifty-LLVM script mentioned in its readme when llvm-config can’t be found on the PATHSent from my iPhoneOn Jul 18, 2023, at 5:02 PM, Boris Bügling @.***> wrote: At a minimum, we should pinpoint the specific file we're failing to parse, so that there's a chance of determining what's going on. Separately, I find the formatting of the error message very odd, I would expect the actual error to appear before the call to action to filing a bug.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>