mandiant / mandiant/macos-UnifiedLogs
Issues with framework rewrite
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 376
- Forks
- 43
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 8
Description
Hi! I noticed #125 from @jrouaix was merged recently, and I wanted to open a discussion about what this means for the library going forward, before I put time into building on top of the current main.
First, credit where it's due: the streaming implementation that binds messages to the lifetimes of the source material is a huge improvement, and it fixes a lot of avoidable string cloning in the existing implementation.
That said, I think the way it landed has some drawbacks worth discussing:
- Three codepaths via feature flags - Since the crate is still pre-1.0.0, I'm not sure we need feature-flag complexity to preserve the old implementation — anyone who wants it could just pin to an older version. As it stands, I worry it'll get unclear over time whether bugfixes need to land on both paths, which will make the changelog harder to follow. It also doesn't play well with docs.rs, since there's no way to toggle feature flags in its UI — right now only the legacy codepath shows up there.
- Loss of file history - Because the new code lives in a different directory from the legacy code and was reimplemented from scratch, it's much harder to see what changed incrementally.
git blameandgit logno longer provide continuity for the original files. - Extra examples per feature flag - These add more surface area to maintain without a clear corresponding benefit.
Given all that, I think we should consider reverting the PR and re-landing the rewrite as a replacement for the existing code rather than alongside it, potentially split into smaller, incremental steps, similar to what @puffyCid raised in the original PR discussion. I'm happy to collaborate on a path forward.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading merged PR #125 and the original PR discussion, then compare the legacy and rewritten codepaths and their feature-flag examples. The issue names no specific files or tests; it is complete only when maintainers decide whether to revert and re-land the rewrite as a single replacement or otherwise define a concrete path forward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, developer-experience
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100