Repository navigation
build: rename the crate to diffs-rs and ship the patched dependencies as forks - #3
Merged
Merged
Conversation
… as forks The crate is now diffs-rs (library diffs_rs) with a `diffs` executable. The patched syntect and fancy-regex move from vendor/ to crates/ as the workspace members diffs-syntect and diffs-fancy-regex, joined by diffs-two-face, a two-face fork built against diffs-syntect so its types match. diffs-rs depends on them through `package =` renames, so the [patch.crates-io] section is gone and every crate can be published. Each fork keeps its upstream library name, license and copyright notice, records its upstream base in its description, README and package metadata, and starts at version 0.1.0. All packages keep publish = false; RELEASE_READINESS.md gives the publish order. The viewer title bar and the NATIVE_DIFF_* environment variables keep the old name, so preserved-executable comparisons and measurement tools still match.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renames the crate to
diffs-rsand replaces the[patch.crates-io]overrides with forked crates that can be published. Everything keepspublish = false.Forks
The patched dependencies now live in
crates/as workspace members:diffs-fancy-regex0.1.0diffs-syntect0.1.0diffs-fancy-regexrenamed tofancy-regexdiffs-two-face0.1.0diffs-syntectrenamed tosyntect.acknowledgement::url()names the upstream tag instead of building it from the package versionfancy_regex,syntect,two_face), upstream license file and copyright notice. Its README states the upstream version, revision and archive checksum, the changes, and that it exists only for diffs-rs.PATCHES.md(formerlyNATIVE_DIFF_PATCH.md) keeps the detailed notes, and[package.metadata.diffs-rs.upstream]records the base.0.16.2would leave no room for our own fixes without colliding with upstream's next version, and crates.io ignores build metadata when it compares versions.Cargo.tomlis replaced by the upstreamCargo.toml.orig; upstream benches,criterion, syntect'spublic_apitest (it installs nightly and its snapshot no longer matches), upstream CI files and the standalone lockfile are dropped. Upstream lints are allowed in the fork manifests, becausecargo clippy -- -D warningsnow reaches workspace members.diffs-rsdepends on each fork withpackage =,pathandversion, so no source changes were needed. The lockfile only adds the forks' test dev-dependencies. No existing package version changed.Rename
diffs-rs, librarydiffs_rs, executablediffs(clapname set too, so--versionprintsdiffs 0.1.0). Allnative_diff::paths,CARGO_BIN_EXE_*, the save temp-file prefix (.diffs-save-), and the error prefix are updated. The README, EMBEDDING.md, specs, NOTICE.md, RELEASE_READINESS.md, CURRENT_STATE.md, tools, and CI are updated too.native-diff / …) and theNATIVE_DIFF_*environment variables. Preserved-executable grid comparisons and the measurement tools depend on them.Checks
cargo fmt --check; clippy-D warningsfor default,--all-features, and--lib --no-default-features.cargo test --release --locked -- --test-threads=1: 255 passed, 10 ignored (same as main). Embedded host contract: 6 passed.Fork suites: diffs-fancy-regex all pass; diffs-two-face all pass; diffs-syntect passes except the upstream
can_parse_common_themes, which needs the unrestoredtestdata/spacegraysubmodule (already documented as not restored).cargo package --workspace --lockedin a scratch copy withpublishallowed: all four packages verified against each other.No tests, fixtures, evidence, testdata, or
crates/files are included in diffs-rs.tools/parse_baseline.py, 3 runs each, main vs this branch: identical summaries and no time or peak-RSS regression (linux v6-v7 median 7.11 s / 379 MiB vs 7.15 s / 384 MiB).inspect --canonicaloutput is byte-identical on the repository fixtures and node-59805.