Skip to content

Make difftastic vendored rather than a cargo git dep#18

Merged
martinabeleda merged 3 commits intomainfrom
hotfix/vendored-difftastic
Mar 14, 2026
Merged

Make difftastic vendored rather than a cargo git dep#18
martinabeleda merged 3 commits intomainfrom
hotfix/vendored-difftastic

Conversation

@martinabeleda
Copy link
Owner

@martinabeleda martinabeleda commented Mar 14, 2026

Summary

Vendor difftastic into ripdiff so packaging no longer depends on an unpublished git-sourced library crate.

What changed

  • Add the modified difftastic source tree under src/difftastic/.
  • Add vendored tree-sitter parser sources and parser license files under src/vendored_parsers/.
  • Add a local difftastic library target in Cargo.toml and wire in build.rs to compile the vendored parsers.
  • Remove the external git dependency on martinabeleda/difftastic.
  • Preserve upstream licensing and provenance in vendor/difftastic/.

Why

cargo package strips git dependencies during verification and resolves them from crates.io.
ripdiff depended on a fork of difftastic that exposes a library API, but the published difftastic crate on crates.io is not usable as a library dependency.

Vendoring the modified difftastic code makes the crate self-contained and allows packaging and publish-style verification to succeed.

Verification

  • cargo check
  • env CARGO_HOME=/tmp/ripdiff-cargo-home CARGO_TARGET_DIR=/tmp/ripdiff-package-target cargo package --allow-dirty

Notes

@martinabeleda martinabeleda merged commit 3c89346 into main Mar 14, 2026
4 checks passed
@martinabeleda martinabeleda deleted the hotfix/vendored-difftastic branch March 14, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant