a7ex / xcresultparser

Parse the binary xcresult bundle from Xcode builds and testruns
MIT License
83 stars 24 forks source link

Install of 1.6.2 through Homebrew is failing #33

Closed mthormann-dhi closed 2 weeks ago

mthormann-dhi commented 3 weeks ago

On two separate macOS machines, one with fresh brew install xcresultparser and one with brew upgrade xcresultparser, running into build issues with 1.6.2 that just came out to fix the DTD problem.

==> Upgrading a7ex/formulae/xcresultparser 1.6.0 -> 1.6.2 ==> make install prefix=/opt/homebrew/Cellar/xcresultparser/1.6.2 Last 15 lines from /Users/mark.thormann/Library/Logs/Homebrew/xcresultparser/01.make: Building targets in dependency order Target dependency graph (10 targets) 0%: Gather provisioning inputs 0%: Create build description 0%: Discovering version info for swiftc 0%: Discovering version info for clang 0%: Discovering version info for ld Build description signature: 8bf363b728c1427a1a4c5b54073e4b96 Build description path: /private/tmp/xcresultparser-20240614-29219-4nmvyk/xcresultparser-1.6.2/.build/apple/Intermediates.noindex/XCBuildData/8bf363b728c1427a1a4c5b54073e4b96.xcbuilddata Missing package product 'SwiftLintBuildToolPlugin@11' Missing package product 'SwiftLintBuildToolPlugin@11' Build cancelled make: *** [build] Error 1 If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core): https://github.com/a7ex/homebrew-formulae/issues

ggrell commented 3 weeks ago

Running into same issue upgrading or installing 1.6.2:

➜  ~ brew install xcresultparser
==> Downloading https://formulae.brew.sh/api/formula.jws.json
############################################################################################################################################################################ 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
############################################################################################################################################################################ 100.0%
==> Fetching a7ex/formulae/xcresultparser
==> Downloading https://github.com/a7ex/xcresultparser/archive/1.6.2.tar.gz
Already downloaded: /Users/mobileteam/Library/Caches/Homebrew/downloads/b8fc25d696ef53067929d5e1a7d849e692917485428f3bc83a01c9a296abab55--xcresultparser-1.6.2.tar.gz
==> Installing xcresultparser from a7ex/formulae
==> make install prefix=/opt/homebrew/Cellar/xcresultparser/1.6.2
Last 15 lines from /Users/mobileteam/Library/Logs/Homebrew/xcresultparser/01.make:
Building targets in dependency order
Target dependency graph (10 targets)
0%: Gather provisioning inputs
0%: Create build description
0%: Discovering version info for swiftc
0%: Discovering version info for clang
0%: Discovering version info for ld
Build description signature: bbdc5fa98b6338b7829dfc22a006e4ab

Build description path: /private/tmp/xcresultparser-20240614-5248-pcqueo/xcresultparser-1.6.2/.build/apple/Intermediates.noindex/XCBuildData/bbdc5fa98b6338b7829dfc22a006e4ab.xcbuilddata

Missing package product 'SwiftLintBuildToolPlugin@11'
Missing package product 'SwiftLintBuildToolPlugin@11'
Build cancelled
make: *** [build] Error 1

And checking out repo, running make directly:

 make
swift build -c release --disable-sandbox --arch arm64 --arch x86_64
0%: Compute target dependency graph
Building targets in dependency order
Target dependency graph (10 targets)
0%: Gather provisioning inputs
0%: Create build description
Build description signature: c840d35b5e45ae4f259cad18dbdacda1

Build description path: /Users/gyuri/Projects/xcresultparser/.build/apple/Intermediates.noindex/XCBuildData/c840d35b5e45ae4f259cad18dbdacda1.xcbuilddata

Missing package product 'SwiftLintBuildToolPlugin@11'
Missing package product 'SwiftLintBuildToolPlugin@11'
Build cancelled
make: *** [build] Error 1

Excerpts from the build downloading the correct dependencies:

...
Creating working copy for https://github.com/realm/SwiftLint.git
Working copy of https://github.com/realm/SwiftLint.git resolved at 0.55.1
...
Downloading binary artifact https://github.com/realm/SwiftLint/releases/download/0.55.1/SwiftLintBinary-macos.artifactbundle.zip
Downloaded https://github.com/realm/SwiftLint/releases/download/0.55.1/SwiftLintBinary-macos.artifactbundle.zip (15.20s)
mthormann-dhi commented 3 weeks ago

Same result trying to build command line as well with swift build --configuration release --disable-sandbox --arch arm64 --arch x86_64.

I was able to successfully build from Xcode though as a possible workaround (with a few lint warnings that I assume were normal).

Jon-Schneider commented 3 weeks ago

I don't have any logs we can share, but we're experiencing the same thing in our pipeline for Outlook Mobile.

mthormann-dhi commented 3 weeks ago

If anyone needs to work around this until a fix is posted, you can:

  1. Clone the repo
  2. Build the xcresultparser in Xcode (since command-line doesn't work)
  3. Copy the output from DerivedData build product over to somewhere in the path where you need to use it (or over the existing version).

Worked for us anyways.

xzoky commented 3 weeks ago

I'm getting similar trouble running the latest version because:

error: 'xcresultparser-1.6.2': package 'xcresultparser-1.6.2' is using Swift tools version 5.9.0 but the installed version is 5.8.1

The culprit is right here: https://github.com/a7ex/xcresultparser/commit/1e1da8c066c429e1c77ea69bcd6f845d9f0516ca#diff-f913940c58e8744a2af1c68b909bb6383e49007e6c5a12fb03104a9006ae677eR1

Turns out you can't exactly ask Homebrew to install an arbitrary version of a package, so I made my own fork of the formulae repo, in which I reverted the last commit so it's pointing to version 1.6.1 of xcresultparser.

Feel free to use it as well!

brew tap xzoky/formulae-a7ex
brew install xzoky/formulae-a7ex/xcresultparser

⚠️ I might delete the fork at some point after this issue is fixed.

mackoj commented 3 weeks ago

I'm facing the same issue too using mint.

mint install a7ex/xcresultparser
🌱 Finding latest version of xcresultparser
🌱 Cloning xcresultparser 1.6.2
🌱 Resolving package
Fetching https://github.com/realm/SwiftLint.git
Fetching https://github.com/jpsim/Yams.git from cache
Fetching https://github.com/apple/swift-syntax.git from cache
Fetching https://github.com/jpsim/SourceKitten.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/JohnSundell/CollectionConcurrencyKit.git from cache (1.34s)
Fetching https://github.com/krzyzanowskim/CryptoSwift.git from cache
Fetched https://github.com/krzyzanowskim/CryptoSwift.git from cache (0.50s)
Fetching https://github.com/apple/swift-argument-parser.git from cache
[1/132006] Fetching swiftlint
Fetched https://github.com/apple/swift-argument-parser.git from cache (0.94s)
Fetching https://github.com/drmohundro/SWXMLHash.git from cache
Fetched https://github.com/drmohundro/SWXMLHash.git from cache (0.65s)
Fetching https://github.com/davidahouse/XCResultKit.git from cache
Fetched https://github.com/davidahouse/XCResultKit.git from cache (0.54s)
warning: 'swiftlint': skipping cache due to an error: Failed to clone repository https://github.com/realm/SwiftLint.git:
    Cloning into bare repository '/Users/mac/Library/Caches/org.swift.swiftpm/repositories/SwiftLint-2ae81f81'...
    remote: Enumerating objects: 132006, done.
remote: Counting objects: 100% (3606/3606), done.
remote: Compressing objects: 100% (998/998), done.
fatal: write error: No space left on device.17 MiB | 23.39 MiB/s
    fatal: fetch-pack: invalid index-pack output
Fetched https://github.com/scottrhoyt/SwiftyTextTable.git from cache (15.04s)
Fetched https://github.com/jpsim/SourceKitten.git from cache (15.04s)
Fetched https://github.com/jpsim/Yams.git from cache (15.12s)
Fetched https://github.com/apple/swift-syntax.git from cache (15.89s)
Fetching https://github.com/realm/SwiftLint.git
warning: 'swiftlint': skipping cache due to an error: Failed to clone repository https://github.com/realm/SwiftLint.git:
    Cloning into bare repository '/Users/mac/Library/Caches/org.swift.swiftpm/repositories/SwiftLint-2ae81f81'...
    remote: Enumerating objects: 132006, done.
remote: Counting objects: 100% (3606/3606), done.
remote: Compressing objects: 100% (998/998), done.
fatal: write error: No space left on device.86 MiB | 25.04 MiB/s
    fatal: fetch-pack: invalid index-pack output
error: Failed to clone repository https://github.com/realm/SwiftLint.git:
    Cloning into bare repository '/private/var/folders/6_/t11661yd1_b35sbbws0xvggm0000gp/T/mint/github.com_a7ex_xcresultparser/.build/repositories/SwiftLint-2ae81f81'...
    remote: Enumerating objects: 132006, done.
remote: Counting objects: 100% (3605/3605), done.
remote: Compressing objects: 100% (991/991), done.
fatal: write error: No space left on device.81 MiB | 26.87 MiB/s
    fatal: fetch-pack: invalid index-pack output
🌱 Encountered error during "swift package resolve". Use --verbose to see full output
🌱  Failed to resolve xcresultparser 1.6.2 with SPM

I install the previous version using mint.

mint install a7ex/xcresultparser@1.6.1
🌱 Cloning xcresultparser 1.6.1
🌱 Resolving package
🌱 Building product xcresultparser
🌱 Installed xcresultparser 1.6.1
🌱 Linked xcresultparser 1.6.1 to /Users/mac/.mint/bin
a7ex commented 2 weeks ago

So sorry, people. :-( I just fixed it. Introduced a lot of issues thanks to introducing SwiftLint... :-( Heck, Apple or the Swift Project or whoever needs to do something to fix plugins. I also would like a better choice than swiftlint, as it starts to get annoying. Why can't I have a linter, which just lints the code in Xcode, even when working on a Swift Package? I don't want to add a dependency which brings xy more sub dependencies to my project. I want it to work just in Xcode. No change to production code or Package.swift!

a7ex commented 2 weeks ago

Issue should be fixed now. Removed swiftlint and returned to status before adding SwiftLint.

stefanceriu commented 2 weeks ago

Fixed on our side, thank you for taking care of them so quickly and over the weekend! 👏

mackoj commented 2 weeks ago

Thanks you

mthormann-dhi commented 2 weeks ago

Thanks as well!