Live data from Hacker News

Weave – A language aware merge algorithm based on entities

github.com

71–80 of 123 posts

Re: Weave – A language aware merge algorithm based on entities

#71
So Weave claims AI based development increase git conflict frequency.

Given that most git conflicts are easy to solve by person who didn't involved at changes, even for a person who don't know that programming language, it's natural to let AI handle the git conflicts.

Solving a git conflict is most often a simple text manipulation without needing much of context. I see no problem current AI models can't do it.

Re: Weave – A language aware merge algorithm based on entities

#72

Earlier quoted context omitted.

This is the right question. Storing ASTs directly would make all of this native instead of layered on top. The pragmatic reason weave works at the git layer: adoption. Getting people to switch merge drivers is hard enough, getting them to switch VCS is nearly impossible. So weave parses the three file versions on the fly during merge, extracts entities, resolves per-entity, and writes back a normal file that git stor…

[flagged]

No it was meant to be here, I don't like reddit as much as I love HN.

Re: Weave – A language aware merge algorithm based on entities

#73

Earlier quoted context omitted.

This is the right question. Storing ASTs directly would make all of this native instead of layered on top. The pragmatic reason weave works at the git layer: adoption. Getting people to switch merge drivers is hard enough, getting them to switch VCS is nearly impossible. So weave parses the three file versions on the fly during merge, extracts entities, resolves per-entity, and writes back a normal file that git stor…

[flagged]

If you don't understand what's being talked about, maybe best to stay quiet

Re: Weave – A language aware merge algorithm based on entities

#74
post #67
post #6

Some context on the validation so far: Elijah Newren, who wrote git's merge-ort (the default merge strategy), reviewed weave and said language-aware content merging is the right approach, that he's been asked about it enough times to be certain there's demand, and that our fallback-to-line-level strategy for unsupported languages is "a very reasonable way to tackle the problem." Taylor Blau from the Git team said he'…

Congrats on getting acknowledged by people with credibility. I also think that this approach has a lot of potential. Keep up the good work sir.

Thanks a lot! Appreciate it.

Re: Weave – A language aware merge algorithm based on entities

#75

No C#?

C# is supported! It goes through sem-core's(the underlying library for parsing we use in Weave) tree-sitter-c-sharp plugin. Classes, methods, interfaces, enums, structs are all extracted with it. Let me know if you hit anything.

Re: Weave – A language aware merge algorithm based on entities

#76
post #71

So Weave claims AI based development increase git conflict frequency. Given that most git conflicts are easy to solve by person who didn't involved at changes, even for a person who don't know that programming language, it's natural to let AI handle the git conflicts. Solving a git conflict is most often a simple text manipulation without needing much of context. I see no problem current AI models can't do it.

When you start seeing the diffs with entities instead of lines, is what interests me, you get much better semantic info.

If you have a language specific parser, you can make a merge algorithm like weave. But the bigger win isn't resolving conflicts git shows you. It's catching the ones git misses entirely. So in those cases weave is much better, and there also other things like confidence-scored conflict classification, you should try it out it improves the agents performance, especially if you are a power user.

Re: Weave – A language aware merge algorithm based on entities

#77
post #12

At this point, the question is: why keep files as blobs in the first place. If a revision control system stores AST trees instead, all the work is AST-level. One can run SQL-level queries then to see what is changing where. Like - do any concurrent branches touch this function? - what new uses did this function accrete recently? - did we create any actual merge conflicts? Almost LSP-level querying, involving versions…

This is the right question. Storing ASTs directly would make all of this native instead of layered on top. The pragmatic reason weave works at the git layer: adoption. Getting people to switch merge drivers is hard enough, getting them to switch VCS is nearly impossible. So weave parses the three file versions on the fly during merge, extracts entities, resolves per-entity, and writes back a normal file that git stor…

I would love it if sem was hooked up into a PR review UI...

Re: Weave – A language aware merge algorithm based on entities

#78

Earlier quoted context omitted.

This is the right question. Storing ASTs directly would make all of this native instead of layered on top. The pragmatic reason weave works at the git layer: adoption. Getting people to switch merge drivers is hard enough, getting them to switch VCS is nearly impossible. So weave parses the three file versions on the fly during merge, extracts entities, resolves per-entity, and writes back a normal file that git stor…

I would love it if sem was hooked up into a PR review UI...

That's exactly what inspect does (https://github.com/ataraxy-labs/inspect). It uses sem's entity graph to triage PRs: classifies every change, scores risk based on blast radius and dependents, and groups related changes together.

We are still benchmarking it on diverse benchmarks, and working on it as a research direction. Also working on a diff viewer in rust.

Re: Weave – A language aware merge algorithm based on entities

#80
post #12

At this point, the question is: why keep files as blobs in the first place. If a revision control system stores AST trees instead, all the work is AST-level. One can run SQL-level queries then to see what is changing where. Like - do any concurrent branches touch this function? - what new uses did this function accrete recently? - did we create any actual merge conflicts? Almost LSP-level querying, involving versions…

That's a really good point. I'm not familiar with Unison, but I think that's the idea behind the language?

https://www.unison-lang.org/

Post reply on HN