Record a tail of winetricks output in the dependency install history - #238
Conversation
A failed dependency install lands in dependency-history.plist as just exit code 1 -- the reason (e.g. a vc_redist SHA256 mismatch from the bundled winetricks) is invisible unless winetricks is re-run by hand (frankea#233). Record a bounded tail (4 KB) of the winetricks stdout/stderr in the history entry for failed attempts. Successful attempts store nothing, and entries written by earlier versions decode unchanged since the field is optional.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
frankea
left a comment
There was a problem hiding this comment.
Verified on the merged tree: app builds, full kit suite green, both lints clean. The old-format decode holds beyond your fixture; I ran a complete pre-existing dependency-history.plist with two attempts and no outputTail through BottleDependencyHistory.load and got both entries back with nil tails. The bounded tail logic is right, including the mid-character cut.
One correction I pushed to your branch rather than round-tripping: the changelog said the tail is "visible in diagnostics", but nothing reads the history yet (the diagnostics export does not include dependency-history.plist and no view shows it), so the entry now says it is recorded in the plist alongside the exit code. Showing the last failed attempt's tail in the panel is the natural follow-up if you want it; the storage half is what this PR promised and delivers.
Merging.
… history (frankea#238) * feat(dependencies): record winetricks output tail in install history A failed dependency install lands in dependency-history.plist as just exit code 1 -- the reason (e.g. a vc_redist SHA256 mismatch from the bundled winetricks) is invisible unless winetricks is re-run by hand (frankea#233). Record a bounded tail (4 KB) of the winetricks stdout/stderr in the history entry for failed attempts. Successful attempts store nothing, and entries written by earlier versions decode unchanged since the field is optional. * docs: say where the winetricks output tail lands --------- Co-authored-by: Adam Franke <afranke@gmail.com> (cherry picked from commit 87f847e)
Second of the three changes agreed in #233.
A failed dependency install lands in dependency-history.plist as nothing but exit code 1 — the actual reason (in my case a vc_redist SHA256 mismatch) is invisible unless you re-run winetricks by hand.
This records a bounded tail of the winetricks stdout/stderr in the history entry when the attempt fails:
WhiskyKit tests cover the plist round-trip, decoding of pre-existing entries without the field, and the tail bounding.
Includes a CHANGELOG entry.