Skip to content

Multiple Badger VersionsΒ #109

@aschmahmann

Description

@aschmahmann

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 with go get these problems are inevitable since Badger's major versions correspond to the datastore and not the programmatic interfaces anyhow.

Alternatives

  • One repo per version
    • Pros:
      • allows us to use major versions to denote breaking API changes
    • Cons:
      • a pain to maintain especially since the code is largely shared
      • we still can get breaking changes from go get because the underlying Badger interfaces can break go-ds-badger
  • One folder/package per version
    • Pros:
      • all code is viewable in a single branch
    • Cons:
      • code is duplicated across folders

@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

Metadata

Metadata

Assignees

No one assigned

    Labels

    need/triageNeeds initial labeling and prioritization

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions