forked from firka/flutter
ensure dart2js does not compile unsupported packages (#40368)
This commit is contained in:
@@ -411,8 +411,11 @@ Future<void> bootstrapDart2Js(BuildStep buildStep, String flutterWebSdk, bool pr
|
||||
final AssetId dartEntrypointId = buildStep.inputId;
|
||||
final AssetId moduleId = dartEntrypointId.changeExtension(moduleExtension(flutterWebPlatform));
|
||||
final Module module = Module.fromJson(json.decode(await buildStep.readAsString(moduleId)));
|
||||
|
||||
final List<Module> allDeps = await module.computeTransitiveDependencies(buildStep, throwIfUnsupported: false)..add(module);
|
||||
final List<Module> allDeps = await module.computeTransitiveDependencies(
|
||||
buildStep,
|
||||
throwIfUnsupported: true,
|
||||
skipPlatformCheckPackages: skipPlatformCheckPackages,
|
||||
)..add(module);
|
||||
final ScratchSpace scratchSpace = await buildStep.fetchResource(scratchSpaceResource);
|
||||
final Iterable<AssetId> allSrcs = allDeps.expand((Module module) => module.sources);
|
||||
await scratchSpace.ensureAssets(allSrcs, buildStep);
|
||||
|
||||
@@ -27,6 +27,7 @@ const Map<String, String> _kManuallyPinnedDependencies = <String, String>{
|
||||
'test_api': '0.2.5', // |
|
||||
'test_core': '0.2.5', // |
|
||||
'vm_service_client': '0.2.6+2', // Final version before being marked deprecated.
|
||||
'protobuf': '0.13.15' // TODO(jonahwilliams): remove usage and update.
|
||||
};
|
||||
|
||||
class UpdatePackagesCommand extends FlutterCommand {
|
||||
|
||||
Reference in New Issue
Block a user