Unverified Commit 08445c8a authored by Stanislav Baranov's avatar Stanislav Baranov Committed by GitHub

Stop precaching the artifacts for dynamic mode. (#31282)

parent b593f516
......@@ -45,15 +45,14 @@ String _artifactToFileName(Artifact artifact, [ TargetPlatform platform, BuildMo
case Artifact.flutterFramework:
return 'Flutter.framework';
case Artifact.vmSnapshotData:
// Flutter debug and dynamic profile modes for all target platforms use Dart
// Flutter 'debug' and 'dynamic profile' modes for all target platforms use Dart
// RELEASE VM snapshot that comes from host debug build and has the metadata
// related to development tools. Flutter 'dynamic release' mode uses Dart PRODUCT
// VM snapshot from host dynamic release build that strips out the metadata
// related to development tools.
if (mode == BuildMode.dynamicRelease) {
return 'product_vm_isolate_snapshot.bin';
}
// Flutter dynamic release mode for all target platforms uses Dart PRODUCT
// VM snapshot from host dynamic release build that strips out the metadata
// related to development tools.
return 'vm_isolate_snapshot.bin';
case Artifact.isolateSnapshotData:
if (mode == BuildMode.dynamicRelease) {
......
......@@ -950,10 +950,6 @@ const List<List<String>> _osxBinaryDirs = <List<String>>[
<String>['android-arm-release/darwin-x64', 'android-arm-release/darwin-x64.zip'],
<String>['android-arm64-profile/darwin-x64', 'android-arm64-profile/darwin-x64.zip'],
<String>['android-arm64-release/darwin-x64', 'android-arm64-release/darwin-x64.zip'],
<String>['android-arm-dynamic-profile/darwin-x64', 'android-arm-dynamic-profile/darwin-x64.zip'],
<String>['android-arm-dynamic-release/darwin-x64', 'android-arm-dynamic-release/darwin-x64.zip'],
<String>['android-arm64-dynamic-profile/darwin-x64', 'android-arm64-dynamic-profile/darwin-x64.zip'],
<String>['android-arm64-dynamic-release/darwin-x64', 'android-arm64-dynamic-release/darwin-x64.zip'],
];
const List<List<String>> _linuxBinaryDirs = <List<String>>[
......@@ -961,10 +957,6 @@ const List<List<String>> _linuxBinaryDirs = <List<String>>[
<String>['android-arm-release/linux-x64', 'android-arm-release/linux-x64.zip'],
<String>['android-arm64-profile/linux-x64', 'android-arm64-profile/linux-x64.zip'],
<String>['android-arm64-release/linux-x64', 'android-arm64-release/linux-x64.zip'],
<String>['android-arm-dynamic-profile/linux-x64', 'android-arm-dynamic-profile/linux-x64.zip'],
<String>['android-arm-dynamic-release/linux-x64', 'android-arm-dynamic-release/linux-x64.zip'],
<String>['android-arm64-dynamic-profile/linux-x64', 'android-arm64-dynamic-profile/linux-x64.zip'],
<String>['android-arm64-dynamic-release/linux-x64', 'android-arm64-dynamic-release/linux-x64.zip'],
];
const List<List<String>> _windowsBinaryDirs = <List<String>>[
......@@ -972,10 +964,6 @@ const List<List<String>> _windowsBinaryDirs = <List<String>>[
<String>['android-arm-release/windows-x64', 'android-arm-release/windows-x64.zip'],
<String>['android-arm64-profile/windows-x64', 'android-arm64-profile/windows-x64.zip'],
<String>['android-arm64-release/windows-x64', 'android-arm64-release/windows-x64.zip'],
<String>['android-arm-dynamic-profile/windows-x64', 'android-arm-dynamic-profile/windows-x64.zip'],
<String>['android-arm-dynamic-release/windows-x64', 'android-arm-dynamic-release/windows-x64.zip'],
<String>['android-arm64-dynamic-profile/windows-x64', 'android-arm64-dynamic-profile/windows-x64.zip'],
<String>['android-arm64-dynamic-release/windows-x64', 'android-arm64-dynamic-release/windows-x64.zip'],
];
const List<List<String>> _androidBinaryDirs = <List<String>>[
......@@ -987,10 +975,6 @@ const List<List<String>> _androidBinaryDirs = <List<String>>[
<String>['android-arm64', 'android-arm64/artifacts.zip'],
<String>['android-arm64-profile', 'android-arm64-profile/artifacts.zip'],
<String>['android-arm64-release', 'android-arm64-release/artifacts.zip'],
<String>['android-arm-dynamic-profile', 'android-arm-dynamic-profile/artifacts.zip'],
<String>['android-arm-dynamic-release', 'android-arm-dynamic-release/artifacts.zip'],
<String>['android-arm64-dynamic-profile', 'android-arm64-dynamic-profile/artifacts.zip'],
<String>['android-arm64-dynamic-release', 'android-arm64-dynamic-release/artifacts.zip'],
];
const List<List<String>> _iosBinaryDirs = <List<String>>[
......
......@@ -35,6 +35,14 @@ void main() {
artifacts.getArtifactPath(Artifact.flutterTester),
fs.path.join(tempDir.path, 'bin', 'cache', 'artifacts', 'engine', 'linux-x64', 'flutter_tester'),
);
expect(
artifacts.getArtifactPath(Artifact.genSnapshot, platform: TargetPlatform.android_arm64, mode: BuildMode.dynamicRelease),
fs.path.join(tempDir.path, 'bin', 'cache', 'artifacts', 'engine', 'android-arm64-dynamic-release', 'linux-x64', 'gen_snapshot'),
);
expect(
artifacts.getArtifactPath(Artifact.vmSnapshotData, platform: TargetPlatform.darwin_x64, mode: BuildMode.dynamicRelease),
fs.path.join(tempDir.path, 'bin', 'cache', 'artifacts', 'engine', 'darwin-x64', 'product_vm_isolate_snapshot.bin'),
);
}, overrides: <Type, Generator>{
Cache: () => Cache(rootOverride: tempDir),
Platform: () => FakePlatform(operatingSystem: 'linux'),
......@@ -45,6 +53,10 @@ void main() {
artifacts.getEngineType(TargetPlatform.android_arm, BuildMode.debug),
'android-arm',
);
expect(
artifacts.getEngineType(TargetPlatform.android_arm64, BuildMode.dynamicProfile),
'android-arm64-dynamic-profile',
);
expect(
artifacts.getEngineType(TargetPlatform.ios, BuildMode.release),
'ios-release',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment