Unverified Commit cf4ef28b authored by Flutter GitHub Bot's avatar Flutter GitHub Bot Committed by GitHub

Roll pub packages (#121569)

Roll pub packages
parent df66fecd
......@@ -42,7 +42,6 @@ import '../web/chrome.dart';
import '../web/compile.dart';
import '../web/file_generators/flutter_js.dart' as flutter_js;
import '../web/memory_fs.dart';
import 'sdk_web_configuration.dart';
typedef DwdsLauncher = Future<Dwds> Function({
required AssetReader assetReader,
......@@ -61,10 +60,9 @@ typedef DwdsLauncher = Future<Dwds> Function({
bool enableDevtoolsLaunch,
DevtoolsLauncher? devtoolsLauncher,
bool launchDevToolsInNewWindow,
SdkConfigurationProvider sdkConfigurationProvider,
bool emitDebugEvents,
bool isInternalBuild,
bool isFlutterApp,
Future<bool> Function()? isFlutterApp,
});
// A minimal index for projects that do not yet support web.
......@@ -301,7 +299,6 @@ class WebAssetServer implements AssetReader {
).strategy,
expressionCompiler: expressionCompiler,
spawnDds: enableDds,
sdkConfigurationProvider: SdkWebConfigurationProvider(globals.artifacts!),
);
shelf.Pipeline pipeline = const shelf.Pipeline();
if (enableDwds) {
......
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'dart:async';
// ignore: import_of_legacy_library_into_null_safe
import 'package:dwds/dwds.dart';
import '../artifacts.dart';
import '../base/file_system.dart';
/// Provides paths to SDK files for dart SDK used in flutter.
class SdkWebConfigurationProvider extends SdkConfigurationProvider {
SdkWebConfigurationProvider(this._artifacts);
final Artifacts _artifacts;
SdkConfiguration? _configuration;
/// Create and validate configuration matching the default SDK layout.
/// Create configuration matching the default SDK layout.
@override
Future<SdkConfiguration> get configuration async {
if (_configuration == null) {
final String sdkDir = _artifacts.getHostArtifact(HostArtifact.flutterWebSdk).path;
final String weakSdkSummaryPath = _artifacts.getHostArtifact(HostArtifact.webPlatformDDCKernelDill).path;
final String soundSdkSummaryPath = _artifacts.getHostArtifact(HostArtifact.webPlatformDDCSoundKernelDill).path;
final String librariesPath = _artifacts.getHostArtifact(HostArtifact.flutterWebLibrariesJson).path;
_configuration = SdkConfiguration(
sdkDirectory: sdkDir,
weakSdkSummaryPath: weakSdkSummaryPath,
soundSdkSummaryPath: soundSdkSummaryPath,
librariesPath: librariesPath,
);
}
return _configuration!;
}
/// Validate that SDK configuration exists on disk.
static void validate(SdkConfiguration configuration, { required FileSystem fileSystem }) {
configuration.validateSdkDir(fileSystem: fileSystem);
configuration.validateSummaries(fileSystem: fileSystem);
configuration.validateLibrariesSpec(fileSystem: fileSystem);
}
}
......@@ -11,7 +11,7 @@ dependencies:
args: 2.4.0
browser_launcher: 1.1.1
dds: 2.7.5
dwds: 17.0.0
dwds: 18.0.0
completion: 1.0.1
coverage: 1.6.3
crypto: 3.0.2
......@@ -104,4 +104,4 @@ dartdoc:
# Exclude this package from the hosted API docs.
nodoc: true
# PUBSPEC CHECKSUM: f5e3
# PUBSPEC CHECKSUM: 73e4
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:dwds/dwds.dart';
import 'package:file/file.dart';
import 'package:file/memory.dart';
import 'package:flutter_tools/src/artifacts.dart';
import 'package:flutter_tools/src/isolated/sdk_web_configuration.dart';
import '../src/common.dart';
void main() {
late FileSystem fileSystem;
group('Flutter SDK configuration for web', () {
late SdkConfiguration configuration;
setUp(() async {
fileSystem = MemoryFileSystem.test();
fileSystem.directory('HostArtifact.flutterWebSdk').createSync();
fileSystem.file('HostArtifact.webPlatformDDCKernelDill').createSync();
fileSystem.file('HostArtifact.webPlatformDDCSoundKernelDill').createSync();
fileSystem.file('HostArtifact.flutterWebLibrariesJson').createSync();
final SdkWebConfigurationProvider provider =
SdkWebConfigurationProvider(Artifacts.test(fileSystem: fileSystem));
configuration = await provider.configuration;
});
testWithoutContext('can be validated', () {
SdkWebConfigurationProvider.validate(configuration, fileSystem: fileSystem);
});
testWithoutContext('is correct', () {
expect(configuration.sdkDirectory, 'HostArtifact.flutterWebSdk');
expect(configuration.weakSdkSummaryPath, 'HostArtifact.webPlatformDDCKernelDill');
expect(configuration.soundSdkSummaryPath, 'HostArtifact.webPlatformDDCSoundKernelDill');
expect(configuration.librariesPath, 'HostArtifact.flutterWebLibrariesJson');
expect(configuration.compilerWorkerPath, isNull);
});
});
}
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