Skip to main content

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.

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.1.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.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for object_deps_report-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e97d349a385081503fd6254ed55c833e7f5677ecf923b5a53e0a69710a4c083e
MD5 3670c4183cf810c41ad5df7c1ecf79ac
BLAKE2b-256 1fdecf9b2fc0a535aa3cacc3bd21bd5d93da96edd4f0211f34d201ad6236097d

See more details on using hashes here.

Provenance

The following attestation bundles were made for object_deps_report-0.0.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for object_deps_report-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 45c559bd01432e54e8121c6eb227ab755e4b046af71e3ee8077ae3412f00bbe2
MD5 26dc7ec8d36260571e179e424ca39e3f
BLAKE2b-256 a5c6fe5277fd033af3bd5d37c40a179703f440c0d33132aaf464fc5370d68c03

See more details on using hashes here.

Provenance

The following attestation bundles were made for object_deps_report-0.0.1-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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 files

0.0.0

2 files

Supported by

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