Monorepo for Tangled tangled.org

proposal: switch git backend to gitoxide #460

Closed boltless.me
Closed opened by boltless.me

[!IMPORTANT] I'm not talking about the performance.

go-git is quite lacking for our need. It doesn't provide enough API, so we are depending on raw git cli in several places. TBH I think golang ecosystem is not suitable for this job. Besides, rust has quite mature ecosystem around cutting-edge VCSes like jujutsu or sapling. With mature ecosystem, we can try more advanced stuffs like custom syncing protocol tailored for our need or rich commit query api using jj revset language.

While go-git can also be good enough with some tweaks, I think it's clear that rust has better libraries here. Currently Knot is already working pretty well without any major issues, so rust rewrite might seem unnecessary and not that important. But what we would like to do in future can be easily done with rust crates. e.g. postgres based git storage.

Things that can be rewritten in rust: #

Things that won't (maybe never) be rewritten in rust: #

  • appview - we prefer go over rust here
  • spindle - opposite case to knot. go has better ecosystem to manage CI system

This is not fixed idea, it's just a proposal for now and I am looking for thoughts.

yes, but obviously needs some tests before actually adopting cause fork-exec git cli has been proven by many git forges for years right now.

You may change the wording in the original post, from a rewrite to adoption of Gitoxide then.

Maybe the developers gave their reasoning for choosing the go implementation (if that's even the case?) in the docs?

Did you look?

You may find https://blog.gitbutler.com/true-grit to be a better thing for this than gitoxide.

Also, I'm curious, why wouldn't you rewrite the appserver / spindles in rust. What's the basis of the assertion that go is better for those things (curiosity not disagreement with this).

grit is far away from feature-complete and its code quality isn't that good imo, but it is indeed pretty good reference for places where gix is missing e.g. git-receive-pack.

  • Go wins on spindle for the entire CI ecosystem. At least it seems to be in my eyes.
  • Go wins on web when we casually make new stuffs and test out new architectures due to its "less abstraction" philosophy.

btw we are now migrating appview to rust (api server) + svelte.

Curious whether jj/jujutsu's workflow (anonymous branches, easy history rewriting) is something being considered for Tangled's UX itself, or is the jj/sapling mention here purely about the Rust ecosystem quality for the backend rewrite? Just want to understand the scope before commenting further.

I mentioned jj purely about rust's VCS ecosystem quality here. But I (personally) am interested in more jj-native workflow too.

btw we did switched our backend recently! knotmirror still needs some work, but we are now encouraging self-hosters to upgrade their knot to rust based version.

Sign up or Sign in to add to the discussion.