Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support binary merges #61

Merged
merged 11 commits into from
Jan 11, 2025
Merged

Support binary merges #61

merged 11 commits into from
Jan 11, 2025

Conversation

vincentdephily
Copy link
Owner

Fixes #59

The emerge.log line that tells us whether a merge is from a binary is between the "merge start" and
"merge stop" lines, so we need to parse that new line but also need to keep a "this is a binmerge"
bool state when iterating through hist events.

This line contains other bits of info that we might want to use later, so I'm keeping new
`Hist::MergeStep` variant flexible.

This MVP just displays binary merges in a different color.
A binmerge is just treated as completely separate from a merge, and is displayed as 3 new
columns. This causes a fair amount of code and unittest churn, but is straightforward.
Parse merge type in both mtimedb.json and pretend output, and then store bin vs compile times
separately. This required more trial and error than for `log` and `stats`. This iteration looks good
enough, but there are probably more cleanups, refactorings, tests to be done.
Improvement is under noise threshold, but this feels better.
@vincentdephily
Copy link
Owner Author

I'm still unsure about how binmerges are displayed here, I'd like to find something that works well with --color=no and that is future-proofed against distinguishing cases like "new install vs update". If you want to help me bikeshed the format, now is the time.

* qmark: cyan -> unstyled
* sync (new): unstyled -> cyan
* cnt: set brightess explicitly (fixes context-dependant render)
* skip: normal -> italic

I wanted to future-proof the theme for distinguinshing other types of (un)merges, but there are a
lot of unknowns so we'll see if/when those other types get implemented. OTOH, I might make thems
configurable.
@vincentdephily vincentdephily merged commit f007e21 into master Jan 11, 2025
9 checks passed
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.

Handle binary emerges specially
1 participant