KirillOsenkov / MSBuildStructuredLog

A logger for MSBuild that records a structured representation of executed targets, tasks, property and item values.
MIT License
1.41k stars 188 forks source link

Support corrupt logs produced by some 17.7 MSBuilds #697

Closed rainersigwald closed 11 months ago

rainersigwald commented 11 months ago

Work around bad binlogs produced by https://github.com/dotnet/msbuild/pull/8971 by probing for the zip header that will be the known first bytes of the blob.

rainersigwald commented 11 months ago

@michalpavlik can you give this a once-over to see if it matches what we were talking about offline?

KirillOsenkov commented 11 months ago

Have we tested this with the corrupt binlogs and the regular binlogs?

rainersigwald commented 11 months ago

Yes, it Works On My Machine™️. I've tried with binlogs from current dogfood VS builds, binlogs from the PR with the fix, and binlogs from production 17.6 builds, and verified that they all had many .targets files in the "files" tab.

MichalPavlik commented 11 months ago

@MichalPavlik can you give this a once-over to see if it matches what we were talking about offline?

Yes Rainer, it's exactly what I proposed. Thanks for mitigation.