|
@@ -11,6 +11,45 @@ through the issue tracker with your idea so that we can help out and possibly
|
11
|
11
|
guide you. Coordinating up front makes it much easier to avoid frustration later
|
12
|
12
|
on.
|
13
|
13
|
|
|
14
|
+# Development
|
|
15
|
+
|
|
16
|
+Make sure `GOPATH` is set in your current shell. The common way is to have
|
|
17
|
+something like `export GOPATH=$HOME/gocode` in your `.bashrc` file so that it's
|
|
18
|
+automatically set in all console sessions.
|
|
19
|
+
|
|
20
|
+To get the source code, run
|
|
21
|
+
|
|
22
|
+```
|
|
23
|
+go get github.com/google/pprof
|
|
24
|
+```
|
|
25
|
+
|
|
26
|
+To run the tests, do
|
|
27
|
+
|
|
28
|
+```
|
|
29
|
+cd $GOPATH/src/github.com/google/pprof
|
|
30
|
+go test -v ./...
|
|
31
|
+```
|
|
32
|
+
|
|
33
|
+When you wish to work with your own fork of the source (which is required to be
|
|
34
|
+able to create a pull request), you'll want to get your fork repo as another Git
|
|
35
|
+remote in the same `github.com/google/pprof` directory. Otherwise, if you'll `go
|
|
36
|
+get` your fork directly, you'll be getting errors like `use of internal package
|
|
37
|
+not allowed` when running tests. To set up the remote do something like
|
|
38
|
+
|
|
39
|
+```
|
|
40
|
+cd $GOPATH/src/github.com/google/pprof
|
|
41
|
+git remote add aalexand git@github.com:aalexand/pprof.git
|
|
42
|
+git fetch aalexand
|
|
43
|
+git checkout -b my-new-feature
|
|
44
|
+# hack hack hack
|
|
45
|
+go test -v ./...
|
|
46
|
+git commit -a -m "Add new feature."
|
|
47
|
+git push aalexand
|
|
48
|
+```
|
|
49
|
+
|
|
50
|
+where `aalexand` is your Github user ID. Then proceed to the Github UI to send a
|
|
51
|
+code review.
|
|
52
|
+
|
14
|
53
|
# Code reviews
|
15
|
54
|
|
16
|
55
|
All submissions, including submissions by project members, require review.
|