3030 available through your OS package manager)
3131- Install [ Docker] ( https://docs.docker.com/install/ ) and
3232 [ Docker Compose] ( https://docs.docker.com/compose/install/ ) .
33- - [ Install Go 1.22.12 or above] ( https://golang.org/doc/install ) .
33+ - [ Install Go 1.24.3 or above] ( https://golang.org/doc/install ) .
34+ - Install
35+ [ trunk] ( https://docs.trunk.io/code-quality/overview/getting-started/install#install-the-launcher ) .
36+ Our CI uses trunk to lint and check code, having it installed locally will save you time.
3437
3538### Setup Dgraph from source repo
3639
@@ -43,7 +46,7 @@ make install
4346This will put the source code in a Git repo under ` $GOPATH/src/github.com/dgraph-io/dgraph ` and
4447compile the binaries to ` $GOPATH/bin ` .
4548
46- ### Setup Badger from source repo
49+ ### Setup Badger from source repo (optional)
4750
4851Dgraph source repo vendors its own version of Badger. If you are just working on Dgraph, you do not
4952necessarily need to check out Badger from its own repo. However, if you want to contribute to Badger
@@ -58,7 +61,7 @@ This will put the source code in a Git repo under `$GOPATH/src/github.com/dgraph
5861### Protocol buffers
5962
6063We use [ protocol buffers] ( https://developers.google.com/protocol-buffers/ ) to serialize data between
61- our server and the Go client and also for inter-worker communication. If you make any changes to the
64+ our server and our clients and also for inter-worker communication. If you make any changes to the
6265` .proto ` files, you would have to recompile them.
6366
6467Install the ` protoc ` compiler which is required for compiling proto files used for gRPC
@@ -117,6 +120,11 @@ Licensed variously under the Apache Public License 2.0 and Dgraph Community Lice
117120© Istari Digital, Inc.
118121```
119122
123+ #### Building Dgraph on non-Linux machines
124+
125+ See the [ README] ( t/README.md ) in the [ _ t_ ] ( t ) folder for instructions on building Dgraph on
126+ non-Linux machines.
127+
120128### Build Docker Image
121129
122130``` sh
@@ -140,8 +148,8 @@ For dependencies, runner flags and instructions for running tests on non-Linux m
140148[ README] ( t/README.md ) in the [ _ t_ ] ( t ) folder.
141149
142150Other integration tests do not use the testing framework located in the ` t ` folder. Consult the
143- [ github actions definitions] ( .github ) folder to discover the tests we run as part of our continuous
144- delivery process.
151+ [ github workflow definitions] ( .github/workflows ) folder to discover the tests we run as part of our
152+ continuous integration process.
145153
146154Non-integration unit tests exist for many core packages that can be exercised without invoking the
147155testing framework. For instance, to unit test the core DQL parsing package:
@@ -157,7 +165,9 @@ coding, or could be achieved by rewriting an entire module, that you may have pa
157165yesterday.
158166
159167- ** Pull requests are welcome** , as long as you're willing to put in the effort to meet the
160- guidelines. After you fork dgraph, create your pull request against our ` main ` branch
168+ guidelines. After you fork Dgraph, create your pull request against our ` main ` branch. Please
169+ follow the instructions in the PR template carefully.
170+ - Be prepared to document your additions/changes in our public documentation (if applicable)
161171- Aim for clear, well written, maintainable code
162172- Simple and minimal approach to features, like Go
163173- New features must include passing unit tests, and integration tests when appropriate
@@ -172,7 +182,8 @@ yesterday.
172182### Code style
173183
174184- We're following [ Go Code Review] ( https://github.com/golang/go/wiki/CodeReviewComments )
175- - Use ` go fmt ` to format your code before committing
185+ - At a minimum, use ` go fmt ` to format your code before committing. Ideally you should use ` trunk `
186+ as our CI will run ` trunk ` on your code
176187- If you see _ any code_ which clearly violates the style guide, please fix it and send a pull
177188 request. No need to ask for permission
178189- Avoid unnecessary vertical spaces. Use your judgment or follow the code review comments
0 commit comments