csp
csp copied to clipboard
Add --skip_init option to csp_autogen to avoid build-time circular imports
In the current implementation, csp_autogen script always perform a full module import, which triggers execution of parent-level __init__.py files. These __init__.py files may import dependencies that are unavailable at build time, even though they are not required for generating C++ code.
This PR adds an optional flag to allow importing the source module in isolation, bypassing parent-level imports from __init__.py files. This prevents unnecessary dependency loading during build time and avoid circular dependency issues.