a7ex / xcresultparser

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

Fix crash in coverage XML when output is concurrently modified #6

Closed Dahlgren closed 1 year ago

a7ex commented 1 year ago

Hello Björn, many thanks for your contribution. Can you quickly describe the problem, which you are solving? I don't really get it (Modifying the xml, while it is created?). Can you explain the solution to me? The calls to create the coverage files are executed in parallel (parallel threads) in order to speed up the tedious process of calling coverage for each single file. Doesn't your change counteract to this?

a7ex commented 1 year ago

Nevermind, after a proper re-thought, I was able to answer my own questions. ;-) Your code is only protecting the single command to append to the xml object. It makes perfect sense! I had never experienced a crash there, but I understand, that it can happen. Thanks for the improvement.