-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
When generation fails (e.g., Python can't import a module), the output is misleading:
$ npx tywrap generate
Generated:
No error, no indication of what went wrong. This is very confusing for users trying to debug their setup.
Expected Behavior
Clear error messages explaining what failed:
$ npx tywrap generate
Error: Could not import module 'my_module'
- Module not found in Python path
- Current PYTHONPATH: /usr/lib/python3.11
- Hint: Set PYTHONPATH to include your local modules, e.g.:
PYTHONPATH=./python npx tywrap generate
Generated: 0 files (0 modules found)
Proposed Changes
- Report import failures - When Python fails to import a configured module, show the error
- Show summary stats - "Generated: 3 files from 2 modules" instead of just "Generated:"
- Warn on empty output - If no modules were found/generated, warn explicitly
- Add --verbose flag - For detailed debugging output during generation
- Validate config early - Check that configured modules can be imported before starting generation
Labels
enhancement, developer-experience, error-handling
Metadata
Metadata
Assignees
Labels
No labels