Skip to main content

An spl-core build extension that generates the object-file dependency graph report using clanguru

Project description

object-deps-report

An spl-core build extension that generates the object-file dependency graph report for a variant using clanguru.

The extension wires a CMake custom target objects-deps into the variant build. Because the report is built from the object files listed in compile_commands.json, the target depends on the linked executable (so every object is guaranteed to exist) and on compile_commands.json. Running the target invokes clanguru analyze to produce an interactive HTML dependency graph.

maintained license ruff pypeline

Installation

Install this via pip (or your favorite package manager):

pip install object_deps_report

Then, in the consuming spl-core project's CMakeLists.txt, after spl.cmake and the variant parts are included:

include(".venv/Lib/site-packages/object_deps_report/index.cmake")

Usage

Build the project first (so the executable and all objects exist), then build the report target:

cmake --build build/<variant>/<build_kit> --target objects-deps

The report is written to build/<variant>/<build_kit>/reports/object_dependencies.html.

How it works

The extension needs no configuration file and reads no KConfig/autoconf state. Its index.cmake (included from your CMakeLists.txt) defers a hook to the end of CMake configure that runs object_deps_report generate ...; that writes object_deps_report.cmake into the build directory and include()s it. The generated file contains:

  • an add_custom_command that runs clanguru analyze --compilation-database ${CMAKE_BINARY_DIR}/compile_commands.json --output-file <report>;
  • DEPENDS $<TARGET_FILE:${LINK_TARGET_NAME}> ${CMAKE_BINARY_DIR}/compile_commands.json — spl-core's linked executable target (so every object is built first, and the report regenerates when the binary changes) plus the compilation database (spl-core sets CMAKE_EXPORT_COMPILE_COMMANDS ON, so it always exists);
  • add_custom_target(objects-deps DEPENDS <report>)not part of the default (ALL) build, so the report is produced on demand.

The link target exists only for the prod build kit (test kits build per-component GTest executables), so run objects-deps in a prod build.

Start developing

The project is managed with uv and orchestrated by pypeline. Bootstrap the environment and run the full pipeline (venv, pre-commit, tests) with:

pypeline run

Committing changes

This repository uses commitlint for checking if the commit message meets the conventional commit format. Commit messages drive the automated release.

Continuous integration & release

CI runs on GitHub Actions (.github/workflows/ci.yml): lint (pre-commit), commitlint, a test matrix (Python 3.10/3.13 × Ubuntu/Windows), and a release job. Releases are automated with python-semantic-release: merging to main bumps the version from the conventional-commit history and publishes to PyPI (trusted publishing) and GitHub Releases.

Credits

Copier

This package was created with Copier and the browniebroke/pypackage-template project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

object_deps_report-0.0.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

object_deps_report-0.0.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file object_deps_report-0.0.0.tar.gz.

File metadata

  • Download URL: object_deps_report-0.0.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for object_deps_report-0.0.0.tar.gz
Algorithm Hash digest
SHA256 6deaf67099e679f4fc42cb646eb6d192bc9405c63cad93dc58e3b6208f810970
MD5 34d685a07e21f0a9305fe69bfdfce2d0
BLAKE2b-256 a9004d25d0cea29ed220339a29d99758aaffd6c4fd1188abb0788061db4b2bc1

See more details on using hashes here.

Provenance

The following attestation bundles were made for object_deps_report-0.0.0.tar.gz:

Publisher: ci.yml on avengineers/object-deps-report

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file object_deps_report-0.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for object_deps_report-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7515188e4d1312dd9b2209382044e128c920270c5dd8e5c8b949a4e01537059
MD5 0d00d33169e9d86676787a6427d35c7a
BLAKE2b-256 fc5ebd802df026928b9ed8b97dd27db5218d81f0136a8c5ed3637cf6cf9d2452

See more details on using hashes here.

Provenance

The following attestation bundles were made for object_deps_report-0.0.0-py3-none-any.whl:

Publisher: ci.yml on avengineers/object-deps-report

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page