David Chen | 8fe82a3 | 2016-08-24 10:55:41 +0000 | [diff] [blame] | 1 | --- |
| 2 | layout: documentation |
| 3 | title: Get Support |
| 4 | --- |
| 5 | |
| 6 | # Get Support |
| 7 | |
Steren Giannini | ab44492 | 2017-03-10 15:04:29 +0000 | [diff] [blame] | 8 | * Ask questions on [Stack Overflow](http://stackoverflow.com/questions/tagged/bazel) using the |
| 9 | `bazel` tag. |
| 10 | * Discuss on the [User mailing list](https://groups.google.com/forum/#!forum/bazel-discuss). |
| 11 | * Report bugs or feature requests in our [GitHub issue tracker](https://github.com/bazelbuild/bazel/issues). |
| 12 | * Find other Bazel contributors on [IRC](http://webchat.freenode.net) |
| 13 | (irc.freenode.net#bazel). |
David Chen | 8fe82a3 | 2016-08-24 10:55:41 +0000 | [diff] [blame] | 14 | |
| 15 | # Support Policy |
| 16 | |
| 17 | We generally avoid making backwards-incompatible changes. We have several years of experience with |
| 18 | supporting a huge code base that is concurrently worked on by thousands of engineers every day, |
| 19 | and have successfully made significant changes to the core as well as to the rules without missing |
| 20 | a beat. We run hundreds of thousands of tests at Google before every single release to ensure that |
| 21 | it stays that way. |
| 22 | |
| 23 | That said, we occasionally have to make incompatible changes in order to fix bugs, to make further |
| 24 | improvements to the system, such as improving performance or usability, or to lock down APIs that |
| 25 | are known to be brittle. |
| 26 | |
| 27 | This document gives an overview of features that are widely used and that we consider stable. By |
| 28 | stable, we mean that the changes we make will be backwards compatible, or that we will provide a |
| 29 | migration path. |
| 30 | |
| 31 | It also covers features that are unstable. Either they are not yet widely used, or we are already |
| 32 | planning to change them significantly, possibly in ways that are not backwards compatible. |
| 33 | |
| 34 | We cannot cover everything that might change, but you can reasonably expect that we provide |
| 35 | advance notice on the mailing list before a major change happens. We're also happy to provide more |
| 36 | details, just ask on [bazel-discuss](https://groups.google.com/forum/#!forum/bazel-discuss). |
| 37 | |
| 38 | All undocumented features (attributes, rules, "Make" variables, and flags) are subject to change |
| 39 | at any time without prior notice. Features that are documented but marked *experimental* are also |
| 40 | subject to change at any time without prior notice. |
| 41 | |
| 42 | Bazel's extension language Skylark (anything you write in a `.bzl` file) is still subject to change. |
| 43 | We are in the process of migrating Google to Skylark, and expect the language part to extend macros |
| 44 | to stabilize as part of that process. Adding rules with skylark is still somewhat experimental. |
| 45 | |
| 46 | Help keep us honest: report bugs and regressions in the |
| 47 | [GitHub bugtracker](https://github.com/bazelbuild/bazel/issues). We will make an effort to triage all |
| 48 | reported issues within 2 business days. |
| 49 | |
| 50 | ## Releases |
| 51 | |
| 52 | We regularly publish [binary releases of Bazel](https://github.com/bazelbuild/bazel/releases). To |
| 53 | that end, we announce release candidates on |
| 54 | [bazel-discuss](https://groups.google.com/forum/#!forum/bazel-discuss); these are binaries that have |
| 55 | passed all of our unit tests. Over the next few days, we regression test all applicable build |
| 56 | targets at Google. If you have a critical project using Bazel, we recommend that you establish an |
| 57 | automated testing process that tracks the current release candidate, and report any regressions. |
| 58 | |
| 59 | If no regressions are discovered, we officially release the candidate after a week. However, |
| 60 | regressions can delay the release of a release candidate. If regressions are found, we apply |
| 61 | corresponding cherry-picks to the release candidate to fix those regressions. If no further |
| 62 | regressions are found for two business days, but not before a week has elapsed since the first |
| 63 | release candidate, we release it. |
| 64 | |
| 65 | ### Release versioning |
| 66 | |
| 67 | Version 0.1 is our first release marking the start of our beta phase. Until version 1.0.0, we |
Damien Martin-Guillerez | 4885eef | 2016-10-28 12:02:50 +0000 | [diff] [blame] | 68 | increase the MINOR version every time we reach a [new milestone](http://bazel.build/roadmap.html). |
David Chen | 8fe82a3 | 2016-08-24 10:55:41 +0000 | [diff] [blame] | 69 | |
| 70 | Version 1.0.0 marks the end of our beta phase; afterwards, we will label each release with a |
| 71 | version number of the form MAJOR.MINOR.PATCH according to the |
| 72 | [semantic version 2.0.0 document](http://semver.org). |
| 73 | |
| 74 | ## Current Status |
| 75 | |
| 76 | ### Built-In Rules and the Internal API For Rules ### |
| 77 | We are planning a number of changes to the APIs between the core of Bazel and the built-in rules, |
| 78 | in order to make it easier for us to develop openly. This has the added benefit of also making it |
| 79 | easier for users to maintain their own rules (if written in Java instead of Skylark), if they don't |
| 80 | want to or cannot check this code into our repository. However, it also means our internal API is |
| 81 | not stable yet. In the long term, we want to move to Skylark wholesale, so we encourage contributors |
| 82 | to use Skylark instead of Java when writing new rules. Rewriting all of our built-in rules is going |
| 83 | to be a lengthy process however. |
| 84 | |
| 85 | 1. We will fix the friction points that we know about, as well as those that we discover every time |
| 86 | we make changes that span both the internal and external depots. |
| 87 | 2. We will drive a number of pending API cleanups to completion, as well as run anticipated cleanups |
| 88 | to the APIs, such as disallowing access to the file system from rule implementations (because |
| 89 | it's not hermetic). |
| 90 | 3. We will enumerate the internal rule APIs, and make sure that they are appropriately marked (for |
| 91 | example with annotations) and documented. Just collecting a list will likely give us good |
| 92 | suggestions for further improvements, as well as opportunities for a more principled API review |
| 93 | process. |
| 94 | 4. We will automatically check rule implementations against an API whitelist, with the intention |
| 95 | that API changes are implicitly flagged during code review. |
| 96 | 5. We will work on removing (legacy) Google-internal features to reduce the amount of differences |
| 97 | between the internal and external rule sets. |
| 98 | 6. We will encourage our engineers to make changes in the external depot first, and migrate them to |
| 99 | to the internal one afterwards. |
| 100 | 7. We will move more of our rule implementations into the open source repository (Android, Go, |
| 101 | Python, the remaining C++ rules), even if we don't consider the code to be *ready* or if they are |
| 102 | still missing tools to work properly. |
| 103 | 8. In order to be able to accept external contributions, our highest priority item for Skylark is a |
| 104 | testing framework. We encourage to write new rules in Skylark rather than in Java. |
| 105 | |
| 106 | |
| 107 | ### Stable |
| 108 | We expect the following rules and features to be stable. They are widely used within Google, so |
| 109 | our internal testing should ensure that there are no major breakages. |
| 110 | |
| 111 | <table class="table table-condensed table-striped table-bordered"> |
| 112 | <colgroup> |
| 113 | <col class="support-col-rules" /> |
| 114 | <col class="support-col-notes" /> |
| 115 | </colgroup> |
| 116 | <thead> |
| 117 | <tr> |
| 118 | <th>Rules</th> |
| 119 | <th>Notes</th> |
| 120 | </tr> |
| 121 | </thead> |
| 122 | <tbody> |
| 123 | <tr> |
| 124 | <td>C/C++ rules except <code>cc_toolchain</code> and <code>cc_toolchain_suite</code></td> |
| 125 | <td></td> |
| 126 | </tr> |
| 127 | <tr> |
| 128 | <td>Java rules except <code>java_toolchain</code></td> |
| 129 | <td></td> |
| 130 | </tr> |
| 131 | <tr> |
| 132 | <td>Android rules except <code>android_ndk_repository</code> and |
| 133 | <code>android_sdk_repository</code></td> |
| 134 | <td></td> |
| 135 | </tr> |
| 136 | <tr> |
| 137 | <td><code>genrule</code></td> |
| 138 | <td></td> |
| 139 | </tr> |
| 140 | <tr> |
| 141 | <td><code>genquery</code></td> |
| 142 | <td></td> |
| 143 | </tr> |
| 144 | <tr> |
| 145 | <td><code>test_suite</code></td> |
| 146 | <td></td> |
| 147 | </tr> |
| 148 | <tr> |
| 149 | <td><code>filegroup</code></td> |
| 150 | <td></td> |
| 151 | </tr> |
| 152 | <tr> |
| 153 | <td><code>config_setting</code></td> |
| 154 | <td> |
| 155 | <ul> |
| 156 | <li>This rule is used in <code>select()</code> expressions. We have hundreds of uses, so |
| 157 | we expect the basic functionality to be stable. That said, there are some common use |
| 158 | cases that are not covered yet, or that require workarounds. For example, it's not |
| 159 | easily possible to select on information specified in a CROSSTOOL file, such as the |
| 160 | target abi. Another example is that it's not possible to OR multiple conditions, |
| 161 | leading to duplicated entries in the select. |
| 162 | </li> |
| 163 | </ul> |
| 164 | </td> |
| 165 | </tr> |
| 166 | </tbody> |
| 167 | </table> |
| 168 | |
| 169 | |
| 170 | ### Unstable |
| 171 | These rules and features have known limitations that we will likely address in future releases. |
| 172 | |
| 173 | <table class="table table-condensed table-striped table-bordered"> |
| 174 | <colgroup> |
| 175 | <col class="support-col-rules" /> |
| 176 | <col class="support-col-notes" /> |
| 177 | </colgroup> |
| 178 | <thead> |
| 179 | <tr> |
| 180 | <th>Feature</th> |
| 181 | <th>Notes</th> |
| 182 | </tr> |
| 183 | </thead> |
| 184 | <tbody> |
| 185 | <tr> |
| 186 | <td><code>cc_toolchain</code> and <code>cc_toolchain_suite</code></td> |
| 187 | <td> |
| 188 | <ul> |
| 189 | <li>We intend to make significant changes to the way C/C++ toolchains are defined; we will |
| 190 | keep our published C/C++ toolchain definition(s) up to date, but we make no guarantees for |
| 191 | custom ones.</li> |
| 192 | </ul> |
| 193 | </td> |
| 194 | </tr> |
| 195 | <tr> |
| 196 | <td>iOS/Objective C rules</td> |
| 197 | <td> |
| 198 | <ul> |
| 199 | <li>We cannot vouch for changes made by Apple ® to the underlying tools and |
| 200 | infrastructure.</li> |
| 201 | <li>The rules are fairly new and still subject to change; we try to avoid breaking changes, |
| 202 | but this may not always be possible.</li> |
| 203 | <li>No testing support yet.</li> |
| 204 | </ul> |
| 205 | </td> |
| 206 | </tr> |
| 207 | <tr> |
| 208 | <td>Python rules</td> |
| 209 | <td> |
| 210 | <ul> |
| 211 | <li>The rules support neither Python 3, C/C++ extensions, nor packaging. |
| 212 | </li> |
| 213 | </ul> |
| 214 | </td> |
| 215 | </tr> |
| 216 | <tr> |
| 217 | <td>Extra actions (<code>extra_action</code>, <code>action_listener</code>)</td> |
| 218 | <td> |
| 219 | <ul> |
| 220 | <li>Extra actions expose information about Bazel that we consider to be implementation |
| 221 | details, such as the exact interface between Bazel and the tools we provide; as such, |
| 222 | users will need to keep up with changes to tools to avoid breakage.</li> |
| 223 | </ul> |
| 224 | </td> |
| 225 | </tr> |
| 226 | <tr> |
| 227 | <td><code>environment_group</code></td> |
| 228 | <td> |
| 229 | <ul> |
| 230 | <li>We're planning to use it more extensively, replacing several machine-enforceable |
| 231 | constraint mechanism, but there's only a handful of uses so far. We fully expect it to |
| 232 | work, but there's a small chance that we have to go back to the drawing board.</li> |
| 233 | </ul> |
| 234 | </td> |
| 235 | </tr> |
| 236 | <tr> |
| 237 | <td><code>android_ndk_repository</code> and <code>android_sdk_repository</code></td> |
| 238 | <td> |
| 239 | <ul> |
| 240 | <li>We don't support pre-release NDKs or SDKs at this time. Furthermore, we may still |
| 241 | make backwards-incompatible changes to the attributes or the semantics.</li> |
| 242 | </ul> |
| 243 | </td> |
| 244 | </tr> |
| 245 | <tr> |
| 246 | <td><code>Fileset</code></td> |
| 247 | <td> |
| 248 | <ul> |
| 249 | <li>There are vestiges of Fileset / FilesetEntry in the source code, but we do not intend to |
| 250 | support them in Bazel, ever.</li> |
| 251 | <li>They're still widely used internally, and are therefore unlikely to go away in the near |
| 252 | future.</li> |
| 253 | </ul> |
| 254 | </td> |
| 255 | </tbody> |
| 256 | </table> |
| 257 | |