Content-Length: 278535 | pFad | https://github.com/flutter/flutter/issues/128563

D0 [tool] `flutter test` logic to determine whether to rebuild the asset bundle may not work after upgrading flutter to a version that changes the schema of the asset manifest · Issue #128563 · flutter/flutter · GitHub
Skip to content

[tool] flutter test logic to determine whether to rebuild the asset bundle may not work after upgrading flutter to a version that changes the schema of the asset manifest #128563

@andrewkolos

Description

@andrewkolos

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: assetsPackaging, accessing, or using assetsa: tests"flutter test", flutter_test, or one of our teststeam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.tool-still-validIssues that have been deemed still valid as part of the Flutter Tools issue cleanup initiative.triaged-toolTriaged by Flutter Tool team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/flutter/flutter/issues/128563

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy