You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
revert the commits and verify that the continuous builds triggered by that merge
199
199
pass.</p>
200
200
201
-
<p>In the case of failures in a <codeclass="language-plaintext highlighter-rouge">dev</code> directory, the build cop should disable the
202
-
failing test instead of reverting the entire commit. To disable the test in
203
-
certain configurations, add <codeclass="language-plaintext highlighter-rouge">opt_out_conditions = []</code> to its BUILD rule. If it
204
-
fails in the default configuration or in too many configurations to list one by
205
-
one, use <codeclass="language-plaintext highlighter-rouge">tags = ["manual"]</code> to universally disable the test.</p>
201
+
<p>In the case of failures in an <codeclass="language-plaintext highlighter-rouge">experimental</code> or <codeclass="language-plaintext highlighter-rouge">dev</code> directory, the build
202
+
cop should disable the failing test instead of reverting the entire commit. To
203
+
disable the test in certain configurations, add <codeclass="language-plaintext highlighter-rouge">opt_out_conditions = []</code> to
204
+
its BUILD rule. If it fails in the default configuration or in too many
205
+
configurations to list one by one, use <codeclass="language-plaintext highlighter-rouge">tags = ["manual"]</code> to universally
206
+
disable the test. If the failure is during build instead of test, disable
207
+
part(s) of the build until everything is working again. If possible, ping the
208
+
code’s author / maintainer in your pull request that disables it.</p>
206
209
207
210
<p>In the case of intermittent failures of unclear origin or which cannot
208
211
reasonably be prevented (for example, network failures of remotely hosted
<p>To promote rapid development of research ideas, experimental code may be placed
166
-
in a subdirectory named <codeclass="language-plaintext highlighter-rouge">dev</code>. We do not enforce code standards nor test
167
-
coverage within <codeclass="language-plaintext highlighter-rouge">dev</code> directories. For pull requests that affect only
168
-
<codeclass="language-plaintext highlighter-rouge">dev</code> directories, one feature review is sufficient; platform review is not
169
-
required. If build or test targets in <codeclass="language-plaintext highlighter-rouge">dev</code> directories break, the response
170
-
from the on-call build cop will be to disable the offending targets.</p>
171
-
172
-
<p>The <codeclass="language-plaintext highlighter-rouge">BUILD.bazel</code> file for <codeclass="language-plaintext highlighter-rouge">dev</code> directories must live within the directory
173
-
itself, not a parent directory. (For example, <codeclass="language-plaintext highlighter-rouge">foo/BUILD.bazel</code> must <strong>not</strong>
174
-
say <codeclass="language-plaintext highlighter-rouge">srcs = ["dev/bar.cc"],</code>; instead, <codeclass="language-plaintext highlighter-rouge">foo/dev/BUILD.bazel</code> must exist and
175
-
must say <codeclass="language-plaintext highlighter-rouge">srcs = ["bar.cc"],</code>.) This ensures that all <codeclass="language-plaintext highlighter-rouge">dev</code> code has a
176
-
package name (<codeclass="language-plaintext highlighter-rouge">//foo/dev</code>) that clearly denotes it as such.</p>
167
+
in a subdirectory named <codeclass="language-plaintext highlighter-rouge">experimental</code> or <codeclass="language-plaintext highlighter-rouge">dev</code>. We do not enforce code
168
+
standards nor test coverage within those directories. For pull requests that
169
+
affect only <codeclass="language-plaintext highlighter-rouge">experimental</code> or <codeclass="language-plaintext highlighter-rouge">dev</code> directories, one feature review is
170
+
sufficient; platform review is not required.</p>
171
+
172
+
<p>If build or test targets in <codeclass="language-plaintext highlighter-rouge">experimental</code> or <codeclass="language-plaintext highlighter-rouge">dev</code> directories break, the
173
+
response from the on-call build cop will be to disable the offending target(s),
174
+
up to and including removing them from the build (and install) entirely. See
175
+
<ahref="/buildcop.html">Build Cop</a> for details.</p>
176
+
177
+
<p>The <codeclass="language-plaintext highlighter-rouge">BUILD.bazel</code> file for <codeclass="language-plaintext highlighter-rouge">experimental</code> and <codeclass="language-plaintext highlighter-rouge">dev</code> directories must live
178
+
within the directory itself, not a parent directory. (For example,
179
+
<codeclass="language-plaintext highlighter-rouge">foo/BUILD.bazel</code> must <strong>not</strong> say <codeclass="language-plaintext highlighter-rouge">srcs = ["experimental/bar.cc"],</code>;
180
+
instead, <codeclass="language-plaintext highlighter-rouge">foo/experimental/BUILD.bazel</code> must exist and must say
181
+
<codeclass="language-plaintext highlighter-rouge">srcs = ["bar.cc"],</code>.) This ensures that all <codeclass="language-plaintext highlighter-rouge">experimental</code> code has a
182
+
package name (<codeclass="language-plaintext highlighter-rouge">//foo/experimental</code>) that clearly denotes it as such.</p>
183
+
184
+
<p>Code in <codeclass="language-plaintext highlighter-rouge">experimental</code> or <codeclass="language-plaintext highlighter-rouge">dev</code> may only be depended-on by other code in
185
+
such directories. Stable code (outside of <codeclass="language-plaintext highlighter-rouge">experimental</code> and <codeclass="language-plaintext highlighter-rouge">dev</code>) must not
186
+
<codeclass="language-plaintext highlighter-rouge">#include</code> nor <codeclass="language-plaintext highlighter-rouge">import</code> code from <codeclass="language-plaintext highlighter-rouge">experimental</code> or <codeclass="language-plaintext highlighter-rouge">dev</code>.</p>
187
+
188
+
<p>The distinction between <codeclass="language-plaintext highlighter-rouge">experimental</code> and <codeclass="language-plaintext highlighter-rouge">dev</code> is that code in
189
+
<codeclass="language-plaintext highlighter-rouge">experimental</code> is installed by CMake, packaged as part of our nightly and
190
+
stable release binaries, and has API documentation on our website, but code in
191
+
<codeclass="language-plaintext highlighter-rouge">dev</code> is neither installed, packaged, nor website-documented. (A corollary is
192
+
that code in <codeclass="language-plaintext highlighter-rouge">dev</code> cannot have Python bindings. If you need bindings, place
193
+
your code in <codeclass="language-plaintext highlighter-rouge">experimental</code>, not <codeclass="language-plaintext highlighter-rouge">dev</code>.)</p>
194
+
195
+
<p>Code in <codeclass="language-plaintext highlighter-rouge">experimental</code> must have <codeclass="language-plaintext highlighter-rouge">experimental</code> as part of its C++ namespace
196
+
and Python module name. It also must not be part of <codeclass="language-plaintext highlighter-rouge">import pydrake.all</code>.</p>
<p>We would like to avoid circular dependencies in the source code tree. For
200
+
<p>We would like to avoid circular dependencies in the source code tree. For
181
201
example, some code in <codeclass="language-plaintext highlighter-rouge">drake/systems</code> depends on code in <codeclass="language-plaintext highlighter-rouge">drake/solvers</code>, so
182
202
code in <codeclass="language-plaintext highlighter-rouge">drake/solvers</code> should <em>not</em> depend on <codeclass="language-plaintext highlighter-rouge">drake/systems</code>.</p>
183
203
184
204
<p>The <codeclass="language-plaintext highlighter-rouge">drake/examples</code> directories are logically after all of the core libraries
185
-
in <codeclass="language-plaintext highlighter-rouge">drake</code>. <codeclass="language-plaintext highlighter-rouge">test</code> directories located throughout the code are logically
205
+
in <codeclass="language-plaintext highlighter-rouge">drake</code>. <codeclass="language-plaintext highlighter-rouge">test</code> directories located throughout the code are logically
186
206
last in the dependency tree – they are allowed to depend on any of the other
187
-
directories. For example, <codeclass="language-plaintext highlighter-rouge">test</code> code <strong>is</strong> allowed to use models/code from
207
+
directories. For example, <codeclass="language-plaintext highlighter-rouge">test</code> code <strong>is</strong> allowed to use models/code from
188
208
the <codeclass="language-plaintext highlighter-rouge">examples</code> directories to test core functionality, as long as that
189
209
dependency is explicitly declared in the build system rules for that test.</p>
0 commit comments