-
Notifications
You must be signed in to change notification settings - Fork 33
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
Multiple Badger Versions #109
Comments
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
I'm fine with it, we went with I'm not sure on the branch vs directory both will create duplication. It would be best if we could transition users from v1 to v2 and actively maintain only the v2, but that is a problem on its own. |
At the Go module level this is true, but using git branches means that the duplication is easier to handle. One can use simple everyday git commands like |
True |
Cool. Sounds like we have a plan then 🎉.
|
I forked this repo's temporary v2 version to v3. Only (some of) the configuration options were breaking changes in the API: https://github.com/indra-labs/go-ds-badger3 I was going to do a PR on it to I'm not using outdated badger in my project, and we already have code using v3 so this was all done to eliminate versioning problems especially relating to the I seriously doubt that there is much work in this upgrade in general, just that for IPFS project it seems like it might be spread across a few places that all need to be fixed at the same time. |
Problem
Badger releases updates that are breaking changes to the on disk data format, we should be able to create datastore wrappers for each of these data formats. The current state is that we have a new repo per Badger version (e.g. go-ds-badger and go-ds-badger2) this seems like a pretty high maintenance burden and will likely result in code duplication across repos.
Proposal
Let's make branches in this repo are tied to the Badger version. For example, if the latest version of Badger is v3 then we have three branches
v1
,v2, and
master`. Whenever we need to make a modification to a Badger version we push commits to the relevant branch and tag it under the relevant version number.When we tag versions the major version should correspond to the Badger datastore version. For example, if we need to make an interface breaking change to the v1 badger we would tag the latest commit on the v1 branch as
v1.1.0
. While this can cause us problems withgo get
these problems are inevitable since Badger's major versions correspond to the datastore and not the programmatic interfaces anyhow.Alternatives
go get
because the underlying Badger interfaces can break go-ds-badger@Kubuxu how do you feel about moving go-ds-badger2 code into a v2 branch in this repo? We can even alias go-ds-badger2 to point to go-ds-badger/v2.
cc @Stebalien @gammazero @mvdan
The text was updated successfully, but these errors were encountered: