chore(core): drop the unused git2 dependency - #14
Conversation
`diff/` holds the ops and the stubs around the ledger; it never opens a repository. Every libgit2 call in the stack is tinycortex's, and `memory-git` already reaches it by forwarding `tinycortex/git-diff` + `tinycortex/wiki-git`. The optional `git2` declaration had no `use` behind it and was free to drift off tinycortex's major, which `links = "git2"` turns into a hard cargo error. Co-authored-by: Medulla <medulla@tinyhumans.ai>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change removes the optional vendored ChangesGit dependency ownership
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This removes an unused dependency while preserving the existing git feature path and build behavior; no actionable merge-blocking risk remains after normal checks and review. Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Drop the
git2dependency fromtinymemory-core. It had nousebehind it:memory-gitnow forwardstinycortex/git-diff+tinycortex/wiki-gitonly.Problem
core/Cargo.tomldeclaredgit2 = { version = "0.21", optional = true, … }andmemory-git = ["dep:git2", "tinycortex/git-diff", "tinycortex/wiki-git"].git2is never used in this crate. Every mention of it incore/src/is a doc comment —diff/mod.rs,diff/ops.rsandstore/content/mod.rsdescribe the gate, they do not open a repository.diff/holds the ops and the stubs around the ledger; the ledger itself lives in tinycortex, which is where every libgit2 call in the stack is.An optional dependency with nothing behind it is not free. It is a second pin on
git2, free to drift off tinycortex's, andgit2setslinks = "git2"— two majors in one graph is a hard cargo error rather than a warning. It also misrepresents where the native build enters the graph, which matters to a host reading this manifest to decide whatmemory-gitcosts.Solution
Remove the declaration and
dep:git2from the feature.memory-gitreaches the libgit2 cohort exactly as before, by turning on tinycortex's two git features — that is what it always did; the localdep:git2was pulling a crate into the graph that this crate then never called.Replaced the declaration with a note saying not to add it back and why, and corrected the
memory-gitfeature comment to say the cohort arrives by way of tinycortex.No behaviour change and no change to what a
memory-gitbuild links:git2was already in the graph through tinycortex whenever the gate was on, so cargo unified the two.Impact
Cargo.lock:git2is no longer listed undertinymemory-core's dependencies. It remains undertinycortex, which is now its only parent.git2/libgit2-sys/libz-sysin full.Validation
cargo check --workspace --all-targets(default features) — clean.cargo check -p tinymemory-core --features memory-git --all-targets— clean.cargo tree -e normal -i git2 --features memory-gitlists tinycortex as the sole source, andcargo checkis clean with the gate both on and off and on the full product feature set.Related
Summary by CodeRabbit