Skip to content

Commit

Permalink
g-c/dependencies: Clarify the stance on circular dependencies
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ulrich Müller <[email protected]>
  • Loading branch information
the-horo authored and ulm committed Sep 28, 2024
1 parent ae6e8c5 commit 1f4eb2b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions general-concepts/dependencies/text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down

0 comments on commit 1f4eb2b

Please sign in to comment.