@@ -134,7 +134,7 @@ int main(int argc, char* argv[]) {
134134* This project works with or without exceptions enabled
135135* This project cuts [monthly releases](https://github.com/googleapis/google-cloud-cpp/releases) with detailed release notes
136136
137- ### API Breaking Changes
137+ ## Public API and API Breaking Changes
138138
139139In general, we avoid making backwards incompatible changes to our C++ APIs (see
140140below for the definition of "API"). Sometimes such changes yield benefits to
@@ -159,33 +159,141 @@ We request that our customers adhere to the following guidelines to avoid
159159accidentally depending on parts of the library we do not consider to be part of
160160the public API and therefore may change (including removal) without notice:
161161
162+ Previous versions of the library will remain available on the [GitHub Releases
163+ page](https://github.com/googleapis/google-cloud-cpp/releases). In many cases,
164+ you will be able to use an older version even if a newer version has changes
165+ that you are unable (or do not have time) to adopt.
166+
167+ Note that this document has no bearing on the Google Cloud Platform deprecation
168+ policy described at https://cloud.google.com/terms.
169+
170+ ### C++ Symbols and Files
171+
162172* You should only include headers matching the `google/cloud/${library}/*.h`,
163173 `google/cloud/${library}/mock/*.h` or `google/cloud/*.h` patterns.
164174* You should **NOT** directly include headers in any subdirectories, such as
165175 `google/cloud/${library}/internal`.
166176* The files *included from* our public headers are **not part of our public
167177 API**. Depending on indirect includes may break your build in the future, as
168- we may change a header "foo.h" to stop including "bar.h" if "foo.h" no longer
169- needs the symbols in "bar.h". To avoid having your code broken, you should
170- directly include the public headers that define all the symbols you use (this
171- is sometimes known as
178+ we may change a header ` "foo.h"` to stop including ` "bar.h"` if ` "foo.h"` no
179+ longer needs the symbols in ` "bar.h"` . To avoid having your code broken, you
180+ should directly include the public headers that define all the symbols you
181+ use (this is sometimes known as
172182 [include-what-you-use](https://include-what-you-use.org/)).
173183* Any file or symbol that lives within a directory or namespace containing
174- " internal", " impl", " test", " detail", " benchmark", " sample" , or " example" , is
184+ ` internal`, ` impl`, ` test`, ` detail`, ` benchmark`, ` sample` , or ` example` , is
175185 explicitly **not part of our public API**.
176- * Any file or symbol with " Impl" or " impl" in its name is **not part of our
186+ * Any file or symbol with ` Impl` or ` impl` in its name is **not part of our
177187 public API**.
188+ * Any symbol with `experimental` in its name is not part of the public API.
189+
190+ ## Beyond the C++ API
178191
179- Previous versions of the library will remain available on the [GitHub Releases
180- page](https://github.com/googleapis/google-cloud-cpp/releases).
192+ Applications developers interact with a C++ library through more than just
193+ the C++ symbols and headers. They also need to reference the name of the
194+ library in their build scripts. Depending of the build system they use
195+ this may be a CMake target, a Bazel rule, a pkg-config module, or just the
196+ name of some object in the file system.
181197
182- Note that this document has no bearing on the Google Cloud Platform deprecation
183- policy described at https://cloud.google.com/terms.
198+ As with the C++ API, we try to avoid breaking changes to these interface
199+ points. Sometimes such changes yield benefits to our customers, in the form of
200+ easier-to-understand what names go with with services, or more consistency
201+ across services. When these benefits warrant it, we will announce these changes
202+ prominently in our `CHANGELOG.md` file and in the affected release's notes.
203+ Nevertheless, though we take commercially reasonable efforts to prevent this,
204+ it is possible that backwards incompatible changes go undetected and,
205+ therefore, undocumented. We apologize if this is the case and welcome feedback
206+ or bug reports to rectify the problem.
207+
208+ ### Experimental Libraries
209+
210+ From time to time we add libraries to `google-cloud-cpp` to validate new
211+ designs, expose experimental (or otherwise not generally available) GCP
212+ features, or simply because a library is not yet complete. Such libraries
213+ will have `experimental` in their CMake target and Bazel rule names. The
214+ README file for these libraries will also document that they are experimental.
215+ Such libraries are subject to change, including removal, without notice.
216+ This includes, but it is not limited to, all their symbols, pre-processor
217+ macros, files, targets, rules, and installed artifacts.
218+
219+ ### Bazel rules
220+
221+ Only the rules exported at the top-level directory are intended for customer
222+ use, e.g.,`//:spanner`. Experimental rules have `experimental` in their name,
223+ e.g. `//:experimental-firestore`. As previously stated, experimental rules are
224+ subject to change or removal without notice.
225+
226+ Previously some of the rules in subdirectories
227+ (e.g. `//google/cloud/bigtable:bigtable_client`) had public visibility. These
228+ rules are deprecated as of 2021-02-15, and will be become inaccessible
229+ (or removed) on or shortly after **2022-02-15**.
230+
231+ ### CMake targets and packages
232+
233+ Only CMake packages starting with the `google_cloud_cpp_` prefix are intended
234+ for customer use. Only targets starting with `google-cloud-cpp::`, are intended
235+ for customer use. Experimental targets have `experimental` in their name (e.g.
236+ `google-cloud-cpp::experimental-iam`). As previously stated, experimental
237+ targets are subject to change or removal without notice.
238+
239+ In previous versions we released packages with other prefixes (or without
240+ specific prefixes), these are deprecated as of 2021-02-15, and will be retired
241+ on or shortly after **2022-02-15**. Same applies to any targets exported with
242+ other prefixes (or without an specific prefix).
243+
244+ ### pkg-config modules
245+
246+ Only modules starting with `google_cloud_cpp_` are intended for customer use.
247+
248+ In previous versions we released modules with other prefixes (or without
249+ specific prefixes), these are deprecated as of 2021-02-15, and will be retired
250+ on or shortly after **2022-02-15**.
251+
252+ ### Unsupported use cases
253+
254+ We try to provide stable names for the previously described mechanisms:
255+
256+ * Bazel rules,
257+ * CMake targets loaded via `find_package()`,
258+ * pkg-config modules
259+
260+ It is certainly possible to use the library using other approaches. While
261+ these may work, we may accidentally break these from time to time. Examples of
262+ such, and the recommended alternatives, include:
263+
264+ * CMake's `FetchContent` and/or git submodules: in these approaches the
265+ `google-cloud-cpp` library becomes a sub-directory of a larger CMake build
266+ We do not test `google-cloud-cpp` in these configurations, and we find them
267+ brittle as **all** CMake targets become visible to the larger project.
268+ This is both prone to conflicts, and makes it impossible to enforce that
269+ some targets are only for testing or are implementation details.
270+ Applications may want to consider source package managers, such as
271+ `vcpkg`, or CMake super builds via `ExternalProject_Add()` as alternatives.
272+
273+ * Using library names directly: applications should not use the
274+ library names, e.g., by using `-lgoogle_cloud_cpp_bigtable`
275+ in build scripts. We may need to split or merge libraries over time,
276+ making such names unstable. Applications should use CMake targets,
277+ e.g., `google-cloud-cpp::bigtable`, or pkg-config modules, e.g.,
278+ `$(pkg-config google_cloud_cpp_bigtable --libs)` instead.
279+
280+ ### Documentation and Comments
281+
282+ The documentation (and its links) is intended for human consumption and not
283+ third party websites, or automation (such as scripts scrapping the contents).
284+ The contents and links of our documentation may change without notice.
285+
286+ ### Other Interface Points
287+
288+ We think this covers all interface points, if we missed something please
289+ file a [GitHub issue][github-issue].
184290
185291## Contact us
186292
187293If you have questions or comments, or want to file bugs or request feature,
188- please do so using GitHub's normal Issues mechanism: [Contact Us](https://github.com/googleapis/google-cloud-cpp/issues/new/choose)
294+ please do so using GitHub's normal Issues mechanism: [Contact Us][github-issue]
295+
296+ [github-issue]: https://github.com/googleapis/google-cloud-cpp/issues/new/choose
189297
190298## Contributing changes
191299
0 commit comments