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
Running build_runner in debug mode, i have found a strange behavior in injectable_generator that seems to be the cause of the exponential time raises in this step.
Problem
I have a monorepo and recenty looking for the causes that takes my pipeline to take too much time 9 minutes (avg). When build_runner generate starts using melos, the shared code (Modules) run first and than the apps code sequentially. The output of build_runner accuses something very strange injectable_generate is running on dependecies path and not only in package path (lib, test).
[FINE] injectable_generator:injectable_builder on package:apps_catalog/interactor/cubit/product_page_cubit.dart:Running Instance of 'InjectableGenerator'
I have tried to limit the folder that injectable_generator and injectable_builder should look at using build.yaml but doesnt takes any effect on this problem.
Output console from build_runner generate on apps after modules
[FINE] injectable_generator:injectable_builder on package:apps_catalog/interactor/type_converters/product_child_order_converter.dart:Running Instance of 'InjectableGenerator'
[FINE] injectable_generator:injectable_builder on package:apps_catalog/interactor/events/product_page_event.dart:Running Instance of 'InjectableGenerator'
[FINE] injectable_generator:injectable_builder on package:apps_catalog/interactor/cubit/catalog_page_cubit.dart:Running Instance of 'InjectableGenerator'
[FINE] injectable_generator:injectable_builder on package:apps_catalog/interactor/cubit/catalog_listing_cubit.dart:Running Instance of 'InjectableGenerator'
[FINE] injectable_generator:injectable_builder on package:apps_catalog/interactor/events/shopping_cart_event.dart:Running Instance of 'InjectableGenerator'
[FINE] injectable_generator:injectable_builder on package:apps_catalog/interactor/cubit/shopping_cart_cubit.dart:Running Instance of 'InjectableGenerator'
[FINE] injectable_generator:injectable_builder on package:apps_catalog/interactor/cubit/product_page_cubit.dart:Running Instance of 'InjectableGenerator'
[FINE] injectable_generator:injectable_builder on lib/src/data/datasources/remotes/screensaver/get/screensaver_get_datasource.dart:Running Instance of 'InjectableGenerator'
[FINE] injectable_generator:injectable_builder on lib/src/data/datasources/remotes/screensaver/get/screensaver_get_v1_datasource_mock_impl.dart:Running Instance of 'InjectableGenerator'
[FINE] injectable_generator:injectable_builder on lib/src/data/datasources/remotes/screensaver/get/parser/get_data_parser.dart:Running Instance of 'InjectableGenerator'
[FINE] injectable_generator:injectable_builder on lib/src/data/datasources/remotes/screensaver/get/screensaver_get_v1_datasource_impl.dart:Running Instance of 'InjectableGenerator'
Apps (Similars apps that share some modules and design system widgets)
Modules (Business Rules, Data Sources)
Shared (Tools, Design System)
build_runner command using melos
generate:debug:
run: dart run build_runner build --delete-conflicting-outputs --verboseexec:
orderDependents: truefailFast: truepackageFilters:
dependsOn:
- build_runnerdescription: Run code generation using build_runner in a specific package
The text was updated successfully, but these errors were encountered:
pedrosantosdd
changed the title
build_runner slows caused by injectable_generator running on dependencies and not only on app folder.
performance issue caused by injectable_generator running on dependencies and not only on app folder when running build_runner
Jul 23, 2024
Running build_runner in debug mode, i have found a strange behavior in injectable_generator that seems to be the cause of the exponential time raises in this step.
Problem
I have a monorepo and recenty looking for the causes that takes my pipeline to take too much time 9 minutes (avg). When build_runner generate starts using melos, the shared code (Modules) run first and than the apps code sequentially. The output of build_runner accuses something very strange injectable_generate is running on dependecies path and not only in package path (lib, test).
[FINE] injectable_generator:injectable_builder on package:apps_catalog/interactor/cubit/product_page_cubit.dart:Running Instance of 'InjectableGenerator'
I have tried to limit the folder that injectable_generator and injectable_builder should look at using build.yaml but doesnt takes any effect on this problem.
Output console from build_runner generate on apps after modules
Minimal reproducible example
Struct Folder
build_runner command using melos
The text was updated successfully, but these errors were encountered: