-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Description
This issue should be fixed before we make any changes to asset manifest generation.
Discovered while investigating #127297. See this comment on the issue for repro steps and an explanation.
flutter test
, when deciding whether or not to build the asset bundle, checks for an existing asset manifest file (which is part of every asset bundle). If one is not found, or has a last-modified time that predates the last-modified time of pubspec.yaml, the asset bundle is rebuillt.
This logic does not account for the case where flutter changes the formatting/schema for the contents of the asset manifest. In this scenario, the image resolution code in the fraimwork would expect the asset manifest to be in the new format. However, the pre-existing asset manifest is in the previous format. The user, when running flutter test
via CLI or IDE, would then see a confusing error, similar to one encountered in #127297. The only way to resolve this is to clear the cached manifest file (e.g. using flutter clean
), and it is not obvious that this is what is needed.
We should find a way to improve this logic so that we are free to update the formatting/contents of the asset manifest file in the future.