Clarify in the docs what belongs in portability/
authorChristopher Dykes <cdykes@fb.com>
Sun, 28 May 2017 01:00:35 +0000 (18:00 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sun, 28 May 2017 01:04:56 +0000 (18:04 -0700)
Summary: This has always been the design rule for what belongs in `folly/portability/`, but was never written down anywhere except in my head, so put it somewhere people can actually find it so I can free that space in my head for other things.

Reviewed By: yfeldblum

Differential Revision: D5140587

fbshipit-source-id: 1f09c17b7ccfff780e1825670a7ffaa75cd1b1d5

folly/portability/README.md

index 01e97e7aa217c1ce2616e3c2f02b7258607b91b1..d84833f5691d710cea7eb3f7cacfe1c60639851e 100644 (file)
@@ -10,3 +10,12 @@ They are not intended to help you build your programs on these platforms.
 They are, and will remain, undocumented. They are, and will remain, subject to
 rapid, immediate, and drastic changes - including full rewrites and merciless
 deletions - without notice.
+
+Note that before adding a new file to this directory you should determine
+whether the API you are adding is a portability header or just a platform
+dependent implementation detail. Only portability headers belong in this
+directory. A portability header is defined as a header that provides the exact
+API of some platform or configuration that is not available on all platforms.
+If the API being added does not already exist on at least one of the platforms
+Folly supports, then it is an implementation detail, and does not belong in
+this directory.