Upgrading build_runner 1 to 2
Breaking1.12.2 → 2.17.1Breaking8Security3Platform2New22Changed67Fixed58Other24
Fetching 78 releases from GitHub…44 / 78
SecurityThe serve command rejects non-loopback Host and Origin headers when bound to loopback, and validates them against --hostname.Advisory ↗
BreakingUpgrade verdict
8 breaking changes and 2 platform requirement changes and 3 security fixes.
In plain terms
- A command-line option for reducing memory use is gone, since the tool now uses less memory by default.
- Two command-line options for measuring performance are removed; use `--dart-aot-perf` instead.
- build_runner no longer asks you to confirm file deletions.
- Files are now always deleted without needing the `-d` flag.
Must act Top 5 of 13 that need code or config changes
Dart SDK requirement changed in 2.15.2: >=2.11.99 <3.0.0 → ^3.11.0.
What you must change
Breaking8
Removes the
--low-resources-mode flag because default memory usage has improved.--low-resources-modeRemoves the
--log-performance and --track-performance flags.--log-performance--track-performance--dart-aot-perfRemoves interactive prompts asking whether to delete files.
Ignores the
-d flag and always deletes files as if -d was passed.-dRemoves the
--use-polling-watcher flag.--use-polling-watcherRemoves the
$graph and $perf handlers from build_runner serve mode.build_runner serve$graph$perfPaths given to --build-filter with --workspace now apply to the current package, not the workspace root.
--build-filter--workspacepackage:asset:Removes undocumented and unused features:
lib/build_script_generate.dart, bin/graph_inspector.dart, and two build_runner commands.lib/build_script_generate.dartbin/graph_inspector.dartbuild_runner doctorbuild_runner generate-build-scriptSecurity3
The serve command rejects non-loopback Host and Origin headers when bound to loopback, and validates them against --hostname.
serveHostOrigin--hostnameThe
daemon asset server now rejects various non-local connections.daemonserve live reload websocket checks for localhost origin.servePlatform2
Requires Dart 3.11.0.
Requires Dart 3.8.0.