- Removed all unused imports and variables across generator sources and tests
- Applied Dart 3 super parameters to all custom exceptions
- Project now passes 'dart analyze' with zero warnings or infos
- All tests (164/164) are green
This commit improves code clarity and ensures full compliance with modern Dart best practices.
- Enhanced BindSpec multiline formatting logic for better code readability
- Added _generateMultilinePostfix method for proper postfix formatting
- Fixed indentation handling for different binding types and scenarios
- Improved CustomOutputBuilder to correctly place 'part of' directive
- Enhanced InjectGenerator injection line formatting with proper line breaks
- Fixed TypeParser to include generic parameters in generated types
- Updated AnnotationValidator to allow injectable classes without @inject fields
- Fixed mock objects in tests to be compatible with analyzer 7.x API
- Added missing properties (source, returnType, type) to test mocks
- Updated test expectations to match new formatting behavior
All 164 tests now pass successfully (100% success rate)
BREAKING CHANGE: Injectable classes without @inject fields now generate empty mixins instead of throwing exceptions
Now the code generator supports specifying a custom output directory and extension/name template for generated DI files via build.yaml ( and ). This allows placing all generated code in custom folders and using flexible naming schemes.
docs: update all user docs and tutorials to explain new output_dir/build_extensions config
- Added detailed usage and YAML examples to cherrypick_generator/README.md
- Synced full_tutorial_en.md and full_tutorial_ru.md (advanced codegen section) with explanation of new configuration and impact on imports
- Updated quick_start_en.md and quick_start_ru.md to mention advanced customization and point to tutorials
- Added troubleshooting and tips for custom output/imports in docs
- Перемещены и обновлены quick_start_en.md и quick_start_ru.md
- Файлы удалены из cherrypick/doc, теперь находятся в корне doc/
- Описаны актуальные примеры и улучшена структура
BREAKING CHANGE: Updated file extensions and dependencies for better compatibility
## 🎯 Major Features Added:
- ✅ Complete test suite for ModuleGenerator (66 integration tests)
- ✅ Complete test suite for InjectGenerator (66 integration tests)
- ✅ Comprehensive unit tests for BindSpec, MetadataUtils
- ✅ 195 total tests across all packages (100% passing)
## 🔧 Technical Improvements:
- feat(generator): add comprehensive integration tests for code generation
- feat(generator): implement BindSpec unit tests with full coverage
- feat(generator): add MetadataUtils unit tests for annotation processing
- fix(generator): update file extensions to avoid conflicts (.module.cherrypick.g.dart)
- fix(generator): correct part directive generation in templates
- fix(generator): resolve dart_style 3.x formatting compatibility
## 📦 Dependencies & Configuration:
- build(deps): upgrade analyzer to ^7.0.0 for Dart 3.5+ compatibility
- build(deps): upgrade dart_style to ^3.0.0 for modern formatting
- build(deps): upgrade source_gen to ^2.0.0 for latest features
- config(build): update build.yaml with new file extensions
- config(melos): optimize test commands for better performance
## 🐛 Bug Fixes:
- fix(examples): correct local package paths in client_app and postly
- fix(analysis): exclude generated files from static analysis
- fix(generator): remove unused imports and variables
- fix(tests): add missing part directives in test input files
- fix(tests): update expected outputs to match dart_style 3.x format
## 🚀 Performance & Quality:
- perf(tests): optimize test execution time (132 tests in ~1 second)
- quality: achieve 100% test coverage for code generation
- quality: eliminate all analyzer warnings and errors
- quality: ensure production-ready stability
## 📋 Test Coverage Summary:
- cherrypick: 61 tests ✅
- cherrypick_annotations: 1 test ✅
- cherrypick_generator: 132 tests ✅
- cherrypick_flutter: 1 test ✅
- Total: 195 tests (100% passing)
## 🔄 Compatibility:
- ✅ Dart SDK 3.5.2+
- ✅ Flutter 3.24+
- ✅ melos + fvm workflow
- ✅ build_runner integration
- ✅ Modern analyzer and formatter
This commit establishes CherryPick as a production-ready dependency injection
framework with enterprise-grade testing and code generation capabilities.