aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Subprojects.md
diff options
context:
space:
mode:
authorAleksey Filippov <alekseyf@google.com>2018-03-01 00:43:50 +0000
committerJussi Pakkanen <jpakkane@gmail.com>2018-03-01 21:52:08 +0200
commit5f0aeafa387894b0893877a92db5122b86c2244d (patch)
tree1141b9f2df14304b1191c08f64890cc5104cff52 /docs/markdown/Subprojects.md
parent15537f5e8ee0e05c3bd1639087e5819e81399542 (diff)
downloadmeson-5f0aeafa387894b0893877a92db5122b86c2244d.zip
meson-5f0aeafa387894b0893877a92db5122b86c2244d.tar.gz
meson-5f0aeafa387894b0893877a92db5122b86c2244d.tar.bz2
Add jpakkane's answer to "Why must all subprojects be inside a single directory?" [skip ci]
Diffstat (limited to 'docs/markdown/Subprojects.md')
-rw-r--r--docs/markdown/Subprojects.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/markdown/Subprojects.md b/docs/markdown/Subprojects.md
index 0d1442e..ad2aae2 100644
--- a/docs/markdown/Subprojects.md
+++ b/docs/markdown/Subprojects.md
@@ -77,3 +77,27 @@ subproject `b` and have `b` also use `a`.
Meson ships with a dependency system to automatically obtain
dependency subprojects. It is documented in the [Wrap dependency
system manual](Wrap-dependency-system-manual.md).
+
+# Why must all subprojects be inside a single directory?
+
+There are several reasons.
+
+First of all, to maintain any sort of sanity, the system must prevent going
+inside other subprojects with `subdir()` or variations thereof. Having the
+subprojects in well defined places makes this easy. If subprojects could be
+anywhere at all, it would be a lot harder.
+
+Second of all it is extremely important that end users can easily see what
+subprojects any project has. Because they are in one, and only one, place,
+reviewing them becomes easy.
+
+This is also a question of convention. Since all Meson projects have the same
+layout w.r.t subprojects, switching between projects becomes easier. You don't
+have to spend time on a new project traipsing through the source tree looking
+for subprojects. They are always in the same place.
+
+Finally if you can have subprojects anywhere, this increases the possibility of
+having many different (possibly incompatible) versions of a dependency in your
+source tree. Then changing some code (such as changing the order you traverse
+directories) may cause a completely different version of the subproject to be
+used by accident.