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:


You should know that:

  1. Dolt is largely written in golang and you should install the golang sdk to work with it.

  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. 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.

~ $ mkdir dolt_workspace
~ $ cd ~/dolt_workspace

Clone each of the dolt repos using Git.

~/dolt_workspace $ git clone<your-username>/dolt.git
~/dolt_workspace $ git clone<your-username>/go-mysql-server.git
~/dolt_workspace $ git clone<your-username>/vitess.git

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.

~/dolt_workspace $ cd ./dolt/go
~/dolt_workspace/dolt/go $ go mod edit -replace
~/dolt_workspace/dolt/go $ go mod edit -replace
~/dolt_workspace $ cd ../../go-mysql-server
~/dolt_workspace/go-mysql-server $ go mod edit -replace
~/dolt_workspace/go-mysql-server $ cd ..

Check that everything is working as expected by running dolt's unit tests (this might take a few minutes).

~/dolt_workspace $ cd ./dolt/go
~/dolt_workspace/dolt/go $ go test ./...
?     [no test files]
ok 0.541s
ok    4.890s
ok   0.373s
ok   0.392s
ok      0.786s

Install Dolt

You can build dolt from source like so:

~/dolt_workspace $ cd ./dolt/go
~/dolt_workspace/dolt/go $ go install ./cmd/dolt

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.

~/dolt_workspace $ cd ./dolt/go
~/dolt_workspace $ go mod edit -dropreplace
~/dolt_workspace $ go mod edit -dropreplace
~/dolt_workspace $ cd ../../go-mysql-server
~/dolt_workspace $ go mod edit -dropreplace
~/dolt_workspace $ cd ..

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. vitess

  2. go-mysql-server

  3. dolt

Navigate to the pull requests section of your repo(s).

Click on "New pull request".

Make sure the base repository is set to dolthub/dolt and click "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 updated