commit:     1f4eb2b2cb996e95f5fb1f09ee912082c8957fea
Author:     Andrei Horodniceanu <a.horodniceanu <AT> proton <DOT> me>
AuthorDate: Thu Sep 26 09:08:38 2024 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Sat Sep 28 19:36:07 2024 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=1f4eb2b2

g-c/dependencies: Clarify the stance on circular dependencies

I had a package that needed changes that would introduce a dependency
cycle with USE=test and I had to ask on IRC whether this was OK. Sam
told me not to worry about it and recommended that the devmanual
should note this.

So, add a paragraph that discourages dependency cycles but expresses
that cycles provoked by USE=test can usually be ignored.

Signed-off-by: Andrei Horodniceanu <a.horodniceanu <AT> proton.me>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 general-concepts/dependencies/text.xml | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/general-concepts/dependencies/text.xml 
b/general-concepts/dependencies/text.xml
index 6c3207d..407e4c4 100644
--- a/general-concepts/dependencies/text.xml
+++ b/general-concepts/dependencies/text.xml
@@ -821,6 +821,14 @@ There are three kinds of circular dependencies:
   </li>
 </ol>
 
+<p>
+While circular dependencies should be avoided, an exception can be made for
+test-only dependencies. Similar to the example above with the tests of
+<c>dev-python/setuptools</c>, if a package needs itself, directly or
+indirectly, in order to run its tests, it is usually fine to leave it
+as-is. You should fix it if you can but don't go to extensive lengths for it.
+</p>
+
 </body>
 </section>
 

Reply via email to