Commit Graph

337 Commits

Author SHA1 Message Date
Sergey Penkovsky
926bbf15f4 refactor(benchmarks): unify benchmark structure, enable CLI parameterization, run matrix, add CSV/JSON/pretty output
- All benchmarks now use a unified base mixin for setup/teardown (BenchmarkWithScope).
- Added args package support: CLI flags for choosing benchmarks, chain counts, nesting depths, output format.
- Support for running benchmarks in matrix mode (multiple parameter sets).
- Machine-readable output: csv, json, pretty-table.
- Loop and naming lint fixes, unused imports removed.
2025-08-06 13:30:30 +03:00
yarashevich_kv
a5ef0dc437 impr: BENCHMARK - complex benchmark improvements. 2025-08-06 09:41:17 +03:00
Sergey Penkovsky
05cfca5977 docs(perf): clarify Map-based resolver optimization applies since v3.0.0 in all docs 2025-08-06 08:29:00 +03:00
Sergey Penkovsky
52a55219ab docs: update EN/RU quick start and tutorial with Fast Map-based lookup section; clarify performance benefit in README 2025-08-05 19:41:24 +03:00
Sergey Penkovsky
ffff33c744 perf(scope): speed up dependency lookup with Map-based binding resolver index
Optimize resolve()/tryResolve() to use O(1) Map-based lookup by type and name instead of iterating through all modules and bindings. Behavior of factory, singleton, instance, and named bindings is preserved.
2025-08-05 17:20:35 +03:00
Sergey Penkovsky
a4573ce8ef Add package topics to all pubspec.yaml files 2025-08-05 06:46:26 +03:00
Sergey Penkovsky
62868477fb chore(release): publish packages
- cherrypick@3.0.0-dev.2
 - cherrypick_flutter@1.1.3-dev.2
cherrypick_flutter-v1.1.3-dev.2 cherrypick-v3.0.0-dev.2
2025-08-04 08:54:37 +03:00
Sergey Penkovsky
a889cf0d40 Resolved all Dart analyzer warnings across multiple files 2025-08-01 11:20:23 +03:00
Sergey Penkovsky
123ed6ce02 Merge pull request #13 from pese-git/impr/binding_resolver
Refactored Binding by extracting BindingResolver to improve code structure and simplify the Binding class.
2025-08-01 11:01:30 +03:00
Sergey Penkovsky
7cc0743d94 Update benchmark results in README.ru.md with latest timings (RU version) 2025-08-01 08:48:27 +03:00
Sergey Penkovsky
63dae76ea9 Update benchmark results in README.md with latest timings 2025-08-01 08:47:55 +03:00
Sergey Penkovsky
a74c34876d feat(binding): add deprecated proxy async methods for backward compatibility and highlight transition to modern API 2025-08-01 08:44:31 +03:00
yarashevich_kv
9f0a8a84aa impr: fix after rebase. 2025-08-01 08:44:31 +03:00
yarashevich_kv
2cba7f2675 impr: add binding resolver class. 2025-08-01 08:44:31 +03:00
Sergey Penkovsky
1682ed9c08 Update benchmarks, lock files, and related documentation 2025-08-01 08:40:10 +03:00
Sergey Penkovsky
882ee92000 Update benchmark results in README.md with fresh timings 2025-08-01 08:39:12 +03:00
Sergey Penkovsky
9a3576f76d chore(release): publish packages
- cherrypick@3.0.0-dev.1
 - cherrypick_flutter@1.1.3-dev.1
2025-08-01 08:31:50 +03:00
Sergey Penkovsky
f7cc86ea66 docs: add quick guide for circular dependency detection to README 2025-08-01 08:31:50 +03:00
Sergey Penkovsky
1c8e38b0c9 chore(release): publish packages
- cherrypick@3.0.0-dev.0
 - cherrypick_flutter@1.1.3-dev.0
2025-08-01 08:31:50 +03:00
Sergey Penkovsky
d4af82ba01 Remove dead code: _createDependencyKey (no longer used, cycle detection not affected) 2025-08-01 08:31:50 +03:00
Sergey Penkovsky
5630efccfe feat: enable CherryPick cycle detection in debug mode and use safe root scope 2025-08-01 08:31:50 +03:00
Sergey Penkovsky
d63d52b817 feat: implement comprehensive circular dependency detection system
- Add two-level circular dependency detection (local and global)
- Implement CycleDetector for local scope cycle detection
- Implement GlobalCycleDetector for cross-scope cycle detection
- Add CircularDependencyException with detailed dependency chain info
- Integrate cycle detection into Scope class with unique scope IDs
- Extend CherryPick helper with cycle detection management API
- Add safe scope creation methods with automatic detection
- Support both synchronous and asynchronous dependency resolution
- Include comprehensive test coverage (72+ tests)
- Add bilingual documentation (English and Russian)
- Provide usage examples and architectural best practices
- Add performance recommendations and debug tools

BREAKING CHANGE: Scope constructor now generates unique IDs for global detection

fix: remove tmp files

update examples

update examples
2025-08-01 08:31:50 +03:00
Sergey Penkovsky
724dc9b3b5 Update lock files for dependency consistency 2025-08-01 08:30:53 +03:00
Sergey Penkovsky
6bdb9472b5 Update melos.yaml: add benchmark_cherrypick to managed packages 2025-08-01 08:30:12 +03:00
Sergey Penkovsky
23683119c2 Add complex DI benchmarks, main runner, and English README with summarized results for cherrypick core 2025-08-01 08:26:33 +03:00
Sergey Penkovsky
2c1f9d5969 doc: update manual 2025-07-29 08:10:08 +03:00
Sergey Penkovsky
e609c44f90 fix: update deps 2025-07-28 12:53:47 +03:00
Sergey Penkovsky
eb8cc1f566 update gitignore 2025-07-28 12:53:27 +03:00
Sergey Penkovsky
8fcb61ef3e chore(release): publish packages
- cherrypick@2.2.0
 - cherrypick_annotations@1.1.0
 - cherrypick_flutter@1.1.2
 - cherrypick_generator@1.1.0
cherrypick_generator-v1.1.0 cherrypick-v2.2.0 cherrypick_annotations-v1.1.0 cherrypick_flutter-v1.1.2
2025-07-28 12:34:54 +03:00
Sergey Penkovsky
69e166644a fix(tests): update expected outputs in generator tests to match new formatting 2025-07-25 12:44:25 +03:00
Sergey Penkovsky
feb7258302 chore(generator): improve annotation validation, unify async type handling, and refactor BindSpec creation
- Enhance annotation validation in DI code generation.
- Move from manual Future<T> extraction to unified type parsing.
- Refactor BindSpec creation logic to provide better error messages and type consistency.
- Add missing source files for exceptions, annotation validation, and type parsing.

BREAKING CHANGE:
Invalid annotation combinations now produce custom generator errors. Async detection is now handled via unified type parser.
2025-07-25 11:58:56 +03:00
Sergey Penkovsky
c722ad0c07 docs: update full Russian tutorial
- Updated doc/full_tutorial_ru.md with improvements and clarifications
2025-06-21 15:45:34 +03:00
Sergey Penkovsky
8468eff5f7 docs: add full English tutorial for CherryPick DI
- Added doc/full_tutorial_en.md: complete translation and detailed guide for CherryPick DI usage in Dart/Flutter projects
2025-06-21 15:31:52 +03:00
Sergey Penkovsky
24bb47f741 docs: add detailed Russian full tutorial
- Added doc/full_tutorial_ru.md with comprehensive usage and explanation of CherryPick DI
2025-06-21 15:20:30 +03:00
Sergey Penkovsky
b5f6fff8d1 Merge pull request #11 from pese-git/annotations
Annotations
2025-06-19 08:28:10 +03:00
Sergey Penkovsky
e7f20d8f63 docs: move and update quick start guides to ./doc directory
- Перемещены и обновлены quick_start_en.md и quick_start_ru.md
- Файлы удалены из cherrypick/doc, теперь находятся в корне doc/
- Описаны актуальные примеры и улучшена структура
2025-06-17 17:22:30 +03:00
Sergey Penkovsky
e057bb487b docs: add annotation usage guides (en, ru) with up-to-date examples and best practices 2025-06-17 17:19:08 +03:00
Sergey Penkovsky
2e7c9129bb Merge pull request #9 from pese-git/annotations
Annotations
2025-06-12 21:51:04 +03:00
Sergey Penkovsky
292af4a4f3 fix: format test code 2025-06-12 21:49:53 +03:00
Sergey Penkovsky
5220ebc4b9 feat(generator): complete code generation testing framework with 100% test coverage
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.
2025-06-11 18:34:19 +03:00
Sergey Penkovsky
a0a0a967a2 chore(release): publish packages
- cherrypick_generator@1.1.0-dev.5
cherrypick_generator-v1.1.0-dev.5
2025-06-04 00:39:25 +03:00
Sergey Penkovsky
a9260e0413 feat: implement tryResolve via generate code 2025-06-04 00:38:23 +03:00
Sergey Penkovsky
dd608031a2 chore(release): publish packages
- cherrypick_generator@1.1.0-dev.4
cherrypick_generator-v1.1.0-dev.4
2025-05-28 01:36:40 +03:00
Sergey Penkovsky
49e3654ab8 fix: fixed warnings 2025-05-28 01:35:46 +03:00
Sergey Penkovsky
bc28ff79ef chore: update deps and up to flutter sdk 3.29.3 and dart >=3.7.0 2025-05-28 00:02:23 +03:00
Sergey Penkovsky
52bc66f2f9 update documentaions 2025-05-23 17:27:40 +03:00
Sergey Penkovsky
79a050d056 update documentaions 2025-05-23 17:23:22 +03:00
Sergey Penkovsky
3beb53a094 update documentations 2025-05-23 17:13:57 +03:00
Sergey Penkovsky
21955640d9 chore(release): publish packages
- cherrypick_annotations@1.1.0-dev.1
 - cherrypick_generator@1.1.0-dev.3
cherrypick_annotations-v1.1.0-dev.1 cherrypick_generator-v1.1.0-dev.3
2025-05-23 16:11:08 +03:00
Sergey Penkovsky
a62052daa5 doc: update documentations 2025-05-23 16:10:09 +03:00