LogoLogo
DoltHubBlogDiscordGitHubDolt
  • Introduction
    • What Is Dolt?
    • Installation
      • Linux
      • Windows
      • Mac
      • Build from Source
      • Application Server
      • Docker
      • Upgrading
    • Getting Started
      • Version Controlled Database
      • Git For Data
      • Versioned MySQL Replica
    • Use Cases
      • Data Sharing
      • Data and Model Quality Control
      • Manual Data Curation
      • Version Control for your Application
      • Versioned MySQL Replica
      • Audit
      • Configuration Management
      • Offline First
  • Concepts
    • Dolt
      • Git
        • Commits
        • Log
        • Diff
        • Branch
        • Merge
        • Conflicts
        • Remotes
        • Working Set
      • SQL
        • Databases
        • Schema
        • Tables
        • Primary Keys
        • Types
        • Indexes
        • Views
        • Constraints
        • Triggers
        • Procedures
        • Users/Grants
        • Transactions
        • System Variables
      • RDBMS
        • Server
        • Backups
        • Replication
    • DoltHub/DoltLab
      • Permissions
      • Pull Requests
      • Issues
      • Forks
  • SQL Reference
    • Running the Server
      • Configuration
      • Access Management
      • Branch Permissions
      • Backups
      • Garbage Collection
      • Metrics
      • Replication
      • Troubleshooting
    • Version Control Features
      • Using Branches
      • Merges
      • Querying History
      • Using Remotes
      • Procedures
      • Functions
      • System Tables
      • System Variables
      • Saved Queries
    • SQL Language Support
      • Data Description
      • Expressions, Functions, Operators
      • Supported Statements
      • MySQL Information Schema
      • Collations and Character Sets
      • System Variables
      • Miscellaneous
    • Supported Clients
      • Programmatic
      • SQL Editors
    • Benchmarks and Metrics
      • Correctness
      • Latency
      • Import
  • CLI Reference
    • Commands
    • Git Comparison
  • Architecture
    • Overview
    • Storage Engine
      • Commit Graph
      • Prolly Trees
      • Block Store
    • SQL
      • Go MySQL Server
      • Vitess
  • Guides
    • Cheat Sheet
    • Contributing
      • dolt
      • go-mysql-server
    • MySQL to Dolt Replication
    • Importing Data
    • Integrations
  • Other
    • FAQ
    • Roadmap
    • Versioning
  • Products
    • Hosted Dolt
      • Getting Started
      • Notable Features
      • SQL Workbench
      • Cloning a Hosted Database
      • Using DoltHub as a Remote
      • Infrastructure
    • DoltHub
      • Data Sharing
      • API
        • Authentication
        • SQL
        • CSV
        • Database
        • Hooks
      • Continuous Integration
        • Getting Started
        • Workflow Reference
      • Transform File Uploads
      • Workspaces
    • DoltLab
    • Dolt Workbench
    • DoltgreSQL
Powered by GitBook
On this page
  • Prerequisites
  • Retrieve Source Code
  • Install Dolt
  • Fix Issue
  • Submit Pull Request

Was this helpful?

Edit on GitHub
Export as PDF
  1. Guides

Contributing

PreviousCheat SheetNextdolt

Last updated 1 year ago

Was this helpful?

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. Dolt is largely written in and you should to work with it.

  2. Dolt's SCM is and you will need to to fetch the source code and create pull requests.

  3. Dolt's source code is hosted on and you will want to and 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 git@github.com:<your-username>/dolt.git
~/dolt_workspace $ git clone git@github.com:<your-username>/go-mysql-server.git
~/dolt_workspace $ git clone git@github.com:<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 github.com/dolthub/go-mysql-server=../../go-mysql-server
~/dolt_workspace/dolt/go $ go mod edit -replace github.com/dolthub/vitess=../../vitess
~/dolt_workspace $ cd ../../go-mysql-server
~/dolt_workspace/go-mysql-server $ go mod edit -replace github.com/dolthub/vitess=../vitess
~/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 ./...
?       github.com/dolthub/dolt/go/cmd/dolt     [no test files]
ok      github.com/dolthub/dolt/go/cmd/dolt/cli 0.541s
ok      github.com/dolthub/dolt/go/cmd/dolt/commands    4.890s
.
.
.
ok      github.com/dolthub/dolt/go/store/util/verbose   0.373s
ok      github.com/dolthub/dolt/go/store/util/writers   0.392s
ok      github.com/dolthub/dolt/go/store/valuefile      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 github.com/dolthub/go-mysql-server
~/dolt_workspace $ go mod edit -dropreplace github.com/dolthub/vitess
~/dolt_workspace $ cd ../../go-mysql-server
~/dolt_workspace $ go mod edit -dropreplace github.com/dolthub/vitess
~/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.

Dolt
dolt
go-mysql-server
vitess
dolt issues
go-mysql-server issues
vitess issues
golang
install the golang sdk
git
download and install it
github
create an account
follow the instructions for authenticating to GitHub with SSH
Contributing to Dolt
Contributing to Go MySQL Server