MobileNativeFoundation / XCLogParser

Tool to parse Xcode and xcodebuild logs stored in the xcactivitylog format
Apache License 2.0
1.73k stars 121 forks source link

Difference in how targets are handled when -resultBundlePath is used #51

Closed mobileben closed 4 years ago

mobileben commented 4 years ago

This is very likely an Xcode thing.

I've noticed that when you build with Xcode or with xcodebuild using the -resultBundlePath, you get different output regarding targets.

More specifically, when building with Xcode, target names with the hash show up in the signature. However when xcodebuild with -resultBundlePath, the signature is empty. The target name is in the title showing up as "Target XYZ" whereas when running from Xcode it would show up as "Build target XYZ".

I wrote a tool which works with this one to better analyze the numbers, which is why I ran across this ... my code broke. I worked around it, but I wonder if you noticed this before.

Note that I could not check running xcodebuild without the -resultBundlePath to verify if the issue is actually running xcodebuild or -resultBundlePath due to #16.

ecamacho commented 4 years ago

Yes, with xcodebuild and -resultBundlePath there is no Target data in the xcactivitylog. What I did was to introduce one artificially. What xcodebuild is producing is only the list of steps and inside each step data you can find the Target name to which that step belongs. With that data I artificially create a Target with the aggregated data of its steps.

That a logic is here. Feel free to change the title of the Target to "Build Target XYZ" in a PR and if you know how the signature is being generated would be nice to have it as well.

mobileben commented 4 years ago

Okay, I'll take a look at this near the end of the week or next week.

ecamacho commented 4 years ago

Hi I fixed this bug in this PR https://github.com/spotify/XCLogParser/pull/58 it will be release v0.2.4