ChargePoint / xcparse

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

xcparse should give better error when xcresult path leads to non-xcresult #40

Closed Blackjacx closed 4 years ago

Blackjacx commented 4 years ago

Describe the bug I want to install xcparse using Mint using the command mint run ChargePoint/xcparse xcparse screenshots --test-run --model "$results_path" "$screens_path"

But that doesn't work and gives the following output:

➜ mint run ChargePoint/xcparse xcparse screenshots --test-plan-config --model "/tmp" "/tmp"
🌱  Finding latest version of xcparse
🌱  xcparse 2.1.0 already installed
🌱  Running xcparse 2.1.0...
Error: Fatal error: Missing Info.plist: file /BuildRoot/Library/Caches/com.apple.xbs/Sources/XCResultKit/XCResultKit-15700/Sources/XCResultKit/RootInfoPlistParser.swift, line 52

OS

Screen Shot 2020-02-06 at 12 46 22

xcparse Version

Screen Shot 2020-02-06 at 12 47 16

Swift version [Run "swift --version"]

Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15) Target: x86_64-apple-darwin19.2.0

To Reproduce Run the CMD above - it auto-resolves xcparse

Expected behavior It should just work like installing it via brew.

Blackjacx commented 4 years ago

It actually wasn't an issue. Sorry for opening this ...

abotkin-cpi commented 4 years ago

Don't apologize - always good to open these issues so others can find it if they hit it! As I think you figured out, the xcresult path was likely set to something that wasn't an xcresult (like the tmp folder in the failing command above, if that isn't a redacted version).

This ticket still has a valid point that we should add protections in xcparse to do some basic sanity that the xcresult path actually has an xcresult there and not just throw it at xcresulttool blindly as it'll give that rather cryptic error when figuring out the manifest.

Blackjacx commented 4 years ago

Yeah this issue also occurs when I run a Homebrew installed xcparse. A sanity check would prevent this - true.

SandraNPR commented 4 years ago

I just ran into the same issue. The error was not descriptive enough. Luckily, with this post, I was able to figure out where I went wrong. Thanks!

Blackjacx commented 4 years ago

Glad to hear 🙃

abotkin-cpi commented 4 years ago

This should be addressed in 2.1.1. Thanks for the feedback @Blackjacx & @SandraNPR!