build_runner_hook 2.0.1 copy "build_runner_hook: ^2.0.1" to clipboard
build_runner_hook: ^2.0.1 copied to clipboard

An analyzer plugin for automatically running build_runner

2.0.0 #

Added #

  • Configuration support via build_runner_hook.yaml file.
  • Support for the build_filter option in the configuration, allowing users to specify exactly which files should be generated by the background build_runner process.
  • Package-scoped process ownership so multiple IDE or analyzer instances can safely work on the same package without killing each other's build_runner process.
  • A detached cleanup watchdog that removes orphaned package owners and stops build_runner when the last analyzer instance for a package exits.

Changed #

  • Simplified the shared process tracking logic and renamed the core registry to BuildRunnerTracker.
  • Removed over-abstracted wrapper functions, type aliases, and complex dependency injection in favor of a straightforward implementation.
  • Cleanup state and logs are now stored per package under the plugin temp directory (hook.log and build_runner.log) instead of using global files like brh.log or cleanup.log.
  • Cleanup now runs through internal plugin code instead of requiring a package executable resolved from the user's project.
  • Updated documentation and troubleshooting guides to reflect the new package-specific logging structure.

1.2.0 #

Added #

  • Dart workspace support. When the plugin detects a workspace, it starts build_runner watch --workspace from the workspace root.
  • A build_runner dependency check before startup. The plugin now skips startup and logs a helpful message when build_runner is not available in the current analysis context.
  • Separate log files for plugin lifecycle events and build_runner process output to make troubleshooting easier.

Changed #

  • Workspace and package detection now uses analyzer context information instead of relying only on raw filesystem paths.

1.1.0 #

Changed #

  • Removed hardcoded --delete-conflicting-outputs and --low-resources-mode flags from the build_runner watch command; the process now runs with default arguments only.
  • Updated installation instructions and removed the configuration section from README.

1.0.0 #

Added #

  • Analyzer plugin that automatically starts build_runner watch in the background.
  • Automatic process lifecycle management — starts on part directive detection, stops on analyzer shutdown.
  • Structured logging of all build_runner stdout and stderr output to a log file (build_runner_hook.log in the system temp directory).
  • --delete-conflicting-outputs and --low-resources-mode flags enabled by default.
  • Example project demonstrating usage with dart_mappable.