rename generated asset manifest file back to AssetManifest.bin (from AssetManifest.smcbin) (#128529)

Closes https://github.com/flutter/flutter/issues/128456, which is now linked to in a code comment in this change.
Reopens https://github.com/flutter/flutter/issues/124883.

This effectively reverts https://github.com/flutter/flutter/pull/126077 and is intended to be cherry-picked into stable.
This commit is contained in:
Andrew Kolos
2023-06-09 21:20:50 +00:00
committed by GitHub
parent af7a8f6bd9
commit cfe4fedca2
12 changed files with 45 additions and 36 deletions

View File

@@ -167,7 +167,7 @@ class ManifestAssetBundle implements AssetBundle {
// We assume the main asset is designed for a device pixel ratio of 1.0.
static const String _kAssetManifestJsonFilename = 'AssetManifest.json';
static const String _kAssetManifestBinFilename = 'AssetManifest.smcbin';
static const String _kAssetManifestBinFilename = 'AssetManifest.bin';
static const String _kNoticeFile = 'NOTICES';
// Comically, this can't be name with the more common .gz file extension

View File

@@ -541,7 +541,11 @@ class TestCommand extends FlutterCommand with DeviceBasedDevelopmentArtifacts {
}
bool _needRebuild(Map<String, DevFSContent> entries) {
final File manifest = globals.fs.file(globals.fs.path.join('build', 'unit_test_assets', 'AssetManifest.json'));
// TODO(andrewkolos): This logic might fail in the future if we change the
// schema of the contents of the asset manifest file and the user does not
// perform a `flutter clean` after upgrading.
// See https://github.com/flutter/flutter/issues/128563.
final File manifest = globals.fs.file(globals.fs.path.join('build', 'unit_test_assets', 'AssetManifest.bin'));
if (!manifest.existsSync()) {
return true;
}