6 ms·
Weave: Merging based on language structure and not lines
- basurayshreyan 3mo agohow does it fare on organisation repos ? Its quite tricky to make it work on org plans where git based merge goes through a lot of code scannings and stuffs i guess. Curious to know about that
- rohanat 3mo agoGood question. Weave is a standard git merge driver, so it slots into the existing flow rather than replacing it. You wire it up in .gitattributes, and it only changes the 3-way conflict-resolution step that git already runs. The output is a normal merged tree, so everything an org layers on top still runs unchanged: branch protection, required status checks, code scanning, CI. It isn't bypassing any of that. It just resolves conflicts by entity structure (functions, classes, methods) instead of line hunks, then hands a regular file back to git.
- willrshansen 3mo agoFirst image I see should be a difference of how the merges work.
- rohanat 3mo agoThanks a lot for this feedback, you are right, but I actually had a page about the merge algorithm more in depth, maybe you will love it.
- krater23 3mo agoThe AI thougth it's better to just show the result in a stupid manner. I expect the software AND the website are mostly AI generated.
- satvikpendem 3mo agoHow does it compare to SemanticDiff extension?
- rohanat 3mo agoDifferent layer. SemanticDiff is a language-aware diff viewer, it helps you read a change. weave is a merge driver, it resolves the three-way merge so you get fewer conflicts in the first place. The closer analog to SemanticDiff in our stack is sem diff.
- psYchotic 3mo agoWithout having looked into how Weave works, it sounds similar to Mergiraf: https://mergiraf.org/ https://mergiraf.org/
- rapnie 3mo agoThere's a benchmark on the site that compares with mergiraf. https://ataraxy-labs.github.io/weave/benchmarks.html https://ataraxy-labs.github.io/weave/benchmarks.html
- v1ne 3mo agoI tried to read this, and what the tool works, but this is so much text with little context. Looks like AI fluff. It sounds pretty straight-forward, so this should be a single page with a few paragraphs only.
- WhyNotHugo 3mo agoThere's (at least) one example where I'd rather have a conflict: > Python: both add decorators to function If two branches add a decorator into the same function, I definitely want to keep both, but the _order_ is of great importance. But in fact, this makes me think that automated semantic resolution can have a lot of issues. E.g:, say two branches add the following two lines separately. Merging them requires a human considering the order of operations and how the affect the result: title = title.replace("_", " ") title = title.to_title_case()
- BrandiATMuhkuh 3mo agoPretty cool. I always thought merges should happen by comparing the AST and not lines
- rohanat 3mo agoThanks a lot for the feedback, appreicate it!
- franticgecko3 3mo ago[dead]
- csomar 3mo agoI'm working on an online diff tool (https://codeinput.com/products/merge-conflicts https://codeinput.com/products/merge-conflicts) and recently added a mergiraf integration. Basically, the tool loads your git merge but uses mergiraf as the resolution driver. Then add these auto-resolved files to the editor instead of auto-resolving directly. I also tried out weave, but apart from TypeScript, I haven't found any cases where it actually outperforms mergiraf (I run a bot that watches for new merge conflicts on GitHub, so I've got a steady stream of conflicts to test against). I reached out a couple months ago on Reddit, but I don't think we ever landed on a time to talk. Would be interested to re-connect again.
- rohanat 3mo agoThis is great, and sorry we never landed a time after Reddit, that one's on me. Let's actually fix it, could you email me on rohan@ataraxy-labs.com. For context on where the gap might be: weave matches at the entity level (functions/classes/methods by name + type + scope) and uses structural hashing for rename/reorder detection, so it should shine on reorders, renames, and large same-file edits, and may be at parity elsewhere. If your stream tags conflicts by language and type, comparing where each driver wins would be useful to both of us.
- dash2 3mo agoIf it is worth trying out, it is worth writing the README for.
- rohanat 3mo agoYeah you can find the readme on the github repository.
- adamddev1 3mo agoI think this is a great idea, and I've wondered about something like this before. I do find it sad though that the opening description has to be: > Two agents edit different functions in the same file? Clean merge. Why does EVERYTHING has to be geared towards agents? Humans can use this too. Why not just "two commits contain edits for different functions in the same file?"
- znpy 3mo ago> Why does EVERYTHING has to be geared towards agents? Moving forward one can expect the most amount of code to be generated by agents, so it makes sense to optimise for that use case. (Note that i’m not saying it’s good or bad)
- zahlman 3mo ago> so it makes sense to optimise for that use case. How do the agent and human use cases meaningfully differ here, though? I'm pretty sure GP's complaint is about the prose description, rather than the actual functionality.
- nijave 3mo agoI suspect it's much worse with agents. They tend to generate a lot more code and also more likely to make large refactors. From the parent, making edits to different functions in the same file usually doesn't cause a merge conflict unless they're close together. Usually it's when you have the same lines being replaced with 2 different options. I think humans naturally tend to try to avoid working on the same area of the codebase at the same time and have other mitigations like daily meetings to coordinate and organize. That said, yeah, I think they're complaining about "slap AI on everything" as well
- chrisandchris 3mo ago> the most amount of code generated by agents Yes, I wholehartly agree. Coming from a week of agent-coding - out of pure curiosity - most code was generated by agents, which I had then to delete and rewrite to use like a quarter of statements to achieve the same, in an understandable, maintainable way. But that's just my experience.
- igravious 3mo agoThis tool does not work. I wanted it to work. I wanted to automate merges with AI supervision. No dice. Silent corruption that wouldn't go away no matter how many issues I filed. Unacceptable. Had to disable it. https://github.com/Ataraxy-Labs/weave/issues?q=is%3Aissue%20silent https://github.com/Ataraxy-Labs/weave/issues?q=is%3Aissue%20... Be warned.
- rohanat 3mo agoI am sorry about your experience igra, but to be fair, yeah there are some failure cases but I love to receive any feedback that you think can improve it and make it a more generalized solution.
- igravious 3mo agoA merge tool cannot have silent failure cases. Period.
- nullbio 3mo agoI had the same problem. Was using this a few months ago, had it running for weeks, and noticed that code was disappearing. I no longer use it. Aside from that, I decided there's no point anyway, considering that LLMs are great at figuring out merge conflicts.
- anordal 3mo agoDoes this _need_ to be language specific, semantic and smart? Just a word-based diff would be so much better than a line-based diff.
- zx8080 3mo ago> Software, written for the things that read it. > humans are slow, forgetful, and can only hold a few things in their head at once. Thank you very much for stating it all up-front.
- DonHopkins 3mo agoToo bad Trump hijacked the meaning of the word "weave" to mean senile "sunsetting" and rambling incoherently from unrelated topic to topic, swerving between conversational lanes and colliding with facts and laws and decency like a sleepy angry drunk driver off his meds.
- usrnm 3mo agoAt this point I just ask an LLM to resolve conflicts, works most of the time. An LLM can not only understand the language, it can also understand the intent behind both changes, which leads to much better results
- deckar01 3mo agoThere was some discussion on that topic when they self-promoted this 3 months ago: https://news.ycombinator.com/item?id=47242929 https://news.ycombinator.com/item?id=47242929
- javier2 3mo agoHow do I use it in my normal flow? Edit: the readme on github explains quite well
- nijave 3mo agoMaybe it is time to reintroduce agents to Extreme Programming. Mainly leaning into frequent integration (putting the continuous back in CI) Imo merge conflicts are usually a symptom of another problem like poor coordination, poor architecture, too big of change sets, branches that are too long lived. I think the most common case I hit them is conflicting package lock file updates but merging is usually useless there. For lock files you usually just pick one version then have the package manager update it.
- jimmypk 3mo ago[flagged]
- rohanat 3mo ago[dead]
- IshKebab 3mo agoWebsite is pure slop, but I'd really like more tools like this. Can any human confirm if this is actually any good? Also if any of the slopperators want to make something really useful, can we get a decent `git diff` GUI that detects moved/copied lines across files? As far as I know the only tool that does this is `git diff --color-moved` but reviewing diffs in the terminal sucks, and it drops all information about where the code was moved/copied from. VSCode has something experimental for this but it doesn't work across files as far as I know.
- skeledrew 3mo agoSucks to be you. If you really want to know if it's good, deal with the slop yourself instead of trying to get another to do the work for you.
- satvikpendem 3mo agoSemanticDiff, difftastic, Delta should work.
- hmokiguess 3mo agoOn the point around agent collaboration with this, I think there's a larger opportunity in the agent to agent protocol over git beyond just semantic merge. https://github.com/h5i-dev/h5i https://github.com/h5i-dev/h5i has caught my attention lately and I have been meaning to explore this more, I feel like git workflows are leveling up fast since worktrees become ubiquitous and agentic development exposed more how it can unlock parallelization