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