summaryrefslogtreecommitdiff
path: root/boost/tools/build/CONTRIBUTING.rst
blob: 77a071dfe6c39894f97cf77e05899cbdd4e490b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
:Copyright:
   Copyright 2003, 2006 Vladimir Prus
:License:
   Distributed under the Boost Software License, Version 1.0.
   (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)

Boost.Build contributor guidelines
==================================

Boost.Build is an open-source project. This means that we welcome and appreciate
all contributions --- be it ideas, bug reports, or patches. This document
contains guidelines which helps to assure that development goes on smoothly, and
changes are made quickly.

The guidelines are not mandatory, and you can decide for yourself which one to
follow. But note, that 10 mins that you spare writing a comment, for example,
might lead to significally longer delay for everyone.

Before contributing, make sure you are subscribed to our mailing list
at boost-build@lists.boost.org.

Additional resources include

- The issue tracker

  http://trac.lvk.cs.msu.su/boost.build/

- mailing list

  boost-build@lists.boost.org

  http://lists.boost.org/boost-build/

BUGS and PATCHES
----------------

Both bugs and patches can be send to our mailing list.

When reporting a bug, please try to provide the following information.

- What you did.

  - A minimal reproducible testcase is very much appreciated.

  - Shell script with some annotations is much better than verbose description
    of the problem.

  - A regression test is the best (see test/test_system.html).

- What you got.

- What you expected.

- What version of Boost.Build and Boost.Jam did you use. If possible,
  please try to test with the CVS HEAD state.

When submitting a patch, please:

- make a single patch for a single logical change
- follow the policies and coding conventions below,
- send patches in unified diff format, (using either "cvs diff -u" or "diff -u")
- provide a log message together with the patch
- put the patch and the log message as attachment to your email.

The purpose of log message serves to communicate what was changed, and *why*.
Without a good log message, you might spend a lot of time later, wondering where
a strange piece of code came from and why it was necessary.

The good log message mentions each changed file and each rule/method, saying
what happend to it, and why. Consider, the following log message

::

    Better direct request handling.

     * new/build-request.jam
       (directly-requested-properties-adjuster): Redo.

     * new/targets.jam
       (main-target.generate-really): Adjust properties here.

     * new/virtual-target.jam
       (register-actual-name): New rule.
       (virtual-target.actualize-no-scanner): Call the above, to detected bugs,
       where two virtual target correspond to one Jam target name.

The log messages for the last two files are good. They tell what was changed.
The change to the first file is clearly undercommented.

It's OK to use terse log messages for uninteresting changes, like ones induced
by interface changes elsewhere.

POLICIES.
---------

1. Testing.

   All serious changes must be tested. New rules must be tested by the module where
   they are declared. Test system (test/test_system.html) should be used to verify
   user-observable behaviour.

2. Documentation.

   It turns out that it's hard to have too much comments, but it's easy to have too
   little. Please prepend each rule with a comment saying what the rule does and
   what arguments mean. Stop for a minute and consider if the comment makes sense
   for anybody else, and completely describes what the rules does. Generic phrases
   like "adjusts properties" are really not enough.

When applicable, make changes to the user documentation as well.

CODING CONVENTIONS.
-------------------

1. All names of rules and variables are lowercase with "-" to separate
   words.

   ::

      rule call-me-ishmael ( ) ...

2. Names with dots in them are "intended globals". Ordinary globals use a
   dot prefix:

   ::

      .foobar
      $(.foobar)

3. Pseudofunctions or associations are <parameter>.<property>:

   ::

      $(argument).name = hello ;
      $($(argument).name)

4. Class attribute names are prefixed with "self.":

   ::

      self.x
      $(self.x)

5. Builtin rules are called via their ALL_UPPERCASE_NAMES:

   ::

      DEPENDS $(target) : $(sources) ;

6. Opening and closing braces go on separate lines:

   ::

      if $(a)
      {
          #
      }
      else
      {
          #
      }