github.com/slspeek/camlistore_namedsearch@v0.0.0-20140519202248-ed6f70f7721a/HACKING (about) 1 Camlistore contributors regularly use Linux and OS X, and both are 2 100% supported. 3 4 Developing on Windows is sometimes broken, but should work. Let us 5 know if we broke something, or we accidentally depend on some 6 Unix-specific build tool somewhere. 7 8 See http://camlistore.org/docs/contributing for information on how to 9 contribute to the project and submit patches. Notably, we use Gerrit 10 for code review. Our Gerrit instance is at https://camlistore.org/r/ 11 12 See architecture docs: https://camlistore.org/docs/ 13 14 You can view docs for Camlistore packages with local godoc, or 15 godoc.org. 16 17 It's recommended you use git to fetch the source code, rather than 18 hack from a Camlistore release's zip file: 19 20 $ git clone https://camlistore.googlesource.com/camlistore 21 22 (We use github for distribution but its code review system is so poor, 23 we don't use its Pull Request mechanism. The Gerrit git server & code 24 review system is the main repo. See 25 http://camlistore.org/docs/contributing for how to use them. We might 26 support github for pull requests in the future, once it's properly 27 integrated with external code review tools. We had a meeting with Github 28 to discuss the ways in which their code review tools are poor.) 29 30 On Debian/Ubuntu, some deps to get started: 31 32 $ sudo apt-get install libsqlite3-dev sqlite3 pkg-config git 33 34 During development, rather than use the main binaries ("camput", 35 "camget", "camtool", "cammount", etc) directly, we instead use a 36 wrapper (devcam) that automatically configure the environment to use 37 the test server & test environment. 38 39 To build devcam: 40 41 $ go run make.go 42 43 And devcam will be in <camroot>/bin/devcam. You'll probably want to 44 symlink it into your $PATH. 45 46 Alternatively, if your Camlistore root is checked out at 47 $GOPATH/src/camlistore.org (optional, but natural for Go users), you 48 can just: 49 50 $ go install ./dev/devcam 51 52 The subcommands of devcam start the server or run camput/camget/etc: 53 54 $ devcam server # main server 55 $ devcam appengine # App Engine version of the server 56 $ devcam put # camput 57 $ devcam get # camget 58 $ devcam tool # camtool 59 $ devcam mount # cammount 60 61 Once the dev server is running, 62 63 - Upload a file: 64 devcam put file ~/camlistore/COPYING 65 - Create a permanode: 66 devcam put permanode 67 - Use the UI: http://localhost:3179/ui/ 68 69 Before submitting a patch, you should check that all the tests pass with: 70 71 $ devcam test 72 73 You can use your usual git workflow to commit your changes, but for each 74 change to be reviewed you should merge your commits into one before submitting 75 to gerrit for review. 76 You should also try to write a meaningful commit message, which at least states 77 in the first sentence what part of camlistore this commit is affecting. The 78 following text should state what problem the change is addressing, and how. 79 An example would be: 80 81 " 82 HACKING: add tips about writing a commit message. 83 84 First time committers are not always aware about good commit message etiquette. 85 These few notes should help them. 86 " 87 88 You can optionally use our pre-commit hook so that your code gets gofmt'ed 89 before being submitted (which should be done anyway). 90 91 $ cd .git/hooks 92 $ ln -s ../../misc/pre-commit.githook pre-commit 93 94 Finally, submit your code to gerrit with: 95 96 $ devcam review 97 98 Please update this file as appropriate.