Revert "[web] Add --local-web-sdk flag and use precompiled platform kernels for dart2js and ddc (#114639)" (#115242)
This reverts commit 0e9ee3679c.
This commit is contained in:
@@ -50,29 +50,22 @@ class WebTestCompiler {
|
||||
required BuildInfo buildInfo,
|
||||
}) async {
|
||||
LanguageVersion languageVersion = LanguageVersion(2, 8);
|
||||
late final String platformDillName;
|
||||
|
||||
HostArtifact platformDillArtifact = HostArtifact.webPlatformSoundKernelDill;
|
||||
// TODO(zanderso): to support autodetect this would need to partition the source code into a
|
||||
// a sound and unsound set and perform separate compilations
|
||||
// a sound and unsound set and perform separate compilations.
|
||||
final List<String> extraFrontEndOptions = List<String>.of(buildInfo.extraFrontEndOptions);
|
||||
if (buildInfo.nullSafetyMode == NullSafetyMode.unsound || buildInfo.nullSafetyMode == NullSafetyMode.autodetect) {
|
||||
platformDillName = 'ddc_outline.dill';
|
||||
platformDillArtifact = HostArtifact.webPlatformKernelDill;
|
||||
if (!extraFrontEndOptions.contains('--no-sound-null-safety')) {
|
||||
extraFrontEndOptions.add('--no-sound-null-safety');
|
||||
}
|
||||
} else if (buildInfo.nullSafetyMode == NullSafetyMode.sound) {
|
||||
languageVersion = currentLanguageVersion(_fileSystem, Cache.flutterRoot!);
|
||||
platformDillName = 'ddc_outline_sound.dill';
|
||||
if (!extraFrontEndOptions.contains('--sound-null-safety')) {
|
||||
extraFrontEndOptions.add('--sound-null-safety');
|
||||
}
|
||||
}
|
||||
|
||||
final String platformDillPath = _fileSystem.path.join(
|
||||
getWebPlatformBinariesDirectory(_artifacts, buildInfo.webRenderer).path,
|
||||
platformDillName
|
||||
);
|
||||
|
||||
final Directory outputDirectory = _fileSystem.directory(testOutputDir)
|
||||
..createSync(recursive: true);
|
||||
final List<File> generatedFiles = <File>[];
|
||||
@@ -123,7 +116,9 @@ class WebTestCompiler {
|
||||
initializeFromDill: cachedKernelPath,
|
||||
targetModel: TargetModel.dartdevc,
|
||||
extraFrontEndOptions: extraFrontEndOptions,
|
||||
platformDill: platformDillPath,
|
||||
platformDill: _artifacts
|
||||
.getHostArtifact(platformDillArtifact)
|
||||
.absolute.uri.toString(),
|
||||
dartDefines: buildInfo.dartDefines,
|
||||
librariesSpec: _artifacts.getHostArtifact(HostArtifact.flutterWebLibrariesJson).uri.toString(),
|
||||
packagesPath: buildInfo.packagesPath,
|
||||
|
||||
Reference in New Issue
Block a user