blob: c90a6528ce1bf210508f968b6bbea517c2d49f65 [file] [log] [blame] [view]
Marcel van Lohuizen57271032018-12-20 21:23:10 +01001# Contribution Guide
Marcel van Lohuizen09491352018-12-20 20:20:54 +01002
Marcel van Lohuizen09491352018-12-20 20:20:54 +01003
Marcel van Lohuizen969a7832018-11-22 19:43:51 +01004The CUE project welcomes all contributors.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +01005
Marcel van Lohuizen969a7832018-11-22 19:43:51 +01006This document is a guide to help you through the process
7of contributing to the CUE project, which is a little different
8from that used by other open source projects.
9We assume you have a basic understanding of Git and Go.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +010010
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010011
Marcel van Lohuizen57271032018-12-20 21:23:10 +010012## Becoming a contributor
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010013
Marcel van Lohuizen57271032018-12-20 21:23:10 +010014### Overview
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010015
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010016The first step is registering as a CUE contributor and configuring your environment.
17Here is a checklist of the required steps to follow:
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010018
Marcel van Lohuizen57271032018-12-20 21:23:10 +010019
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +010020- **Step 0**: Decide on a single Google Account you will be using to contribute to CUE.
Marcel van Lohuizen57271032018-12-20 21:23:10 +010021Use that account for all the following steps and make sure that `git`
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010022is configured to create commits with that account's e-mail address.
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +010023- **Step 1**: [Sign and submit](https://cla.developers.google.com/clas) a
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010024CLA (Contributor License Agreement).
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +010025- **Step 2**: Configure authentication credentials for the CUE Git repository.
Marcel van Lohuizen57271032018-12-20 21:23:10 +010026Visit
27[cue.googlesource.com](https://cue.googlesource.com), click
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010028on "Generate Password" (top right), and follow the instructions.
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +010029- **Step 3**: Register for Gerrit, the code review tool used by the CUE team,
Marcel van Lohuizen57271032018-12-20 21:23:10 +010030by [visiting this page](https://cue-review.googlesource.com/login/).
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010031The CLA and the registration need to be done only once for your account.
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +010032- **Step 4**: Install `git-codereview` by running
Marcel van Lohuizen57271032018-12-20 21:23:10 +010033`go get -u golang.org/x/review/git-codereview`
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010034
35<!-- TODO
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010036If you prefer, there is an automated tool that walks through these steps.
37Just run:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +010038
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010039
Marcel van Lohuizen57271032018-12-20 21:23:10 +010040```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010041$ go get -u cuelang.org/x/tools/cmd/cue-contrib-init
42$ cd /code/to/edit
43$ cue-contrib-init
Marcel van Lohuizen57271032018-12-20 21:23:10 +010044```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010045--->
46
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010047The rest of this chapter elaborates on these instructions.
48If you have completed the steps above (either manually or through the tool), jump to
Marcel van Lohuizen57271032018-12-20 21:23:10 +010049Before contributing code.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +010050
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010051
Marcel van Lohuizen57271032018-12-20 21:23:10 +010052### Step 0: Select a Google Account
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010053
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010054A contribution to CUE is made through a Google account with a specific
55e-mail address.
56Make sure to use the same account throughout the process and
57for all your subsequent contributions.
58You may need to decide whether to use a personal address or a corporate address.
59The choice will depend on who
60will own the copyright for the code that you will be writing
61and submitting.
62You might want to discuss this topic with your employer before deciding which
63account to use.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010064
Marcel van Lohuizencd59e422018-12-20 20:56:05 +010065
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010066Google accounts can either be Gmail e-mail accounts, G Suite organization accounts, or
67accounts associated with an external e-mail address.
68For instance, if you need to use
69an existing corporate e-mail that is not managed through G Suite, you can create
70an account associated
Marcel van Lohuizen57271032018-12-20 21:23:10 +010071[with your existing
72e-mail address](https://accounts.google.com/SignUpWithoutGmail).
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010073
Marcel van Lohuizencd59e422018-12-20 20:56:05 +010074
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010075You also need to make sure that your Git tool is configured to create commits
76using your chosen e-mail address.
77You can either configure Git globally
78(as a default for all projects), or locally (for a single specific project).
79You can check the current configuration with this command:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +010080
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010081
Marcel van Lohuizen57271032018-12-20 21:23:10 +010082```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010083$ git config --global user.email # check current global config
84$ git config user.email # check current local config
Marcel van Lohuizen57271032018-12-20 21:23:10 +010085```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010086
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010087To change the configured address:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +010088
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010089
Marcel van Lohuizen57271032018-12-20 21:23:10 +010090```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010091$ git config --global user.email name@example.com # change global config
92$ git config user.email name@example.com # change local config
Marcel van Lohuizen57271032018-12-20 21:23:10 +010093```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010094
95
Marcel van Lohuizen57271032018-12-20 21:23:10 +010096### Step 1: Contributor License Agreement
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010097
Marcel van Lohuizen969a7832018-11-22 19:43:51 +010098Before sending your first change to the CUE project
99you must have completed one of the following two CLAs.
100Which CLA you should sign depends on who owns the copyright to your work.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100101
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100102
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100103- If you are the copyright holder, you will need to agree to the
104[individual contributor license agreement](https://developers.google.com/open-source/cla/individual),
105which can be completed online.
106- If your organization is the copyright holder, the organization
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100107will need to agree to the
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100108[corporate
109contributor license agreement](https://developers.google.com/open-source/cla/corporate).
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100110
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100111You can check your currently signed agreements and sign new ones at
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100112the
113[Google Developers Contributor License Agreements](https://cla.developers.google.com/clas?pli=1&amp;authuser=1) website.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100114If the copyright holder for your contribution has already completed the
115agreement in connection with another Google open source project,
116it does not need to be completed again.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100117
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100118
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100119If the copyright holder for the code you are submitting changes&mdash;for example,
120if you start contributing code on behalf of a new company&mdash;please send mail
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100121to the [`cue-dev` mailing list](mailto:cue-dev@googlegroups.com).
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100122This will let us know the situation so we can make sure an appropriate agreement is
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100123completed and update the `AUTHORS` file.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100124
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100125
126
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100127### Step 2: Configure git authentication
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100128
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100129The main CUE repository is located at
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100130[cue.googlesource.com](https://cue.googlesource.com),
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100131a Git server hosted by Google.
132Authentication on the web server is made through your Google account, but
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100133you also need to configure `git` on your computer to access it.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100134Follow this steps:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100135
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100136
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100137- Visit [cue.googlesource.com](https://cue.googlesource.com)
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100138and click on "Generate Password" in the page's top right menu bar.
139You will be redirected to accounts.google.com to sign in.
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100140- After signing in, you will be taken to a page with the title "Configure Git".
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100141This page contains a personalized script that when run locally will configure Git
142to hold your unique authentication key.
143This key is paired with one that is generated and stored on the server,
144analogous to how SSH keys work.
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100145- Copy and run this script locally in your terminal to store your secret
146authentication token in a `.gitcookies` file.
147If you are using a Windows computer and running `cmd`,
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100148you should instead follow the instructions in the yellow box to run the command;
149otherwise run the regular script.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100150
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100151### Step 3: Create a Gerrit account
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100152
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100153Gerrit is an open-source tool used by CUE maintainers to discuss and review
154code submissions.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100155
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100156
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100157To register your account, visit
158[cue-review.googlesource.com/login/](https://cue-review.googlesource.com/login/)
159and sign in once using the same Google Account you used above.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100160
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100161
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100162### Step 4: Install the git-codereview command
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100163
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100164Changes to CUE must be reviewed before they are accepted, no matter who makes the change.
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100165A custom `git` command called `git-codereview`
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100166simplifies sending changes to Gerrit.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100167
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100168
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100169Install the `git-codereview` command by running,
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100170
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100171
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100172```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100173$ go get -u golang.org/x/review/git-codereview
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100174```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100175
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100176Make sure `git-codereview` is installed in your shell path, so that the
177`git` command can find it.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100178Check that
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100179
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100180
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100181```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100182$ git codereview help
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100183```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100184
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100185prints help text, not an error.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100186
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100187
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100188On Windows, when using git-bash you must make sure that
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100189`git-codereview.exe` is in your `git` exec-path.
190Run `git --exec-path` to discover the right location then create a
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100191symbolic link or just copy the executable from $GOPATH/bin to this directory.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100192
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100193
194
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100195## Before contributing code
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100196
197<!--
198TODO
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100199The project welcomes code patches, but to make sure things are well
200coordinated you should discuss any significant change before starting
201the work.
202It's recommended that you signal your intention to contribute in the
203issue tracker, either by <a href="https://cuelang.org/issue/new">filing
204a new issue</a> or by claiming
205an <a href="https://cuelang.org/issues">existing one</a>.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100206
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100207-->
208
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100209### Check the issue tracker
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100210
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100211Whether you already know what contribution to make, or you are searching for
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100212an idea, the [issue tracker](https://github.com/cuelang/cue/issues) is
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100213always the first place to go.
214Issues are triaged to categorize them and manage the workflow.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100215
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100216
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100217Most issues will be marked with one of the following workflow labels:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100218
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100219
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100220- **NeedsInvestigation**: The issue is not fully understood
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100221 and requires analysis to understand the root cause.
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100222- **NeedsDecision**: the issue is relatively well understood, but the
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100223 CUE team hasn't yet decided the best way to address it.
224 It would be better to wait for a decision before writing code.
225 If you are interested on working on an issue in this state,
226 feel free to "ping" maintainers in the issue's comments
227 if some time has passed without a decision.
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100228- **NeedsFix**: the issue is fully understood and code can be written
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100229 to fix it.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100230
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100231You can use GitHub's search functionality to find issues to help out with. Examples:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100232
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100233
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100234- Issues that need investigation:
235 [`is:issue is:open label:NeedsInvestigation`](
236 https://github.com/cuelang/cue/issues?q=is%3Aissue+is%3Aopen+label%3ANeedsInvestigation)
237- Issues that need a fix:
238 [`is:issue is:open label:NeedsFix`](https://github.com/cuelang/cue/issues?q=is%3Aissue+is%3Aopen+label%3ANeedsFix)
239- Issues that need a fix and have a CL:
240 [`is:issue is:open label:NeedsFix "cuelang.org/cl"`](https://github.com/cuelang/cue/issues?q=is%3Aissue+is%3Aopen+label%3ANeedsFix+%22golang.org%2Fcl%22)
241- Issues that need a fix and do not have a CL:
242 [`is:issue is:open label:NeedsFix NOT "cuelang.org/cl"`](https://github.com/cuelang/cue/issues?q=is%3Aissue+is%3Aopen+label%3ANeedsFix+NOT+%22golang.org%2Fcl%22)
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100243
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100244### Open an issue for any new problem
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100245
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100246Excluding very trivial changes, all contributions should be connected
247to an existing issue.
248Feel free to open one and discuss your plans.
249This process gives everyone a chance to validate the design,
250helps prevent duplication of effort,
251and ensures that the idea fits inside the goals for the language and tools.
252It also checks that the design is sound before code is written;
253the code review tool is not the place for high-level discussions.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100254
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100255
256<!--
257TODO
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100258When planning work, please note that the CUE project follows a <a
259href="https://cuelang.org/wiki/CUE-Release-Cycle">six-month development cycle</a>.
260The latter half of each cycle is a three-month feature freeze during
261which only bug fixes and documentation updates are accepted.
262New contributions can be sent during a feature freeze, but they will
263not be merged until the freeze is over.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100264
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100265
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100266Significant changes to the language, libraries, or tools must go
267through the
268<a href="https://cuelang.org/s/proposal-process">change proposal process</a>
269before they can be accepted.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100270
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100271
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100272Sensitive security-related issues (only!) should be reported to <a href="mailto:security@cuelang.org">security@cuelang.org</a>.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100273
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100274
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100275## Sending a change via GitHub
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100276
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100277First-time contributors that are already familiar with the
278<a href="https://guides.github.com/introduction/flow/">GitHub flow</a>
279are encouraged to use the same process for CUE contributions.
280Even though CUE
281maintainers use Gerrit for code review, a bot called Gopherbot has been created to sync
282GitHub pull requests to Gerrit.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100283
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100284
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100285Open a pull request as you normally would.
286Gopherbot will create a corresponding Gerrit change and post a link to
287it on your GitHub pull request; updates to the pull request will also
288get reflected in the Gerrit change.
289When somebody comments on the change, their comment will be also
290posted in your pull request, so you will get a notification.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100291
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100292
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100293Some things to keep in mind:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100294
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100295
296<ul>
297<li>
298To update the pull request with new code, just push it to the branch; you can either
299add more commits, or rebase and force-push (both styles are accepted).
300</li>
301<li>
302If the request is accepted, all commits will be squashed, and the final
303commit description will be composed by concatenating the pull request's
304title and description.
305The individual commits' descriptions will be discarded.
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100306See Writing good commit messages</a> for some
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100307suggestions.
308</li>
309<li>
310Gopherbot is unable to sync line-by-line codereview into GitHub: only the
311contents of the overall comment on the request will be synced.
312Remember you can always visit Gerrit to see the fine-grained review.
313</li>
314</ul>
315-->
316
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100317## Sending a change via Gerrit
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100318
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100319It is not possible to fully sync Gerrit and GitHub, at least at the moment,
320so we recommend learning Gerrit.
321It's different but powerful and familiarity
322with help you understand the flow.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100323
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100324
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100325### Overview
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100326
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100327This is an overview of the overall process:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100328
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100329
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +0100330- **Step 1:** Clone the CUE source code from cue.googlesource.com
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100331and make sure it's stable by compiling and testing it once:
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100332```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100333$ git clone https://cue.googlesource.com/core
334$ cd core
335$ go test ./...
336$ go install ./cmd/cue
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100337```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100338
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +0100339- **Step 2:** Prepare changes in a new branch, created from the master branch.
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100340To commit the changes, use `git` `codereview` `change`; that
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100341will create or amend a single commit in the branch.
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100342```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100343$ git checkout -b mybranch
344$ [edit files...]
345$ git add [files...]
346$ git codereview change # create commit in the branch
347$ [edit again...]
348$ git add [files...]
349$ git codereview change # amend the existing commit with new changes
350$ [etc.]
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100351```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100352
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +0100353- **Step 3:** Test your changes, re-running `go test`.
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100354```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100355$ go test ./... # recompile and test
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100356```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100357
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +0100358- **Step 4:** Send the changes for review to Gerrit using `git`
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100359`codereview` `mail` (which doesn't use e-mail, despite the name).
360```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100361$ git codereview mail # send changes to Gerrit
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100362```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100363
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +0100364- **Step 5:** After a review, apply changes to the same single commit
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100365and mail them to Gerrit again:
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100366```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100367$ [edit files...]
368$ git add [files...]
369$ git codereview change # update same commit
370$ git codereview mail # send to Gerrit again
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100371```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100372
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100373The rest of this section describes these steps in more detail.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100374
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100375
376
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100377### Step 1: Clone the CUE source code
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100378
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100379In addition to a recent CUE installation, you need to have a local copy of the source
380checked out from the correct repository.
381You can check out the CUE source repo onto your local file system anywhere
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100382you want as long as it's outside your `GOPATH`.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100383Either clone from
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100384`cue.googlesource.com` or from GitHub:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100385
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100386
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100387```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100388$ git clone https://github.com/cuelang/core # or https://cue.googlesource.com/core
389$ cd core
390$ go test ./...
391# go install ./cmd/cue
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100392```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100393
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100394### Step 2: Prepare changes in a new branch
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100395
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100396Each CUE change must be made in a separate branch, created from the master branch.
397You can use
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100398the normal `git` commands to create a branch and add changes to the
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100399staging area:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100400
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100401
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100402```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100403$ git checkout -b mybranch
404$ [edit files...]
405$ git add [files...]
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100406```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100407
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100408To commit changes, instead of `git commit`, use `git codereview change`.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100409
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100410
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100411```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100412$ git codereview change
413(open $EDITOR)
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100414```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100415
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100416You can edit the commit description in your favorite editor as usual.
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100417The `git` `codereview` `change` command
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100418will automatically add a unique Change-Id line near the bottom.
419That line is used by Gerrit to match successive uploads of the same change.
420Do not edit or delete it.
421A Change-Id looks like this:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100422
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100423
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100424```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100425Change-Id: I2fbdbffb3aab626c4b6f56348861b7909e3e8990
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100426```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100427
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100428The tool also checks that you've
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100429run `go` `fmt` over the source code, and that
430the commit message follows the suggested format.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100431
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100432
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100433If you need to edit the files again, you can stage the new changes and
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100434re-run `git` `codereview` `change`: each subsequent
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100435run will amend the existing commit while preserving the Change-Id.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100436
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100437
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100438Make sure that you always keep a single commit in each branch.
439If you add more
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100440commits by mistake, you can use `git` `rebase` to
441[squash them together](https://stackoverflow.com/questions/31668794/squash-all-your-commits-in-one-before-a-pull-request-in-github)
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100442into a single one.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100443
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100444
445
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100446### Step 3: Test your changes
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100447
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100448You've written and tested your code, but
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100449before sending code out for review, run <i>all the tests for the whole
450tree</i> to make sure the changes don't break other packages or programs:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100451
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100452
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100453```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100454$ go test ./...
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100455```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100456
457
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100458### Step 4: Send changes for review
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100459
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100460Once the change is ready and tested over the whole tree, send it for review.
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100461This is done with the `mail` sub-command which, despite its name, doesn't
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100462directly mail anything; it just sends the change to Gerrit:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100463
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100464
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100465```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100466$ git codereview mail
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100467```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100468
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100469Gerrit assigns your change a number and URL, which `git` `codereview` `mail` will print, something like:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100470
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100471
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100472```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100473remote: New Changes:
474remote: https://cue-review.googlesource.com/99999 math: improved Sin, Cos and Tan precision for very large arguments
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100475```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100476
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100477If you get an error instead, check the
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100478Troubleshooting mail errors section.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100479
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100480
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100481If your change relates to an open GitHub issue and you have followed the
482suggested commit message format, the issue will be updated in a few minutes by a bot,
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100483linking your Gerrit change to it in the comments.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100484
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100485
486
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100487### Step 5: Revise changes after a review
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100488
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100489CUE maintainers will review your code on Gerrit, and you will get notifications via e-mail.
490You can see the review on Gerrit and comment on them there.
491You can also reply
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100492[using e-mail](https://gerrit-review.googlesource.com/Documentation/intro-user.html#reply-by-email)
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100493if you prefer.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100494
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100495
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100496If you need to revise your change after the review, edit the files in
497the same branch you previously created, add them to the Git staging
498area, and then amend the commit with
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100499`git` `codereview` `change`:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100500
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100501
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100502```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100503$ git codereview change # amend current commit
504(open $EDITOR)
505$ git codereview mail # send new changes to Gerrit
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100506```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100507
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100508If you don't need to change the commit description, just save and exit from the editor.
509Remember not to touch the special Change-Id line.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100510
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100511
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100512Again, make sure that you always keep a single commit in each branch.
513If you add more
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100514commits by mistake, you can use `git rebase` to
515[squash them together](https://stackoverflow.com/questions/31668794/squash-all-your-commits-in-one-before-a-pull-request-in-github)
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100516into a single one.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100517
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100518
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100519## Good commit messages
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100520
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100521Commit messages in CUE follow a specific set of conventions,
522which we discuss in this section.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100523
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100524
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100525Here is an example of a good one:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100526
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100527
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100528```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100529math: improve Sin, Cos and Tan precision for very large arguments
530
531The existing implementation has poor numerical properties for
532large arguments, so use the McGillicutty algorithm to improve
533accuracy above 1e10.
534
535The algorithm is described at https://wikipedia.org/wiki/McGillicutty_Algorithm
536
537Fixes #159
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100538```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100539
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100540### First line
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100541
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100542The first line of the change description is conventionally a short one-line
543summary of the change, prefixed by the primary affected package.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100544
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100545
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100546A rule of thumb is that it should be written so to complete the sentence
547"This change modifies CUE to _____."
548That means it does not start with a capital letter, is not a complete sentence,
549and actually summarizes the result of the change.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100550
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100551
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100552Follow the first line by a blank line.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100553
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100554
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100555### Main content
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100556
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100557The rest of the description elaborates and should provide context for the
558change and explain what it does.
559Write in complete sentences with correct punctuation, just like
560for your comments in CUE.
561Don't use HTML, Markdown, or any other markup language.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100562
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100563
564
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100565### Referencing issues
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100566
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100567The special notation "Fixes #12345" associates the change with issue 12345 in the
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100568[CUE issue tracker](https://cuelang.org/issue/12345)
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100569When this change is eventually applied, the issue
570tracker will automatically mark the issue as fixed.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100571
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100572
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100573If the change is a partial step towards the resolution of the issue,
574uses the notation "Updates #12345".
575This will leave a comment in the issue
576linking back to the change in Gerrit, but it will not close the issue
577when the change is applied.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100578
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100579
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100580If you are sending a change against a subrepository, you must use
581the fully-qualified syntax supported by GitHub to make sure the change is
582linked to the issue in the main repository, not the subrepository.
583All issues are tracked in the main repository's issue tracker.
584The correct form is "Fixes cuelang/core#159".
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100585
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100586
587
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100588## The review process
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100589
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100590This section explains the review process in detail and how to approach
591reviews after a change has been mailed.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100592
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100593
594
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100595### Common beginner mistakes
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100596
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100597When a change is sent to Gerrit, it is usually triaged within a few days.
598A maintainer will have a look and provide some initial review that for first-time
599contributors usually focuses on basic cosmetics and common mistakes.
600These include things like:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100601
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100602
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +0100603- Commit message not following the suggested
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100604format.
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +0100605- The lack of a linked GitHub issue.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100606The vast majority of changes
607require a linked issue that describes the bug or the feature that the change
608fixes or implements, and consensus should have been reached on the tracker
609before proceeding with it.
610Gerrit reviews do not discuss the merit of the change,
611just its implementation.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100612Only trivial or cosmetic changes will be accepted without an associated issue.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100613
Marcel van Lohuizen09491352018-12-20 20:20:54 +0100614<!-- TODO
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100615<li>
616Change sent during the freeze phase of the development cycle, when the tree
617is closed for general changes.
618In this case,
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100619a maintainer might review the code with a line such as `R=cue1.1`,
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100620which means that it will be reviewed later when the tree opens for a new
621development window.
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100622You can add `R=cue1.XX` as a comment yourself
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100623if you know that it's not the correct time frame for the change.
624</li>
Marcel van Lohuizen09491352018-12-20 20:20:54 +0100625-->
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100626
627<!--
628TODO
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100629### Trybots
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100630
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100631After an initial reading of your change, maintainers will trigger trybots,
632a cluster of servers that will run the full test suite on several different
633architectures.
634Most trybots complete in a few minutes, at which point a link will
635be posted in Gerrit where you can see the results.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100636
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100637
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100638If the trybot run fails, follow the link and check the full logs of the
639platforms on which the tests failed.
640Try to understand what broke, update your patch to fix it, and upload again.
641Maintainers will trigger a new trybot run to see
642if the problem was fixed.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100643
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100644
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100645Sometimes, the tree can be broken on some platforms for a few hours; if
646the failure reported by the trybot doesn't seem related to your patch, go to the
647<a href="https://build.cuelang.org">Build Dashboard</a> and check if the same
648failure appears in other recent commits on the same platform.
649In this case,
650feel free to write a comment in Gerrit to mention that the failure is
651unrelated to your change, to help maintainers understand the situation.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100652
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100653-->
654
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100655### Reviews
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100656
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100657The CUE community values very thorough reviews.
658Think of each review comment like a ticket: you are expected to somehow "close" it
659by acting on it, either by implementing the suggestion or convincing the
660reviewer otherwise.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100661
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100662
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100663After you update the change, go through the review comments and make sure
664to reply to every one.
665You can click the "Done" button to reply
666indicating that you've implemented the reviewer's suggestion; otherwise,
667click on "Reply" and explain why you have not, or what you have done instead.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100668
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100669
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100670It is perfectly normal for changes to go through several round of reviews,
671with one or more reviewers making new comments every time
672and then waiting for an updated change before reviewing again.
673This cycle happens even for experienced contributors, so
674don't be discouraged by it.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100675
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100676
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100677### Voting conventions
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100678
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100679As they near a decision, reviewers will make a "vote" on your change.
680The Gerrit voting system involves an integer in the range -2 to +2:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100681
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100682
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +0100683- **+2** The change is approved for being merged.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100684 Only CUE maintainers can cast a +2 vote.
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +0100685- **+1** The change looks good, but either the reviewer is requesting
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100686 minor changes before approving it, or they are not a maintainer and cannot
687 approve it, but would like to encourage an approval.
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +0100688- **-1** The change is not good the way it is but might be fixable.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100689 A -1 vote will always have a comment explaining why the change is unacceptable.
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +0100690- **-2** The change is blocked by a maintainer and cannot be approved.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100691 Again, there will be a comment explaining the decision.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100692
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100693### Submitting an approved change
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100694
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100695After the code has been +2'ed, an approver will
696apply it to the master branch using the Gerrit user interface.
697This is called "submitting the change".
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100698
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100699
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100700The two steps (approving and submitting) are separate because in some cases maintainers
701may want to approve it but not to submit it right away (for instance,
702the tree could be temporarily frozen).
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100703
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100704
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100705Submitting a change checks it into the repository.
706The change description will include a link to the code review,
707which will be updated with a link to the change
708in the repository.
709Since the method used to integrate the changes is Git's "Cherry Pick",
710the commit hashes in the repository will be changed by
711the submit operation.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100712
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100713
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100714If your change has been approved for a few days without being
715submitted, feel free to write a comment in Gerrit requesting
716submission.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100717
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100718
719
720<!--
721
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100722### More information
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100723
724TODO
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100725In addition to the information here, the CUE community maintains a <a
726href="https://cuelang.org/wiki/CodeReview">CodeReview</a> wiki page.
727Feel free to contribute to this page as you learn more about the review process.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100728
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100729-->
730
731
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100732## Miscellaneous topics
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100733
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100734This section collects a number of other comments that are
735outside the issue/edit/code review/submit process itself.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100736
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100737
738
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100739### Copyright headers
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100740
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100741Files in the CUE repository don't list author names, both to avoid clutter
742and to avoid having to keep the lists up to date.
743Instead, your name will appear in the
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100744[change log](https://cue.googlesource.com/cue/+log) and in the
745[`CONTRIBUTORS`](../CONTRIBUTORS) file and perhaps the
746[`AUTHORS`](../AUTHORS) file.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100747These files are automatically generated from the commit logs periodically.
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100748The [`AUTHORS`](../AUTHORS) file defines who &ldquo;The CUE
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100749Authors&rdquo;&mdash;the copyright holders&mdash;are.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100750
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100751
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100752New files that you contribute should use the standard copyright header:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100753
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100754
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100755```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100756// Copyright 2018 The CUE Authors
757//
758// Licensed under the Apache License, Version 2.0 (the "License");
759// you may not use this file except in compliance with the License.
760// You may obtain a copy of the License at
761//
762// http://www.apache.org/licenses/LICENSE-2.0
763//
764// Unless required by applicable law or agreed to in writing, software
765// distributed under the License is distributed on an "AS IS" BASIS,
766// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
767// See the License for the specific language governing permissions and
768// limitations under the License.
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100769```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100770
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100771(Use the current year if you're reading this in 2019 or beyond.)
772Files in the repository are copyrighted the year they are added.
773Do not update the copyright year on files that you change.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100774
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100775
776
777
778
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100779### Troubleshooting mail errors
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100780
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100781The most common way that the `git` `codereview` `mail`
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100782command fails is because the e-mail address in the commit does not match the one
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100783that you used during the registration process.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100784
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100785If you see something like...
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100786
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100787
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100788```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100789remote: Processing changes: refs: 1, done
790remote:
791remote: ERROR: In commit ab13517fa29487dcf8b0d48916c51639426c5ee9
792remote: ERROR: author email address XXXXXXXXXXXXXXXXXXX
793remote: ERROR: does not match your user account.
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100794```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100795
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100796you need to configure Git for this repository to use the
797e-mail address that you registered with.
798To change the e-mail address to ensure this doesn't happen again, run:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100799
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100800
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100801```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100802$ git config user.email email@address.com
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100803```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100804
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100805Then change the commit to use this alternative e-mail address with this command:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100806
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100807
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100808```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100809$ git commit --amend --author="Author Name &lt;email@address.com&gt;"
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100810```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100811
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100812Then retry by running:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100813
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100814
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100815```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100816$ git codereview mail
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100817```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100818
819
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100820### Quickly testing your changes
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100821
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100822Running `go test ./...` for every single change to the code tree
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100823is burdensome.
824Even though it is strongly suggested to run it before
825sending a change, during the normal development cycle you may want
826to compile and test only the package you are developing.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100827
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100828
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100829In this section, we'll call the directory into which you cloned the CUE repository `$CUEDIR`.
830As CUE uses Go modules, The `cue` tool built by
831`go install` will be installed in the `bin/go` in your
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100832home directory by default.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100833
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100834If you're changing the CUE APIs or code, you can test the results in just
835this package directory.
836
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100837```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100838$ cd $CUEDIR/cue
839$ [make changes...]
840$ go test
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100841```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100842
843You don't need to build a new cue tool to test it.
844Instead you can run the tests from the root.
845
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100846```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100847$ cd $CUEDIR
848$ go test ./...
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100849```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100850
851To use the new tool you would still need to build and install it.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100852
853
854<!--
855TODO
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100856### Contributing to subrepositories (cuelang.org/x/...)
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100857
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100858If you are contributing a change to a subrepository, obtain the
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100859CUE package using `go get`.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100860For example, to contribute
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100861to `cuelang.org/x/editor/vscode`, check out the code by running:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100862
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100863
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100864```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100865$ go get -d cuelang.org/editor/vscode
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100866```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100867
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100868Then, change your directory to the package's source directory
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100869(`$GOPATH/src/cuelang.org/x/oauth2`), and follow the
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100870normal contribution flow.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100871
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100872-->
873
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100874### Specifying a reviewer / CCing others
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100875
876<!--
877TODO:
878
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100879Unless explicitly told otherwise, such as in the discussion leading
880up to sending in the change, it's better not to specify a reviewer.
881All changes are automatically CC'ed to the
882<a href="https://groups.google.com/group/cue-codereviews">cue-codereviews@googlegroups.com</a>
883mailing list.
884If this is your first ever change, there may be a moderation
885delay before it appears on the mailing list, to prevent spam.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100886
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100887-->
888
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100889You can specify a reviewer or CC interested parties
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100890using the `-r` or `-cc` options.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100891Both accept a comma-separated list of e-mail addresses:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100892
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100893
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100894```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100895$ git codereview mail -r joe@cuelang.org -cc mabel@example.com,math-nuts@swtch.com
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100896```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100897
898
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100899### Synchronize your client
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100900
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100901While you were working, others might have submitted changes to the repository.
902To update your local branch, run
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100903
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100904
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100905```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100906$ git codereview sync
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100907```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100908
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100909(Under the covers this runs
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100910`git` `pull` `-r`.)
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100911
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100912
913
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100914### Reviewing code by others
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100915
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100916As part of the review process reviewers can propose changes directly (in the
917GitHub workflow this would be someone else attaching commits to a pull request).
918
919You can import these changes proposed by someone else into your local Git repository.
920On the Gerrit review page, click the "Download ▼" link in the upper right
921corner, copy the "Checkout" command and run it from your local Git repo.
922It will look something like this:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100923
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100924
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100925```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100926$ git fetch https://cue.googlesource.com/review refs/changes/21/13245/1 &amp;&amp; git checkout FETCH_HEAD
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100927```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100928
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100929To revert, change back to the branch you were working in.
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100930
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100931
Marcel van Lohuizen3c3de282018-12-20 21:31:08 +0100932### Set up git aliases
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100933
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100934The `git-codereview` command can be run directly from the shell
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100935by typing, for instance,
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100936
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100937
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100938```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100939$ git codereview sync
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100940```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100941
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100942but it is more convenient to set up aliases for `git-codereview`'s own
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100943subcommands, so that the above becomes,
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100944
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100945
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100946```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100947$ git sync
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100948```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100949
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100950The `git-codereview` subcommands have been chosen to be distinct from
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100951Git's own, so it's safe to define these aliases.
952To install them, copy this text into your
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100953Git configuration file (usually `.gitconfig` in your home directory):
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100954
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100955
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100956```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100957[alias]
958 change = codereview change
959 gofmt = codereview gofmt
960 mail = codereview mail
961 pending = codereview pending
962 submit = codereview submit
963 sync = codereview sync
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100964```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100965
966
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100967### Sending multiple dependent changes
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100968
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100969Advanced users may want to stack up related commits in a single branch.
970Gerrit allows for changes to be dependent on each other, forming such a dependency chain.
971Each change will need to be approved and submitted separately but the dependency
972will be visible to reviewers.
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100973
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100974
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100975To send out a group of dependent changes, keep each change as a different commit under
976the same branch, and then run:
Marcel van Lohuizencd59e422018-12-20 20:56:05 +0100977
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100978
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100979```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100980$ git codereview mail HEAD
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100981```
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100982
Marcel van Lohuizen57271032018-12-20 21:23:10 +0100983Make sure to explicitly specify `HEAD`, which is usually not required when sending
Marcel van Lohuizen969a7832018-11-22 19:43:51 +0100984single changes.
Marcel van Lohuizen09491352018-12-20 20:20:54 +0100985