[CP] Fix dart run
missing fast path when using Flutter
#55758
Labels
area-dart-cli
Use area-dart-cli for issues related to the 'dart' command like tool.
cherry-pick-approved
Label for approved cherrypick request
cherry-pick-review
Issue that need cherry pick triage to approve
dart-cli-run
Issues related to 'dart run'
Commit(s) to merge
dart-lang/pub@e70850b
Rolled to the sdk in: https://dart-review.googlesource.com/c/sdk/+/367024?tab=checks
Target
stable
Prepared changelist for beta/stable
https://dart-review.googlesource.com/c/sdk/+/367060
Issue Description
Without this it is hard/impossible to use build_runner together with localization on flutter.
dart run build_runner build
would wrongly think that the current resolution is stale, and redo it. Missing the flutter_gen package thatflutter pub get
injects to the package config.This is a regression that was introduced in: dart-lang/pub#4160 rolled to the sdk in 74c94ee
See dart-lang/build#3705
What is the fix
By fixing the fast-path check, we will not replace the package_config if it is up-to-date.
This does not fix the underlying problem that
dart run
doesn't inject the flutter_gen package when the resolution is stale, but at least makes it possible to run build_runner when localization is enabled.Why cherry-pick
To fix the regression
Risk
Medium-low
Issue link(s)
See dart-lang/build#3705
Extra Info
No response
The text was updated successfully, but these errors were encountered: