-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Build
-
None
-
Dev Platform 2020-07-13, Dev Platform 2020-07-27
We don't restrict LIBDEPS usage much, but we probably should. At least the following should probably be disallowed:
- We should only allow one of LIBDEPS or LIBDEPS_PRIVATE on anything that is a Program. Since things don't link to Program nodes, it doesn't matter which, but there is no advantage to declaring them one way or the other. Since LIBDEPS_PRIVATE doesn't really mean anything (or LIBDEPS_INTERFACE for that matter), we should disallow use of all forms other than LIBDEPS on things that are {{Program}}s.
- We have a facility for injecting reverse dependency edges via [PROG|LIB]DEPS_DEPENDENTS. An injectable library by definition adds behavior that may or may not be present. We should disallow linking directly to nodes that use DEPS_DEPENDENTS, since if that happens the node participates in both the forward and reverse sense, which is very confusing.
- Continuing with DEPS_DEPENDENTS, with the above rule enforced, it doesn't make sense for any Library that declares itself to function via reverse dependency edges to have anything other than LIBDEPS_PRIVATE dependencies, since if the injectable library is truly optional, it cannot be the source of any resolved symbols.
- If it is not currently enforced, we should ensure that for a given Program or Library, that any other library is listed exactly once among its LIBDEPS, LIBDEPS_PRIVATE, and LIBDEPS_INTERFACE sections.
While working on the above, we should also investigate any use of DEPS_DEPENDENTS in the community repo, as it is somewhat unclear what purpose they serve.
- related to
-
SERVER-49703 Add alphabetic lib ordering libdep linter rule
- Closed
-
SERVER-49760 Add lint-public-libdeps-prohibited to libdeps linter
- Closed
-
SERVER-49761 Add lint-libdeps-leaf-node to libdeps linter
- Closed
- mentioned in
-
Page Loading...