1 | |
---|
2 | ---------------------------------- |
---|
3 | Boost.Build contributor guidelines |
---|
4 | ---------------------------------- |
---|
5 | |
---|
6 | Boost.Build is an open-source project. This means that we welcome and |
---|
7 | appreciate all contributions --- be it ideas, bug reports, or patches. |
---|
8 | This document contains guidelines which helps to assure that development |
---|
9 | goes on smoothly, and changes are made quickly. |
---|
10 | |
---|
11 | The guidelines are not mandatory, and you can decide for yourself which one |
---|
12 | to follow. But note, that 10 mins that you spare writing a comment, for |
---|
13 | example, might lead to significally longer delay for everyone. |
---|
14 | |
---|
15 | Before contributing, make sure you are subscribed to our mailing list |
---|
16 | |
---|
17 | jamboost@yahoogroups.com |
---|
18 | |
---|
19 | Additional resources include |
---|
20 | |
---|
21 | - brief issues list |
---|
22 | http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Boost.Build/Issues |
---|
23 | |
---|
24 | - the issue tracker |
---|
25 | http://zigzag.cs.msu.su:7814 |
---|
26 | |
---|
27 | - commits mailing list: |
---|
28 | boost-build@lists.sourceforge.net |
---|
29 | http://sourceforge.net/mailarchive/forum.php?forum_id=9097 |
---|
30 | |
---|
31 | |
---|
32 | BUGS and PATCHES |
---|
33 | |
---|
34 | When reporting a bug, please try to provide the following information. |
---|
35 | |
---|
36 | - What you did. A minimal reproducible testcase is very much appreciated. |
---|
37 | Shell script with some annotations is much better than verbose description of |
---|
38 | the problem. A regression test is the best (see test/test_system.html). |
---|
39 | - What you got. |
---|
40 | - What you expected. |
---|
41 | - What version of Boost.Build and Boost.Jam did you use. If possible, |
---|
42 | please try to test with the CVS HEAD state. |
---|
43 | |
---|
44 | When submitting a patch, please: |
---|
45 | |
---|
46 | - make a single patch for a single logical change |
---|
47 | - follow the policies and coding conventions below, |
---|
48 | - set patches in unified diff format, |
---|
49 | - provide a log message together with the patch |
---|
50 | |
---|
51 | The purpose of log message serves to communicate what was changed, and |
---|
52 | *why*. Without a good log message, you might spend a lot of time later, |
---|
53 | wondering where a strange piece of code came from and why it was necessary. |
---|
54 | |
---|
55 | The good log message mentions each changed file and each rule/method, saying |
---|
56 | what happend to it, and why. Consider, the following log message |
---|
57 | |
---|
58 | Better direct request handling. |
---|
59 | |
---|
60 | * new/build-request.jam |
---|
61 | (directly-requested-properties-adjuster): Redo. |
---|
62 | |
---|
63 | * new/targets.jam |
---|
64 | (main-target.generate-really): Adjust properties here. |
---|
65 | |
---|
66 | * new/virtual-target.jam |
---|
67 | (register-actual-name): New rule. |
---|
68 | (virtual-target.actualize-no-scanner): Call the above, to detected bugs, |
---|
69 | where two virtual target correspond to one Jam target name. |
---|
70 | |
---|
71 | The log messages for the last two files are good. They tell what was |
---|
72 | changed. The change to the first file is clearly undercommented. |
---|
73 | |
---|
74 | It's OK to use terse log messages for uninteresting changes, like |
---|
75 | ones induces by interface changes elsewhere. |
---|
76 | |
---|
77 | |
---|
78 | POLICIES. |
---|
79 | |
---|
80 | 1. Testing. |
---|
81 | |
---|
82 | All serious changes must be tested. New rules must be tested by the module |
---|
83 | where they are declared. Test system (test/test_system.html) should be used |
---|
84 | to verify user-observable behaviour. |
---|
85 | |
---|
86 | 2. Documentation. |
---|
87 | |
---|
88 | It turns out that it's hard to have too much comments, but it's easy to have |
---|
89 | too little. Please predend each rule with a comment saying what the rule does |
---|
90 | and what arguments means. Stop for a minute and consider if the comment makes |
---|
91 | sense for anybody else, and completely describes what the rules does. Generic |
---|
92 | phrases like "adjusts properties" are really not enough. |
---|
93 | |
---|
94 | When applicable, make changes to the user documentation as well. |
---|
95 | |
---|
96 | |
---|
97 | CODING CONVENTIONS. |
---|
98 | |
---|
99 | 1. All names of rules and variables are lowercase with "-" to separate |
---|
100 | words. |
---|
101 | |
---|
102 | rule call-me-ishmael ( ) ... |
---|
103 | |
---|
104 | 2. Names with dots in them are "intended globals". Ordinary globals use |
---|
105 | a dot prefix: |
---|
106 | |
---|
107 | .foobar |
---|
108 | $(.foobar) |
---|
109 | |
---|
110 | 3. Pseudofunctions or associations are <parameter>.<property>: |
---|
111 | |
---|
112 | $(argument).name = hello ; |
---|
113 | $($(argument).name) |
---|
114 | |
---|
115 | 4. Class attribute names are prefixed with "self.": |
---|
116 | |
---|
117 | self.x |
---|
118 | $(self.x) |
---|
119 | |
---|
120 | 5. Builtin rules are called via their ALL_UPPERCASE_NAMES: |
---|
121 | |
---|
122 | DEPENDS $(target) : $(sources) ; |
---|
123 | |
---|
124 | 6. Opening and closing braces go on separate lines: |
---|
125 | |
---|
126 | if $(a) |
---|
127 | { |
---|
128 | # |
---|
129 | } |
---|
130 | else |
---|
131 | { |
---|
132 | # |
---|
133 | } |
---|
134 | |
---|
135 | HTML DOCUMENTATION. |
---|
136 | |
---|
137 | Please pass HTML files though HTML Tidy (http://tidy.sf.net) before |
---|
138 | comitting. This has to important purposes: |
---|
139 | - detecting bad HTML |
---|
140 | - converting files to uniform indentation style, which inverses effect |
---|
141 | of different editors and makes differences between revisions much |
---|
142 | smaller and easy for review. |
---|
143 | |
---|
144 | Alas, the way Tidy indents HTML differs between version. Please use |
---|
145 | the version awailable at |
---|
146 | |
---|
147 | http://tidy.sourceforge.net/src/old/tidy_src_020411.tgz |
---|
148 | |
---|
149 | and "-i -wrap 78" command line parameters. |
---|