Live data from Hacker News

Weave – A language aware merge algorithm based on entities

github.com

31–40 of 123 posts

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

#32
post #30

I tried this with the kind of merge conflict I'd expect it to solve automatically, and it didn't. Is it supposed to work while rebasing, or is it strictly for merges?

Thanks for trying it! Would love to know what the merge conflict looked like, if you can share the repo or a minimal repro, I'll dig into why it didn't resolve. That kind of feedback is exactly what helps us improve.

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

#33
post #31

If both sides refactor the same function into multiple smaller ones (extract method) or rename it, can Weave detect that as a structural refactor, or does it become “delete + add”? Any heuristics beyond name matching?

Yes, weave detects renames via structural_hash (AST-normalized hash that ignores identifier names). If both sides rename the same function, it matches by structure and merges cleanly.

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

#34
post #31

If both sides refactor the same function into multiple smaller ones (extract method) or rename it, can Weave detect that as a structural refactor, or does it become “delete + add”? Any heuristics beyond name matching?

Yes, weave detects renames via structural_hash (AST-normalized hash that ignores identifier names). If both sides rename the same function, it matches by structure and merges cleanly.

This will not work for refactors. In fact, any other change will break the hash. I know because I used this approach for quite some time.

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

#35
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…

Well, if you're programming in C or C++, there may not be a parse tree. Tree-sitter makes a best effort attempt to parse but it can't in general due to the preprocessor.

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

#36

Earlier quoted context omitted.

What do you mean?

It’s your GitHub profile. It looks suspiciously just like the other 10 GitHub users that have been spamming AI generated issues and PRs for the last 2 weeks. They always go quiet eventually. I suspect because they are violating GitHub’s ToS, but maybe they just run out of free tokens.

Thanks again for criticising, so tackling each of your comment:

GitHub’s ToS, because you suspect, so I can help you understand them.

> What violates it:

        1. Automated Bulk issues/PRs, that we don't own
        2. Fake Stars or Engagement Farming
        3. Using Bot Accounts.
We own the repo, there's not even a single fake star, I don't even know how to create a bot account lol.

> Scenario when we run out of free tokens.

Open AI and Anthropic have been sponsoring my company with credits, because I am trying to architect new software post agi world, so if I run out I will ask them for more tokens.

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

#38
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…

Well, I'll be diving in. Thank you for sharing. Same for Weave.

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

#39

Earlier quoted context omitted.

It’s your GitHub profile. It looks suspiciously just like the other 10 GitHub users that have been spamming AI generated issues and PRs for the last 2 weeks. They always go quiet eventually. I suspect because they are violating GitHub’s ToS, but maybe they just run out of free tokens.

Thanks again for criticising, so tackling each of your comment: GitHub’s ToS, because you suspect, so I can help you understand them. > What violates it: 1. Automated Bulk issues/PRs, that we don't own 2. Fake Stars or Engagement Farming 3. Using Bot Accounts. We own the repo, there's not even a single fake star, I don't even know how to create a bot account lol. > Scenario when we run out of free tokens. Open AI and…

And you are opening issues on projects trying to get them to adopt your product. Seems like spam to me. How much are you willing to spend maintaining this project if those free tokens go away?

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

#40
post #34

Earlier quoted context omitted.

Yes, weave detects renames via structural_hash (AST-normalized hash that ignores identifier names). If both sides rename the same function, it matches by structure and merges cleanly.

This will not work for refactors. In fact, any other change will break the hash. I know because I used this approach for quite some time.

Thanks a lot, I will test it out as you said, in the mean time, could you also open up an issue on the repo, so that it helps me and others to track the issue.
Post reply on HN