Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove code that generates and reads AssetManifest.json #114913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
andrewkolos opened this issue Nov 8, 2022 · 2 comments
Closed

Remove code that generates and reads AssetManifest.json #114913

andrewkolos opened this issue Nov 8, 2022 · 2 comments
Assignees
Labels
a: assets Packaging, accessing, or using assets c: tech-debt Technical debt, code quality, testing, etc. P3 Issues that are less important to the Flutter project tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@andrewkolos
Copy link
Contributor

andrewkolos commented Nov 8, 2022

AssetManifest.json is an asset that is generated by the tool during build that lists available assets and their variants. When loading an image at runtime, the framework reads and parses this file to determine if an asset is available

#113637 aims to replace this file with a new one named AssetManifest.bin, which contains similar data that is encoded using the standard_message_codec package. This change speeds up parsing the manifest at runtime, resulting in faster first asset load--especially for apps with large amounts of assets.

While AssetManifest.json is not officially documented, some users do depend on this file, and removing it outright would break them. For example, Google Fonts reads it to determine whether or not a font can be loaded from the device rather than loading it over HTTP.

As such, the aforementioned PR (#113637) will temporarily leave the generation of AssetManifest.json unchanged, and this should be later removed as a part of a breaking change. On the framework side, Flutter will start using AssetManifest.bin immediately, but in the event that it can't be loaded for whatever reason (e.g. custom tooling within g3 doesn't yet generate the file), the framework will fallback to loading AssetManifest.json when resolving assets.

@andrewkolos andrewkolos added tool Affects the "flutter" command-line tool. See also t: labels. a: assets Packaging, accessing, or using assets P3 Issues that are less important to the Flutter project c: tech-debt Technical debt, code quality, testing, etc. labels Nov 8, 2022
@andrewkolos andrewkolos self-assigned this Nov 8, 2022
@andrewkolos
Copy link
Contributor Author

#113637 has been closed and a new strategy is being taken for its development. This is now being tracked at #117228. As such, I'm closing this.

@andrewkolos andrewkolos closed this as not planned Won't fix, can't repro, duplicate, stale Dec 16, 2022
@github-actions
Copy link

github-actions bot commented Mar 4, 2023

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: assets Packaging, accessing, or using assets c: tech-debt Technical debt, code quality, testing, etc. P3 Issues that are less important to the Flutter project tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests

1 participant