aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-07-10 11:09:25 -0400
committerNick Mathewson <nickm@torproject.org>2018-07-10 11:09:25 -0400
commit4793d913503f9349ca4b57d77a47bd1bbceecfe5 (patch)
tree03c17e4083ede16f3da810904b7bc1a14bdc9433 /doc
parentfa2d53aa6a5c33ea1ede4b3346d5abcc621e619f (diff)
downloadtor-4793d913503f9349ca4b57d77a47bd1bbceecfe5.tar.gz
tor-4793d913503f9349ca4b57d77a47bd1bbceecfe5.zip
Describe "check-includes" in the CodingStandards.md file
Diffstat (limited to 'doc')
-rw-r--r--doc/HACKING/CodingStandards.md18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/HACKING/CodingStandards.md b/doc/HACKING/CodingStandards.md
index 6e6ef044d3..4f229348e4 100644
--- a/doc/HACKING/CodingStandards.md
+++ b/doc/HACKING/CodingStandards.md
@@ -214,6 +214,24 @@ We don't call `memcmp()` directly. Use `fast_memeq()`, `fast_memneq()`,
Also see a longer list of functions to avoid in:
https://people.torproject.org/~nickm/tor-auto/internal/this-not-that.html
+What code can use what other code?
+----------------------------------
+
+We're trying to simplify Tor's structure over time. In the long run, we want
+Tor to be structured as a set of modules with *no circular dependencies*.
+
+This property is currently provided by the modules in src/lib, but not
+throughout the rest of Tor. In general, higher-level libraries may use
+lower-level libraries, but never the reverse.
+
+To prevent new circular dependencies from landing, we have a tool that
+you can invoke with `make check-includes`, and which is run
+automatically as part of `make check`. This tool will verify that, for
+every source directory with a `.may_include` file, no local headers are
+included except those specifically permitted by the `.may_include` file.
+When editing one of these files, please make sure that you are not
+introducing any cycles into Tor's dependency graph.
+
Floating point math is hard
---------------------------