Review report

core: PR #35167

1 minor finding · 1 suggestion

Findings

Link

[minor] · Failed library builds can still produce a successful dependency check

A failed or impossible target build is only warned about, so the script can report success without inspecting a library; CI is largely protected by its earlier full build.

Location: contrib/devtools/check-deps.py:152 (head).

Details and suggested fix

For each graph node, the script runs cmake --build -t <target>. When a build fails, it records the target as “not buildable” and discards CMake’s output. It then treats missing archives for those targets as expected. If no dependency violations are found, it prints Success! and exits 0, even if it inspected no archives.

An existing directory that is not a configured build tree makes every target build fail, but the script can still exit 0. A compile error in a library target also produces only a warning; the script may inspect a stale archive or skip that library. In addition, the graph node libbitcoin_kernel maps to bitcoin_kernel, but the CMake target is bitcoinkernel, so the kernel warning is routine and that boundary is not checked. This noise can hide genuine build failures. The old shell script rejected directories without a Makefile and stopped on any build failure. CI’s tidy job performs a full fail-fast build first, so the false success mainly affects developer runs.

Map graph nodes to concrete CMake targets, marking libbitcoin_kernel as logical-only and unchecked. Skip only targets absent from the configured build, such as bitcoinqt when the GUI is disabled. Exit nonzero and print the captured CMake output when a defined target fails to build or when no archive was inspected.


Optional improvements

Link

[suggestion] · Dependency graph permissions conflict with the documented library boundaries

The graph permits dependencies that the accompanying rules forbid, so passing the check no longer demonstrates compliance with the documented boundaries.

Location: doc/design/libraries.md:62 (head).

Details and suggested fix

The graph adds libbitcoin_consensus-->libbitcoin_util and allows libbitcoinqt to depend on libbitcoin_node and libbitcoin_wallet. The prose still says consensus should depend only on libbitcoin_crypto, and that libbitcoinqt, libbitcoin_node, and libbitcoin_wallet should not reference one another’s symbols. It also says libbitcoinqt should not depend on libbitcoin_kernel, which the graph now permits transitively through node. Finally, the prose describes the graph’s arrows as direct dependencies, while the checker allows providers reachable through transitive dependencies. Before this change, bitcoinqt was not checked and consensus was allowed only crypto, so the new graph permissions leave reviewers with conflicting guidance.

If these edges reflect the intended boundaries, update the prose to describe the GUI exceptions, the consensus-to-util edge, and the transitive rule. If the written rules remain the goal, remove the edges from the graph and suppress the specific known references instead.


Coverage details