]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/contributor/introduction.itexi
Doc: CG Updated section 1.3 - experienced devs
[lilypond.git] / Documentation / contributor / introduction.itexi
1 @c -*- coding: utf-8; mode: texinfo; -*-
2
3 @include included/helpus.itexi
4
5 @node Introduction to contributing
6 @chapter Introduction to contributing
7
8 This chapter presents a quick overview of ways that people can
9 help LilyPond.
10
11 @menu
12 * Help us::
13 * Overview of work flow::
14 * Summary for experienced developers::
15 * Mentors::
16 @end menu
17
18
19 @node Help us
20 @section Help us
21
22 @helpusNeed
23
24 @helpusSimple
25
26 @helpusAdvanced
27
28
29 @node Overview of work flow
30 @section Overview of work flow
31
32 @advanced{Experienced developers should skip to
33 @ref{Summary for experienced developers}.}
34
35 Git is a @emph{version control system} that tracks the history of
36 a program's source code.  The LilyPond source code is maintained
37 as a Git repository, which contains:
38
39 @itemize
40 @item
41 all of the source files needed to build LilyPond, and
42
43 @item
44 a record of the entire history of every change made to every file
45 since the program was born.
46 @end itemize
47
48 The @q{official} LilyPond Git repository is hosted by the GNU
49 Savannah software forge at @uref{http://git.sv.gnu.org}.
50
51 Changes made within one contributor's copy of the repository can
52 be shared with other contributors using @emph{patches}.  A patch
53 is a text file that indicates what changes have been made.
54 If a contributor's patch is approved for inclusion (usually
55 through the mailing list), someone on the current development team
56 will @emph{push} the patch to the official repository.
57
58 The Savannah software forge provides two separate interfaces for
59 viewing the LilyPond Git repository online:
60 @uref{http://git.sv.gnu.org/cgit/lilypond.git/, cgit} and
61 @uref{http://git.sv.gnu.org/gitweb/?p=lilypond.git, gitweb}.
62
63 @ignore
64 The cgit interface should work faster than gitweb
65 in most situations, but only gitweb allows you to search through
66 the source code using @command{grep}, which you may find useful.
67 @end ignore
68
69 Git is a complex and powerful tool, but tends to be confusing at
70 first, particularly for users not familiar with the command line
71 and/or version control systems.  We have created the
72 @command{lily-git} graphical user interface to ease this
73 difficulty.
74
75 @emph{Compiling} (@q{building}) LilyPond allows developers to see
76 how changes to the source code affect the program itself.
77 Compiling is also needed to package the program for specific
78 operating systems or distributions.  LilyPond can be compiled from
79 a local Git repository (for developers), or from a downloaded
80 tarball (for packagers).  Compiling LilyPond is a rather involved
81 process, and most contributor tasks do not require it.
82
83 Contributors can contact the developers through the
84 @q{lilypond-devel} mailing list.  The mailing list archive is
85 located at
86 @uref{http://lists.gnu.org/archive/html/lilypond-devel/}.  If you
87 have a question for the developers, search the archives first to
88 see if the issue has already been discussed.  Otherwise, send an
89 email to @email{lilypond-devel@@gnu.org}.  You can subscribe to
90 the developers' mailing list here:
91 @uref{http://lists.gnu.org/mailman/listinfo/lilypond-devel}.
92
93 @warning{Contributors on Windows or MacOS X wishing to compile
94 code or documentation are strongly advised to use our Debian
95 LilyPond Developer Remix, as discussed in @ref{Quick start}.}
96
97
98 @node Summary for experienced developers
99 @section Summary for experienced developers
100
101 If you are already familiar with typical open-source tools, here's
102 what you need to know:
103
104 @itemize
105 @item @strong{source repository}:
106 hosted by GNU savannah.
107
108 @example
109 @uref{http://git.savannah.gnu.org/gitweb/?p=lilypond.git}
110 @end example
111
112 @item @strong{issue tracker}:
113 currently hosted by Sourceforge.
114
115 @example
116 @uref{https://sourceforge.net/p/testlilyissues/issues/}
117 @end example
118
119 @item @strong{patch review}:
120 Reitveld -- the collaborative code review tool.
121
122 @example
123 @uref{https://codereview.appspot.com}
124 @end example
125
126 @item @strong{environment variables}:
127 many maintenance scripts, and many instructions in this guide rely on
128 predefined @ref{Environment variables}.
129
130 @item @strong{mailing lists}:
131 given on @rweb{Contact}.
132
133 @item @strong{Git branches}:
134
135 @itemize
136 @item @code{master}:
137 always base your work from this branch, but @strong{never push} directly
138 to it.  Patches are always pushed directly to the @code{staging} branch
139 instead.
140
141 @item @code{staging}:
142 always push to this branch after a successful patch review cycle (see
143 below).
144
145 @item @code{translation}:
146 Translators should base their work on this branch only and push any
147 translation patches directly to it as well.
148
149 @item @code{dev/foo}:
150 feel free to push any new branch name under @code{dev/}.
151
152 @end itemize
153
154 @item @strong{regression tests}:
155 also known as @qq{regtests}. A collection of more than a thousand
156 @code{.ly} files that are used to track LilyPond's engraving output
157 between released stable and unstable versions as well as checked for all
158 patches submitted for testing.
159
160 If a patch introduces any unintentional changes to any of the regtests
161 it is very likely it will be rejected (to be fixed) -- always make sure
162 that, if you expect any regression test changes, that they are explained
163 clearly as part of the patch description when submitting for testing.
164 For more information see @ref{Regression tests}.
165
166 @item @strong{reviews}:
167 after finishing work on a patch or branch:
168
169 @enumerate
170 @item
171 upload it with our custom @code{git-cl} @q{helper-script}; see
172 @ref{git-cl}.  In addition to uploading patches to the Google's Rietveld
173 code review tool the script will also update the issue tracker (or add a
174 new issue as appropriate) so that any reference to the patch is not
175 lost.  The current @qq{status} of any patch submitted is always managed
176 on the issue tracker; also see @ref{Issues}.
177
178 Once submitted the patch will be given a status of @code{Patch-new} and
179 will enter the @qq{Patch Countdown}.  More information on this can be
180 found in the section @ref{Uploading a patch for review}.
181
182 @item
183 Patches are generally tested within 24 hours of submission.  Once it has
184 passed the basic tests -- make, make doc and a make test-baseline/check
185 --, the tracker will be updated and the patch's status will change to
186 @code{Patch-review} for other developers to examine.
187
188 @item
189 Every third day, the @qq{Patch Meister} will examine the issue tracker
190 and the Rietveld code review tool for the submitted patch, looking for
191 any comments by other developers.  Depending on what has been posted,
192 the patch will be either; @qq{moved on} to the next patch status
193 (@code{Patch-countdown}); set back to @code{Patch-needs_work}; or if
194 more discussion is needed, left at @code{Patch-review}.  In all cases
195 the issue tracker (not the Rietveld code review tool) will be updated by
196 the Patch Meister accordingly.
197
198 @item
199 Once another three days have passed, any patch that has been given
200 @code{Patch-countdown} status will be changed to @code{Patch-push}, the
201 issue tracker is updated, and the developer can now push it directly to
202 the @code{staging} branch (or email the patch -- created with
203 @w{@code{git format-patch}} command -- to one of the other developers
204 who can push it for you).
205
206 @item
207 Automatic scripts run every few hours to merge the @code{staging} branch
208 with @code{master}.
209
210 @end enumerate
211
212 @advanced{This process does means that most patches will take about a
213 week before finally being merged into @code{master}.  With the limited
214 resources for reviewing patches available and a history of unintended
215 breakages in the @code{master} branch (from patches that have
216 not had time to be reviewed properly), this is the best compromise we
217 have found.}
218
219 @end itemize
220
221
222 @node Mentors
223 @section Mentors
224
225 We have a semi-formal system of mentorship, similar to the
226 medieval @qq{journeyman/master} training system.  New contributors
227 will have a dedicated mentor to help them @qq{learn the ropes}.
228
229 @warning{This is subject to the availability of mentors; certain
230 jobs have more potential mentors than others.}
231
232 @subheading Contributor responsibilities
233
234 @enumerate
235
236 @item
237 Ask your mentor which sections of the CG you should read.
238
239 @item
240 If you get stuck for longer than 10 minutes, ask your mentor.
241 They might not be able to help you with all problems, but we find
242 that new contributors often get stuck with something that could be
243 solved/explained with 2 or 3 sentences from a mentor.
244
245 @item
246 If you have been working on a task much longer than was originally
247 estimated, stop and ask your mentor.  There may have been a
248 miscommunication, or there may be some time-saving tips that could
249 vastly simply your task.
250
251 @item
252 Send patches to your mentor for initial comments.
253
254 @item
255 Inform your mentor if you're going to be away for a month, or if
256 you leave entirely.  Contributing to lilypond isn't for everybody;
257 just let your mentor know so that we can reassign that work to
258 somebody else.
259
260 @item
261 Inform your mentor if you're willing to do more work -- we always
262 have way more work than we have helpers available.  We try to
263 avoid overwhelming new contributors, so you'll be given less work
264 than we think you can handle.
265
266 @end enumerate
267
268
269 @subheading Mentor responsibilities
270
271 @enumerate
272
273 @item
274 Respond to questions from your contributor(s) promptly, even if
275 the response is just @qq{sorry, I don't know} or @qq{sorry, I'm
276 very busy for the next 3 days; I'll get back to you then}.  Make
277 sure they feel valued.
278
279 @item
280 Inform your contributor(s) about the expected turnaround for your
281 emails -- do you work on lilypond every day, or every weekend, or
282 what?  Also, if you'll be unavailable for longer than usual (say,
283 if you normally reply within 24 hours, but you'll be at a
284 conference for a week), let your contributors know.  Again, make
285 sure they feel valued, and that your silence (if they ask a
286 question during that period) isn't their fault.
287
288 @item
289 Inform your contributor(s) if they need to do anything unusual for
290 the builds, such as doing a @qq{make clean / doc-clean} or
291 switching git branches (not expected, but just in case...)
292
293 @item
294 You don't need to be able to completely approve patches.  Make
295 sure the patch meets whatever you know of the guidelines (for doc
296 style, code indentation, whatever), and then send it on to -devel
297 for more comments.  If you feel confident
298 about the patch, you can push it directly (this is mainly intended
299 for docs and translations; code patches should almost always go to
300 -devel before being pushed).
301
302 @item
303 Keep track of patches from your contributor.  Either upload them
304 to Rietveld yourself, or help+encourage them to upload the patches
305 themselves.  When a patch is on Rietveld, it's your responbility
306 to get comments for it, and to add a link to the patch to the
307 google tracker.  (tag it @qq{patch-new}, or @qq{patch-review} if
308 you feel very confident in it)
309
310 @item
311 Encourage your contributor to review patches, particularly your
312 own!  It doesn't matter if they're not familiar with C++ / scheme
313 / build system / doc stuff -- simply going through the process is
314 valuable.  Besides, anybody can find a typo!
315
316 @item
317 Contact your contributor at least once a week.  The goal is just
318 to get a conversation started -- there's nothing wrong with simply
319 copy&pasting this into an email:
320
321 @example
322 Hey there,
323
324 How are things going?  If you sent a patch and got a review, do
325 you know what you need to fix?  If you sent a patch but have no
326 reviews yet, do you know when you will get reviews?  If you are
327 working on a patch, what step(s) are you working on?
328 @end example
329
330
331 @end enumerate
332
333