-
-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] transition to gitoxide
#112
Conversation
Cargo.toml
Outdated
@@ -29,6 +30,7 @@ anyhow = "1" | |||
cfg-if = "1" | |||
enum-iterator = "0" | |||
getset = "0" | |||
git-repository = { version = "0.16.0", optional = true, default-features = false, git = "https://github.com/Byron/gitoxide", branch = "main" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that his is only for the time being - when it's clear this PR should go ahead it will be switched to the published version on crates.io.
In the related ticket in the |
Note that given the communication with the
|
This PR shows how a first step towards transitioning to `gitoxide` could look like. It adds a `gitoxide` feature toggle which if set uses `gitoxide` to fill in all `git` related values. It works additively. The best way for me to see how useful `gitoxide` is for applications and libraries is to seek out mature projects that use `git2` and see how `gitoxide` fits in there. `vergen` was special as it brought the notion of MSRV support into [`gitoxide''s understanding of stability](https://github.com/Byron/gitoxide/blob/498072ea42dca7b9d00bedba42829bdac92195b9/STABILITY.md#L124) and required it to run on and work on various targets that aren't typically tested in its own CI. Users of `vergen` expect stability and compilation in a variety of environment and `gitoxide` wants to cater to that. - `gitoxide` is generally faster than `git2` and uses less system resources. - `gitoxide` aims to support all features of `git` focussing on correctness, usability and performance, in that order. - `gitoxide` supports a minimal pure Rust build. - In case of issues, one deals with only a single project, whereas with `git2` there is `libgit2` and `git2`. - `gitoxide` guarantees to hide breaking changes behind major/minor version bumps to never break downstream. Changing the MSRV is considered a breaking change. All this is described in the [Stability Guide](https://github.com/Byron/gitoxide/blob/498072ea42dca7b9d00bedba42829bdac92195b9/STABILITY.md). - The maintainers of `gitoxide` are happy to maintain the `gitoxide` integration until it's first major release. - after the transition period a major version bump for `vergen` is required to allow removing the `gitoxide` feature toggle, unless it should stay a no-op. - compile times for `gitoxide` are higher overall. - …there is probably more that I can't think of. What's missing is to obtain a worktree status, effectively a diff between index and worktree, to support the optional 'dirty' suffix in the semver description key. The above is a writeup of all I know about this transition, and I hope it can serve as foundation for figuring out how (or if) to proceed with this. Thanks for sharing your thoughts.
Maybe it's better to refer to a stable version from crates now.
Is there a chance for feedback here? If not I am happy to close this PR as well. |
@CraZySacX Is there anything that can be done to make progress here ? I would love to use vergen + gitoxide in my projects. |
Sorry for the delay here. Let me take a closer look at |
Last time the folks over at If you have any questions or suggestions, I will be happy to help. |
There is a bit of a nasty conflict resolution on this PR. I could work through it, but I think I'm going to go down this path instead:
As |
Thanks for taking the time to review the PR, it's much appreciated! The planned path forward looks sound. Implementing
|
Ok, will keep the command based implementation on regular |
I have published |
This PR shows how a first step towards transitioning to
gitoxide
could look like.It adds a
gitoxide
feature toggle which if set usesgitoxide
to fill in allgit
related values. It works additively.Motivation
The best way for me to see how useful
gitoxide
is for applications and libraries is to seek out mature projects that usegit2
and see howgitoxide
fits in there.vergen
was special as it brought the notion of MSRV support into `gitoxide''s understanding ofstability and required it to run on and work on various targets that aren't typically tested in its own CI.
Users of
vergen
expect stability and compilation in a variety of environment andgitoxide
wants to cater to that.Benefits for
vergen
to usegitoxide
gitoxide
is generally faster thangit2
and uses less system resources.gitoxide
aims to support all features ofgit
focussing correctness, usability and performance, in that order.gitoxide
supports a minimal pure Rust build.git2
there islibgit2
andgit2
.gitoxide
guarantees to hide breaking changes behind major/minor version bumps to never break downstream. Changing the MSRV is considered a breaking change. All this is described in the StabilityGuide.
gitoxide
are happy to maintain thegitoxide
integration until it's first major release.Downsides
vergen
is required to allow removing thegitoxide
feature toggle, unless it should stay a no-op.gitoxide
are higher overall.What missing in
gitoxide
for feature parity withgit2
What's missing is to obtain a worktree status, effectively a diff between index and worktree, to support the optional 'dirty' suffix in the semver description key.
Request for feedback
The above is a writeup of all I know about such a transition, and I hope it can serve as foundation for figuring out how to proceed with this. Even though I'd love this to be interesting for you, I would fully understand that it might not fit into the plans you have for
vergen
- in any casegitoxide
got so much better merely by preparing for this RFC so I am happy either way.Thanks for sharing your thoughts.