Repository: kudu Updated Branches: refs/heads/master c8ca20fa7 -> 4a5f1392b
docs: clarify guidelines on boost usage Change-Id: I788ac1426a6a79192e1cdd88892cb2fa1a978b47 Reviewed-on: http://gerrit.cloudera.org:8080/5752 Reviewed-by: David Ribeiro Alves <[email protected]> Tested-by: Kudu Jenkins Reviewed-by: Dan Burkert <[email protected]> Reviewed-by: Mike Percy <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/36445904 Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/36445904 Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/36445904 Branch: refs/heads/master Commit: 36445904cb16b69a01b0ae7ddb55144197ad44a7 Parents: c8ca20f Author: Todd Lipcon <[email protected]> Authored: Fri Jan 20 11:54:15 2017 -0800 Committer: Todd Lipcon <[email protected]> Committed: Sun Jan 22 23:57:59 2017 +0000 ---------------------------------------------------------------------- docs/contributing.adoc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/36445904/docs/contributing.adoc ---------------------------------------------------------------------- diff --git a/docs/contributing.adoc b/docs/contributing.adoc index 56b9cb3..f666b2c 100644 --- a/docs/contributing.adoc +++ b/docs/contributing.adoc @@ -162,13 +162,20 @@ away from `foo.Pass()` in favor of `std::move(foo)`. `boost` classes from header-only libraries can be used in cases where a suitable replacement does not exist in the Kudu code base. However: -* Do not introduce dependencies on `boost` classes not already depended on. We - are actively trying to remove `boost` from the Kudu code base, and new - dependencies make that work more difficult. +* Do not introduce dependencies on `boost` classes where equivalent functionality + exists in the standard {cpp} library or in `src/kudu/gutil/`. For example, prefer + `strings::Split()` from `gutil` rather than `boost::split`. +* Prefer using functionality from `boost` rather than re-implementing the same + functionality, _unless_ using the `boost` functionality requires excessive use of + {cpp} features which are disallowed by our style guidelines. For example, + `boost::spirit` is heavily based on template metaprogramming and should not be used. * Do not use `boost` in any public headers for the Kudu {cpp} client, because `boost` commonly breaks backward compatibility, and passing data between two `boost` versions (one by the user, one by Kudu) causes serious issues. +When in doubt about introducing a new dependency on any `boost` functionality, +it is best to email `[email protected]` to start a discussion. + === Line length The Kudu team allows line lengths of 100 characters per line, rather than Google's standard of 80. Try to
