Skip to content
@structuredmerge

Structured Merge

Tools for structured, deterministic, merging of any AST-parseable document type

💠 Structured Merge

structuredmerge Logo by Aboling0, CC BY-SA 4.0
  • A project to define a common language for merge rules. See the Announcement Discussion
  • Implementations of the merge rules contract across multiple languages
  • Support for template merges (2-way) and git merges (3-way)
  • Find out more at StructuredMerge.org

🙋‍♀️ Currently we are just a few people / nerds. If you are interested in document merge semantics or ASTs we'd love your assistance!

🐪 This is the first open source project of its kind (meaning specifically: an attempt to draft a spec for merge language vocabulary and build compliant implementations across multuiple languages) we are aware of! If you know of prior art we would love to hear about it.

Prior/Contemporaneous Art

Things we've heard about that are similar in some ways:

  • difftastic - structural diff tool, parses with tree-sitter, compares syntax aware structure, and renders human oriented diffs. Does not generate patches, or perform merges.
  • mergiraf - syntax-aware git merge driver implemented in Rust. Uses tree-sitter, and implements a fine-grained, 3DM-inspired, 3-way merge.
  • spork - AST-based merges in Java, based on the research paper arXiv-2202.05329v1. 3DM-derived merge over PCS/change-set structures, with custom conflict handling, formatting-aware printing, and git compatibility mode.
  • weave - entity-level semantic merge driver implemented in Rust, based on tree-sitter, which falls back to line-merge within multi-line entity spans.

🌈 Contribution Guidelines

👩‍💻 Resources

Pinned Loading

  1. structuredmerge-fixtures structuredmerge-fixtures Public

    Shared StructuredMerge conformance fixtures for peer language implementations

    Python

  2. structuredmerge-go structuredmerge-go Public

    Go implementation of the StructuredMerge contract

    Go

  3. structuredmerge-rust structuredmerge-rust Public

    Rust implementation of the StructuredMerge contract

    Rust

  4. structuredmerge-typescript structuredmerge-typescript Public

    TypeScript implementation of the StructuredMerge contract

    TypeScript

  5. structuredmerge-ruby structuredmerge-ruby Public

    ☯️ Ruby implementation of the StructuredMerge contract

    Ruby 17

  6. structuredmerge-spec structuredmerge-spec Public

    ☯️ Specifications for the StructuredMerge contract; Draft RFCs for merge ruleset vocabulary

    Python 16

Repositories

Showing 10 of 22 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…