Skip to content

Record a tail of winetricks output in the dependency install history - #238

Merged
frankea merged 2 commits into
frankea:mainfrom
slevin-7:dependency-history-output
Aug 29, 2026
Merged

Record a tail of winetricks output in the dependency install history#238
frankea merged 2 commits into
frankea:mainfrom
slevin-7:dependency-history-output

Conversation

@slevin-7

Copy link
Copy Markdown
Contributor

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:

  • capped at 4 KB, whole lines kept newest-first (a single oversized line is truncated to its trailing bytes)
  • successful attempts store nothing
  • the field is optional, so entries written by earlier versions decode unchanged

WhiskyKit tests cover the plist round-trip, decoding of pre-existing entries without the field, and the tail bounding.

Includes a CHANGELOG entry.

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

codecov Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 65.38462% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
Whisky/Views/Install/DependencyInstallSheet.swift 0.00% 8 Missing ⚠️
...rces/WhiskyKit/Whisky/BottleDependencyConfig.swift 94.44% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@frankea frankea left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@frankea
frankea merged commit 87f847e into frankea:main Aug 29, 2026
5 checks passed
dappermint pushed a commit to dappermint/Whisky that referenced this pull request Aug 30, 2026
… 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants