New blog post: https://mergiraf.org, a syntax-aware merge driver for #Git.
Supports #Java, #Rust, #Golang, #javascript, #cpp, #csharp, #html, #json, #yaml and #xml so far, and it's quite easy to add support for more thanks to #treesitter.
https://antonin.delpeuch.eu/posts/mergiraf-a-syntax-aware-merge-driver-for-git/
Get it on #Codeberg: https://codeberg.org/mergiraf/mergiraf
=> More informations about this toot | More toots from pintoch
@wilfredh it's very similar to #difftastic in spirit so I'm curious what you think of it :)
=> More informations about this toot | More toots from pintoch
@pintoch I love it! I really enjoyed reading the manual, seeing the discussion of the design, and reading your comments on the HN announcement too :)
I've long wondered whether something like this was possible in principle, but I've always been intimidated by the problem. I'm super impressed by your solution.
=> More informations about this toot | More toots from wilfredh@mastodon.social
@pintoch Were you influenced by difftastic at all? Your manual structure feels very similar to mine, and you have 'atomic_nodes' in a pretty similar fashion to difftastic :)
=> More informations about this toot | More toots from wilfredh@mastodon.social
@pintoch I've only lightly skimmed the architecture discussion, I'm looking forward to reading it more deeply.
The only suggestion I'd make is that your home page deserves a few screenshots. The screencasts are nice but screenshots help readers decide to watch the screencast. I'm sure you have some super compelling examples that would make great screenshots.
=> More informations about this toot | More toots from wilfredh@mastodon.social
@wilfredh thanks a lot for the kind words!
Yes, screenshots would be great, but I am not clear on how to present the effect of the tool. For difftastic it's much more direct: you see a screenshot of the diff, and that's it, you're convinced. Showing the outcome of a merge is harder. The best way I found so far is to show difftastic's output, comparing the file with conflicts and the resolved merge, but that's still pretty hard to grasp visually.
=> More informations about this toot | More toots from pintoch
@wilfredh and yes of course difftastic was an inspiration in many ways. One big question I had recently was whether to also immitate you for the vendoring of the parsers. So far I have been trying to stick to official versions for simplicity, but I don't know how viable it is, particularly given some issues in the grammars which don't look very actively maintained either.
=> More informations about this toot | More toots from pintoch
@wilfredh of course it feels like sticking to official versions would be a good way to mutualize work on those grammars - but I don't know how realistic it is, and perhaps we have different requirements…
=> More informations about this toot | More toots from pintoch
@pintoch I regret vendoring using git submodules: GitHub handles them badly, and I now have a git repository that's over 1GiB. It's also contributed to Debian not packaging difftastic I think.
That said, being able to pull in parser bugfixes easily has been helpful for working with upstream.
If I did it over, I'd probably just manually vendor the parsers and write a dumb bash script to check for new versions.
=> More informations about this toot | More toots from wilfredh@mastodon.social
@pintoch The other challenge I have is the large size of the compiled binary (over 50MiB) due to all the parsers.
Even the source tarballs are pretty big. I had to ask crates.io to increase my upload limit (they kindly said yes), I think difftastic is the biggest project on crates.io.
This also makes me less willing to accept new languages. Diffsitter uses dynamic library loading for this, which is an interesting solution.
=> More informations about this toot | More toots from wilfredh@mastodon.social
@wilfredh Interersting! Wouldn't it be feasible to gradually move to pulling the parsers from crates.io? The latest versions of tree-sitter have introduced what looks like a pretty solid method to de-couple grammar versions from the tree-sitter version (in a backwards-compatible way), so it looks like it shouldn't be too hard to stay in sync afterwards (avoiding the previous problem of needing to wait for all of your grammars to update before updating tree-sitter).
=> More informations about this toot | More toots from pintoch
@pintoch FWIW I'd write the first paragraph of the manual like this (see screenshot). Show a conflict with an obvious solution, show how to invoke mergiraf, then show the result.
Also, I've only just realised that "mergiraf" is probably supposed to be pronounced like "giraffe"? That wasn't at all obvious to me.
=> More informations about this toot | More toots from wilfredh@mastodon.social
@pintoch I also hit a bug when trying this, filed as https://codeberg.org/mergiraf/mergiraf/issues/37 :)
=> More informations about this toot | More toots from wilfredh@mastodon.social
@pintoch Also added a link in the difftastic README to mergiraf :)
=> More informations about this toot | More toots from wilfredh@mastodon.social This content has been proxied by September (3851b).Proxy Information
text/gemini