Unverified Commit 3f4d27c4 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Correct libraries path and remove dart:io and dart:isolate for web dart platform (#39364)

parent 95168fcc
...@@ -41,6 +41,16 @@ const String jsSourceMapExtension = '.ddc.js.map'; ...@@ -41,6 +41,16 @@ const String jsSourceMapExtension = '.ddc.js.map';
const String kReleaseFlag = 'release'; const String kReleaseFlag = 'release';
const String kProfileFlag = 'profile'; const String kProfileFlag = 'profile';
const Set<String> skipPlatformCheckPackages = <String>{
'flutter',
'flutter_test',
'flutter_driver',
'flutter_goldens',
'flutter_goldens_client',
'flutter_gallery',
'connectivity',
};
final DartPlatform flutterWebPlatform = final DartPlatform flutterWebPlatform =
DartPlatform.register('flutter_web', <String>[ DartPlatform.register('flutter_web', <String>[
'async', 'async',
...@@ -63,8 +73,6 @@ final DartPlatform flutterWebPlatform = ...@@ -63,8 +73,6 @@ final DartPlatform flutterWebPlatform =
// Flutter web specific libraries. // Flutter web specific libraries.
'ui', 'ui',
'_engine', '_engine',
'io',
'isolate',
]); ]);
/// The builders required to compile a Flutter application to the web. /// The builders required to compile a Flutter application to the web.
...@@ -127,7 +135,7 @@ final List<core.BuilderApplication> builders = <core.BuilderApplication>[ ...@@ -127,7 +135,7 @@ final List<core.BuilderApplication> builders = <core.BuilderApplication>[
sdkKernelPath: path.join('kernel', 'flutter_ddc_sdk.dill'), sdkKernelPath: path.join('kernel', 'flutter_ddc_sdk.dill'),
outputExtension: ddcKernelExtension, outputExtension: ddcKernelExtension,
platform: flutterWebPlatform, platform: flutterWebPlatform,
librariesPath: 'libraries.json', librariesPath: path.absolute(path.join(builderOptions.config['flutterWebSdk'], 'libraries.json')),
kernelTargetName: 'ddc', kernelTargetName: 'ddc',
), ),
(BuilderOptions builderOptions) => DevCompilerBuilder( (BuilderOptions builderOptions) => DevCompilerBuilder(
...@@ -135,7 +143,7 @@ final List<core.BuilderApplication> builders = <core.BuilderApplication>[ ...@@ -135,7 +143,7 @@ final List<core.BuilderApplication> builders = <core.BuilderApplication>[
platform: flutterWebPlatform, platform: flutterWebPlatform,
platformSdk: builderOptions.config['flutterWebSdk'], platformSdk: builderOptions.config['flutterWebSdk'],
sdkKernelPath: path.url.join('kernel', 'flutter_ddc_sdk.dill'), sdkKernelPath: path.url.join('kernel', 'flutter_ddc_sdk.dill'),
librariesPath: 'libraries.json', librariesPath: path.absolute(path.join(builderOptions.config['flutterWebSdk'], 'libraries.json')),
), ),
], ],
core.toAllPackages(), core.toAllPackages(),
...@@ -201,7 +209,7 @@ class FlutterWebTestEntrypointBuilder implements Builder { ...@@ -201,7 +209,7 @@ class FlutterWebTestEntrypointBuilder implements Builder {
@override @override
Future<void> build(BuildStep buildStep) async { Future<void> build(BuildStep buildStep) async {
log.info('building for target ${buildStep.inputId.path}'); log.info('building for target ${buildStep.inputId.path}');
await bootstrapDdc(buildStep, platform: flutterWebPlatform); await bootstrapDdc(buildStep, platform: flutterWebPlatform, skipPlatformCheckPackages: skipPlatformCheckPackages);
} }
} }
...@@ -229,7 +237,7 @@ class FlutterWebEntrypointBuilder implements Builder { ...@@ -229,7 +237,7 @@ class FlutterWebEntrypointBuilder implements Builder {
if (release || profile) { if (release || profile) {
await bootstrapDart2Js(buildStep, flutterWebSdk, profile); await bootstrapDart2Js(buildStep, flutterWebSdk, profile);
} else { } else {
await bootstrapDdc(buildStep, platform: flutterWebPlatform); await bootstrapDdc(buildStep, platform: flutterWebPlatform, skipPlatformCheckPackages: skipPlatformCheckPackages);
} }
} }
} }
......
...@@ -417,7 +417,11 @@ class BuildDaemonCreator { ...@@ -417,7 +417,11 @@ class BuildDaemonCreator {
} }
break; break;
default: default:
printTrace(serverLog.message); if (serverLog.message.contains('Skipping compiling')) {
printError(serverLog.message);
} else {
printTrace(serverLog.message);
}
} }
}, },
buildMode: daemon.BuildMode.Manual, buildMode: daemon.BuildMode.Manual,
......
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