-
Type: New Feature
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Server Development Platform
from the document:
Second only to removing edges that should not exist in impact, this is one of the key lint features we want to deliver. Reducing an edge from public to private means that the dependency no longer propagates transitively through the codebase. It also means that in environments that can use ABI driven (rather than out-of-date detection) relinks are greatly reduced, because private edges firewall the propagation of out-of-dateness when ABI is unaltered by a code change.
Conceptually, the scenario isn’t hard to understand. If A declares a public dependency on Z, and A directly requires symbols from Z (e.g. not as a consequence of Z’s export from another dependency of A which A uses in its implementation), but use of A’s interface does not induce a dependency on Z on the client, then Z should be reduced from public to private in A.
There is, as always, a wrinkle here. It may not be possible to tell, looking at the use of Z symbols in A, whether those symbols are because of direct use of Z symbols in A’s implementation, or whether those symbols are used because A is using B which uses Z in its interface. But it sort of doesn’t matter: if A’s use of B causes A to acquire dependencies on Z in its implementation but not its interface, then the linter will require that Z be public in B. But we assumed that use of A’s interface didn’t induce a dependency on Z. So one or both of B and Z will be private in A. But we can always safely recommend that any existing public Z dependency be moved to be private in A.
- depends on
-
SERVER-52578 integrate libabigail data into libdeps generate-libdeps-graph target
- Closed
- is duplicated by
-
SERVER-30815 Migrate library dependencies to LIBDEPS_PRIVATE
- Closed