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
Smoke-testing the zfa-only workflow (goal: any agent can build a ZikZak-class app with only zfa commands). The command chain that zfa setup itself prints in its "Next steps" does not compile:
lib/src/di/repositories/product_repository_di.dart - imports ../../data/repositories/data_product_repository.dart (DOES NOT EXIST)
lib/src/di/usecases/product_usecase_di.dart - imports ../../domain/usecases/product/product_usecase.dart (DOES NOT EXIST)
lib/src/presentation/pages/product/product_controller.dart - #281 class
lib/src/presentation/pages/product/product_presenter.dart - #281 class
lib/src/presentation/pages/product/product_view.dart - #281 class
Gap A: repository implementation never generated (crud preset)
preset crud = ['usecase', 'repository', 'datasource']. The repository plugin (lib/src/plugins/repository/repository_plugin.dart:184-190) only emits the implementation when config.generateData || config.generateDataSource:
if (config.isEntityBased || (config.appendToExisting && config.repo !=null)) {
files.add(await interfaceGen.generate(targetConfig)); // product_repository.dart
}
if ((config.generateData || config.generateDataSource || config.appendToExisting) &&!config.hasService) {
files.add(await implementationGen.generate(targetConfig)); // data_product_repository.dart - NOT emitted
}
But the DI plugin (lib/src/plugins/di/di_plugin.dart:204-210) emits product_repository_di.dart importing data_product_repository.dart whenever config.generateRepository || config.generateData:
So the interface is generated, the DI references the impl, but the impl is never produced. The reference app (~/Developer/zik_zak) HAS the impls (data/repositories/data_grocery_store_repository.dart etc.), generated by v5 zfa. Adding --data to zfa make does produce the impl and clears the DI errors — so either the crud preset should include the data layer, or the repository plugin should emit the impl for entity-based configs, or DI should skip the repo DI when no impl is generated.
Gap B: orchestrator usecase file never generated (DI references ProductUseCase)
The DI plugin's orchestrator branch (lib/src/plugins/di/di_plugin.dart:814-860, triggered when config.isOrchestrator) emits:
But the usecase plugin (lib/src/plugins/usecase/usecase_plugin.dart:180-186) routes isEntityBased to entityGen.generate (per-method usecases: get_product_usecase.dart, toggle_product_usecase.dart, update_product_usecase.dart) and only generates the orchestrator file for isOrchestrator configs. Nothing emits product_usecase.dart + ProductUseCase. The reference app uses per-usecase DI files (check_permission_usecase_di.dart, deal_*_usecase_di.dart) — no aggregator. Either DI should use the entity-based per-usecase DI for entity configs, or the usecase plugin must also emit the orchestrator file when DI expects it.
Suggested fix
Gap A: make the crud preset (and the setup-printed next-steps) include the data layer so the repository impl is generated — or generate the impl whenever the interface is generated for entity-based configs. Minimum: the setup "Next steps" command must produce compiling code.
Gap B: for entity-based configs, DI should emit per-usecase DI files (matching the generated entity usecases) instead of the orchestrator DI, OR generate the orchestrator usecase file too.
Blocks the entire zfa-only build flow: the canonical first command after setup fails to compile, on top of #281. Reference app's own generated layout confirms the expected outputs (data_*_repository.dart impls + per-usecase DI).
Context
Smoke-testing the zfa-only workflow (goal: any agent can build a ZikZak-class app with only zfa commands). The command chain that
zfa setupitself prints in its "Next steps" does not compile:Actual (after zfa build succeeds)
Gap A: repository implementation never generated (crud preset)
preset crud=['usecase', 'repository', 'datasource']. The repository plugin (lib/src/plugins/repository/repository_plugin.dart:184-190) only emits the implementation whenconfig.generateData || config.generateDataSource:But the DI plugin (lib/src/plugins/di/di_plugin.dart:204-210) emits
product_repository_di.dartimportingdata_product_repository.dartwheneverconfig.generateRepository || config.generateData:So the interface is generated, the DI references the impl, but the impl is never produced. The reference app (~/Developer/zik_zak) HAS the impls (
data/repositories/data_grocery_store_repository.dartetc.), generated by v5 zfa. Adding--datatozfa makedoes produce the impl and clears the DI errors — so either the crud preset should include the data layer, or the repository plugin should emit the impl for entity-based configs, or DI should skip the repo DI when no impl is generated.Gap B: orchestrator usecase file never generated (DI references ProductUseCase)
The DI plugin's orchestrator branch (lib/src/plugins/di/di_plugin.dart:814-860, triggered when
config.isOrchestrator) emits:But the usecase plugin (lib/src/plugins/usecase/usecase_plugin.dart:180-186) routes
isEntityBasedtoentityGen.generate(per-method usecases:get_product_usecase.dart,toggle_product_usecase.dart,update_product_usecase.dart) and only generates the orchestrator file forisOrchestratorconfigs. Nothing emitsproduct_usecase.dart+ProductUseCase. The reference app uses per-usecase DI files (check_permission_usecase_di.dart,deal_*_usecase_di.dart) — no aggregator. Either DI should use the entity-based per-usecase DI for entity configs, or the usecase plugin must also emit the orchestrator file when DI expects it.Suggested fix
Impact
Blocks the entire zfa-only build flow: the canonical first command after setup fails to compile, on top of #281. Reference app's own generated layout confirms the expected outputs (data_*_repository.dart impls + per-usecase DI).