You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: resolve cross-package C++ header staging issue (Issue #38)
CRITICAL FIX: Properly stage local CcInfo headers for cross-package dependencies
Root Cause Analysis:
- Code intentionally excluded CcInfo headers from staging, assuming they were external libraries
- This broke local cross-package dependencies using relative includes like #include "foundation/types.h"
- Headers within same component also needed directory structure preservation
Solution:
1. Modified dependency collection logic in cpp/defs.bzl:
- External CcInfo headers (path contains "external/") → Use include paths only (no staging)
- Local CcInfo headers (same workspace) → Stage with directory structure for relative includes
2. Enhanced header staging in file_ops_actions.bzl:
- Preserve directory structure for all headers to support relative includes
- Handle cases where source files use #include "foundation/types.h" patterns
Testing:
- ✅ foundation_lib builds successfully with preserved directory structure
- ✅ consumer_component successfully includes cross-package headers
- ✅ External library dependencies continue to work via include paths
Impact:
- Resolves Issue #38 cross-package header staging problems
- Maintains backward compatibility for external library dependencies
- Enables proper modular C++ component development
0 commit comments