ChargePoint / xcparse

Command line tool & Swift framework for parsing Xcode 11+ xcresult
MIT License
393 stars 47 forks source link

[BUG] Xcparse not installing with Xcode 13.0 Beta 4 #62

Closed Br1an-Boyle closed 3 years ago

Br1an-Boyle commented 3 years ago

Describe the bug Xcparse is failing to install when Xcode 13.0 Beta 4 is installed.

/private/tmp/xcparse-20210803-1217-1ookof9/.build/checkouts/swift-package-manager/Sources/Basic/Await.swift:18:28: error: value of type '(@escaping (Result<T, ErrorType>) -> Void) -> Void' has no member 'dematerialize'
    return try await(body).dematerialize()
                    ~~~~~~ ^~~~~~~~~~~~~
make: *** [build] Error 1

Desktop (please complete the following information):

Crash Report

==> Tapping chargepoint/xcparse
Cloning into '/usr/local/Homebrew/Library/Taps/chargepoint/homebrew-xcparse'...
remote: Enumerating objects: 77, done.        
remote: Total 77 (delta 0), reused 0 (delta 0), pack-reused 77        
Receiving objects: 100% (77/77), 8.59 KiB | 2.15 MiB/s, done.
Resolving deltas: 100% (33/33), done.
Tapped 1 formula (15 files, 17.9KB).
==> Installing xcparse from chargepoint/xcparse
==> Cloning https://github.com/ChargePoint/xcparse.git
Cloning into '/Users/distiller/Library/Caches/Homebrew/xcparse--git'...
==> Checking out tag 2.1.2
HEAD is now at 61bfe78 Arrays of XCResultValueTypes do not parse correctly (#52)
==> make install prefix=/usr/local/Cellar/xcparse/2.1.2
Last 15 lines from /Users/distiller/Library/Logs/Homebrew/xcparse/01.make:
Computing version for https://github.com/apple/swift-package-manager.git
Computed https://github.com/apple/swift-package-manager.git at 0.5.0 (6.46s)
Computing version for https://github.com/apple/swift-llbuild.git
Computed https://github.com/apple/swift-llbuild.git at 0.2.0 (0.46s)
Creating working copy for https://github.com/apple/swift-package-manager.git
Working copy of https://github.com/apple/swift-package-manager.git resolved at 0.5.0
Creating working copy for https://github.com/apple/swift-llbuild.git
Working copy of https://github.com/apple/swift-llbuild.git resolved at 0.2.0
'llbuild' /private/tmp/xcparse-20210803-1217-1ookof9/.build/checkouts/swift-llbuild: warning: ignoring broken symlink /private/tmp/xcparse-20210803-1217-1ookof9/.build/checkouts/swift-llbuild/lib/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm/Demangle/include/llvm
'llbuild' /private/tmp/xcparse-20210803-1217-1ookof9/.build/checkouts/swift-llbuild: warning: Invalid Exclude '/private/tmp/xcparse-20210803-1217-1ookof9/.build/checkouts/swift-llbuild/products/llbuildSwift/llbuild.swift': File not found.
[1/2] Compiling clibc libc.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 optimization/private/tmp/xcparse-20210803-1217-1ookof9/.build/checkouts/swift-package-manager/Sources/Basic/Await.swift:18:28: error: value of type '(@escaping (Result<T, ErrorType>) -> Void) -> Void' has no member 'dematerialize'
    return try await(body).dematerialize()
                    ~~~~~~ ^~~~~~~~~~~~~
make: *** [build] Error 1

To Reproduce Run brew install chargepoint/xcparse/xcparse to install xcparse with Xcode 13.0 Beta 4 installed.

Expected behavior Xcparse should install successfully

peterbetos commented 3 years ago

Good catch on pointing this out. Good thing Bitrise was able to show the error. Since Xcode 13 is near, this will be needed.

Edit: and our pipeline is using whatever is latest each pipeline run. So looking forward for the fix to be applied:

Screen Shot 2021-08-05 at 1 37 56 AM
abotkin-cpi commented 3 years ago

@bboyle18 Thanks for pointing this out; we haven't switched to an iOS 15 workflow yet and so hadn't gotten to this.

@rsukumar-cpi I'm going to take a look but if it's more involved, may end up assigning to you now that you're full-time.

EDIT: Notes for Rishab & myself - seems like it's due to the introduction of async/await in Swift 5.5 and an unfortunately named method in the version of Swift Package Manager that we're using based off of this commit in the package manager. Off the top of my head, that sounds like we'll need to either try to peg compilation to happen with Swift 5.4 or below OR see if we can update to a version of SPM that has that commit in it.

abotkin-cpi commented 3 years ago

This will be addressed by #63. Will release that in the next day or so. For those interested in how this was resolved, see the PR comments.

abotkin-cpi commented 3 years ago

This is resolved in v2.2.1.