Skip to content

Fix stubgen caching#193

Merged
nvddr merged 1 commit intomainfrom
devdeepr/fixstubgencaching
Feb 27, 2026
Merged

Fix stubgen caching#193
nvddr merged 1 commit intomainfrom
devdeepr/fixstubgencaching

Conversation

@nvddr
Copy link
Contributor

@nvddr nvddr commented Feb 27, 2026

Summary by CodeRabbit

  • Chores
    • Improved Python build system dependency management to ensure proper synchronization during stub generation.

@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6d2df82 and dc785eb.

📒 Files selected for processing (1)
  • src/core/python/CMakeLists.txt

📝 Walkthrough

Walkthrough

This change adds explicit dependencies on five Python module targets (deviceio_py, mcap_py, oxr_py, plugin_manager_py, schema_py) to a CMake custom command that generates Python type stubs. This ensures the Python modules are built before the stub generation process begins, enforcing proper build order and synchronization.

Changes

Cohort / File(s) Summary
Build Dependencies
src/core/python/CMakeLists.txt
Added explicit dependencies on Python module targets to the custom command for generating .pyi type stub files, ensuring modules are built before stub generation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A little hop through build-time grace,
Five modules now know their rightful place,
Dependencies declared, so clear and bright,
Stubs follow modules—order done right!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix stubgen caching' directly relates to the main change: adding explicit dependencies to enforce correct build order for Python stub generation, which resolves caching issues.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devdeepr/fixstubgencaching

Comment @coderabbitai help to get the list of available commands and usage tips.

@nvddr nvddr enabled auto-merge (rebase) February 27, 2026 08:59
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes stubgen caching by adding explicit dependencies on the compiled pybind11 module files. The stubgen process generates Python type stub files (.pyi) for IDE intellisense by importing the compiled pybind11 modules, so it requires the actual .so files to exist. Without these file-level dependencies, CMake's caching could cause stale stub files when the compiled modules change but the custom command's dependencies aren't properly invalidated.

Changes:

  • Added $<TARGET_FILE:...> dependencies for all 5 pybind11 modules (deviceio_py, mcap_py, oxr_py, plugin_manager_py, schema_py) to the stubgen custom command

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nvddr nvddr merged commit 8e31a16 into main Feb 27, 2026
22 of 24 checks passed
@nvddr nvddr deleted the devdeepr/fixstubgencaching branch February 27, 2026 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants