[December 25] #2300
Byron
announced in
Progress Update
[December 25]
#2300
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
And it's the end of the year already, let's dive right into this month's news!
Zlib-rs: now used in pure Rust and without
unsafeIn a major effort to simplify
zip, I managed to use the new pure Rust API thatzlib-rsintroduced in v0.5.4, cutting out another dependency to now depend onzlib-rsdirectly.It's tangential that
gitoxidestill encounters issues decoding some pack files that are clearly related to this switch, but with some luck these will go away when this fix lands.Otherwise, I might have to bring back
zlib-ngas fallback option at least temporarily, but I have hopes that this won't be necessary after all.Gen-AI: Copilot reviews
While some respond allergic to it, I started to fully embrace Copilot reviews. What I find fascinating is that it typically manages to stay away from nonsense, and in the worst case points out typos, grammatical errors, and stale documentation. This property makes it great as a review baseline.
And on top of that, sometimes, it finds real bugs. Like the other day when I once again fell for the usual
opt.and_then().or_else()fallacy which isn't always the same as anifcondition - and it pointed it out, squelching a bug in its tracks.Occasionally, it's pedantic, but it's still right and rules are rules, thanks to point out my human sloppiness.
And more rarely, it's also just wrong (or I don't get it), but it's still very much worth it as overall value proposition. It must be noted that for some reason, I have free credits assigned to my account, so thanks GitHub for letting me test this fantastic tool.
Url Parsing: full compliance as tested
In the spirit of using GenAI more with tasks that it's known to be good for, I tasked it to improve the baseline tests from about 60% success rate to full compliance.
And this worked well, notably also after removing the
urlcrate as dependency to cut off a whopping 60 crates.Date Parsing: support for more formats
Here the task was to merely improve the built-in parsing capabilities to parse more of what Git can parse, based on its own tests. Once again the baseline is created by Git itself to ensure we can parse them.
Interestingly, this is a case of 'better is better even though it's not perfect', as I didn't take the time to validate the pros and cons or even completeness of the approach. Instead, it's just better than before with a clear entrypoint for the fully generated parsing code, so it will be no problem to refactor it later, maybe based on how Git is actually doing the parsing.
Something I am thinking about is to have an approach where the Git way of parsing relative URLs is fully converted to Rust, with the C code as reference. For now, I have to refrain from doing that though as whatever happens next, it will certainly take way more time than I currently have as it does require much more diligence to take it to full compliance.
gix-archivewithoutzipcrate in favor ofrawzipThanks to a pointer from the community I was made aware of the
zipdependency ingix-archivebeing unmaintained, and it turned out that GenAI could one-shot the transition torawzip, which usesflate2as plug-in encoder. It was a pretty painless experience, and the code seems to be spot on, particularly after a small refactor.:(optional)paths in Git configurationFor a moment I wanted to attribute this implementation to myself when I remembered that in fact it was also trampolined by GenAI, for a first implementation of the plumbing.
That way, we now support configuration like this:
What was left for me to do besides the usual refactoring was to wire this feature up to the
gixcreate, which now will check if the path is optional, and if so, returnNoneif the underlying path isn't accessible. That way the caller doesn't have to know anything about it, it's completely transparent.Community
Improved probing of executable bits
Maybe a small thing, but it can make the difference between everything works and utter strangeness: improved detection of how executable bits are represented by the filesystem. Maybe a more recent change in Git, but now
gix-fswill probe the filesystem very similarly.gix-transportandgix-protocolcleanup - continuedThanks to the continued efforts of Dirkjan Ochtman, more and more of the
gix-protocolandgix-transportlayer became additive. Admittedly, I don't have an overview or tracking issue to know what is missing, but for now I am entrusting myself with Dirkjan and hope he will keep the PRs coming until he can declare complete victory.Thanks a lot!
gix blamediff-slider: the Second RoundWe now have access to
imara-diffv0.2 behind a feature toggle ingix-diff, to allowgix-blameto experiment with its implementation. The diff-slider tests that were introduced previously went from something around 5% to 95% in an instant, showing the slider implementation inimara-diffis quite close to what it needs to be, assuminggix-blameis a perfect recreation of the algorithm, and assuming thatimara-diffitself is providing the same diffs asxdiff, the engine powering Git.On the bright side, it looks like these 95% compatibility would already satisfy most users, so the next steps here would be to integrate
imara-diffv0.2 as default by porting our ownUnifiedDiffimplementation to it.It's notable that I plan to keep
imara-diffv0.1 for a while longer as well to power the line-counting, which can then in theory at least be done with less allocations.The biggest hurdle for our
gix blameimplementation and thegix diffimplementation for that matter is the lack of diff-slider compatibility with Git.Thanks again to Christoph Rüßler for pushing this topic forward!
Incubating SHA256 support
And as merely a filler task for Christoph Rüßler, we can be looking forward to gradually more work done towards SHA256 support.
The general idea is to make the codebase at least compile with the new hash format, and then, step by step, adjust all relevant tests to also run in SHA256 mode.
The latter will be a major undertaking, but we will try to learn from Git and be smart about it, and enable running the full test suite in both SHA1 and SHA256 mode.
Gix in Cargo
There is nothing new here, but let's keep the horizon active:
Cheers
Sebastian
PS: The latest timesheets can be found here (2025).
Beta Was this translation helpful? Give feedback.
All reactions