Contributing
Dolt is an open-source SQL database that has Git-like functionality, including branch, merge, clone, push and pull. As we attract more and more users with various use cases and ways of integrating Dolt into their existing workflows and systems, it's not rare for Dolt to need a little bit of work to support a new client library or upstream dependency.
Dolt consists of multiple parts:
Known issues with each part:

Prerequisites

You should know that:
  1. 1.
    Dolt is largely written in golang and you should install the golang sdk to work with it.
  2. 2.
    Dolt's SCM is git and you will need to download and install it to fetch the source code and create pull requests.
  3. 3.
    Dolt's source code is hosted on github and you will want to create an account and follow the instructions for authenticating to GitHub with SSH if you don't already have one.

Retrieve Source Code

Create a fork of the dolt repo(s) by clicking the fork button at the upper right of each of the respective dolthub github repos.
Create a directory for your dolt workspace.
1
~ $ mkdir dolt_workspace
2
~ $ cd ~/dolt_workspace
Copied!
Clone each of the dolt repos using Git.
1
~/dolt_workspace $ git clone [email protected]:<your-username>/dolt.git
2
~/dolt_workspace $ git clone [email protected]:<your-username>/go-mysql-server.git
3
~/dolt_workspace $ git clone [email protected]:<your-username>/vitess.git
Copied!
By default, the dolt repository builds and links against pinned versions of go-mysql-server and vitess, so to develop them together we need to add a local dependencies for dolt and go-mysql-server.
1
~/dolt_workspace $ cd ./dolt/go
2
~/dolt_workspace/dolt/go $ go mod edit -replace github.com/dolthub/go-mysql-server=../../go-mysql-server
3
~/dolt_workspace/dolt/go $ go mod edit -replace github.com/dolthub/vitess=../../vitess
4
~/dolt_workspace $ cd ../../go-mysql-server
5
~/dolt_workspace/go-mysql-server $ go mod edit -replace github.com/dolthub/vitess=../vitess
6
~/dolt_workspace/go-mysql-server $ cd ..
Copied!
Check that everything is working as expected by running dolt's unit tests (this might take a few minutes).
1
~/dolt_workspace $ cd ./dolt/go
2
~/dolt_workspace/dolt/go $ go test ./...
3
? github.com/dolthub/dolt/go/cmd/dolt [no test files]
4
ok github.com/dolthub/dolt/go/cmd/dolt/cli 0.541s
5
ok github.com/dolthub/dolt/go/cmd/dolt/commands 4.890s
6
.
7
.
8
.
9
ok github.com/dolthub/dolt/go/store/util/verbose 0.373s
10
ok github.com/dolthub/dolt/go/store/util/writers 0.392s
11
ok github.com/dolthub/dolt/go/store/valuefile 0.786s
Copied!

Install Dolt

You can build dolt from source like so:
1
~/dolt_workspace $ cd ./dolt/go
2
~/dolt_workspace/dolt/go $ go install ./cmd/dolt
Copied!

Fix Issue

Refer to these guides to fix bugs specific to each part of dolt:

Submit Pull Request

Remember to remove local dependencies before pushing your changes.
1
~/dolt_workspace $ cd ./dolt/go
2
~/dolt_workspace $ go mod edit -dropreplace github.com/dolthub/go-mysql-server
3
~/dolt_workspace $ go mod edit -dropreplace github.com/dolthub/vitess
4
~/dolt_workspace $ cd ../../go-mysql-server
5
~/dolt_workspace $ go mod edit -dropreplace github.com/dolthub/vitess
6
~/dolt_workspace $ cd ..
Copied!
There is an auto-dependency bump that takes place to keep the different parts up to date. As a result, if your fix required changes to multiple projects, commit them in this order:
  1. 1.
    vitess
  2. 2.
    go-mysql-server
  3. 3.
    dolt
Navigate to the pull requests section of your repo(s).
Pull Request Section
Click on "New pull request".
New Pull Request
Make sure the base repository is set to dolthub/dolt and click "Create pull request".
Create Pull Request
Submitting the PR will get some automated tests run against the branch and will notify the project maintainers that someone has some changes. If there are failures in the automated tests, the maintainers will let you know what steps you need to take to fix things up. Otherwise, the maintainers will provide feedback, or, if everything looks good, they will merge the PR.
Last modified 6mo ago