From 3c0ffbb1443d019b0748626d4c9e536373493f2e Mon Sep 17 00:00:00 2001 From: Anna Gringauze Date: Fri, 27 Jan 2023 12:02:54 -0800 Subject: [PATCH 1/3] Validate only needed summaries in expression_compiler_service --- dwds/lib/src/services/expression_compiler_service.dart | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dwds/lib/src/services/expression_compiler_service.dart b/dwds/lib/src/services/expression_compiler_service.dart index 74cd13510..e94be84c3 100644 --- a/dwds/lib/src/services/expression_compiler_service.dart +++ b/dwds/lib/src/services/expression_compiler_service.dart @@ -71,7 +71,12 @@ class _Compiler { List experiments, bool verbose, ) async { - sdkConfiguration.validate(); + sdkConfiguration.validateSdkDir(); + if (soundNullSafety) { + sdkConfiguration.validateSoundSummaries(); + } else { + sdkConfiguration.validateWeakSummaries(); + } final librariesUri = sdkConfiguration.librariesUri!; final workerUri = sdkConfiguration.compilerWorkerUri!; From 2adf41bf9a51d7b0c22fb91852220c1a310fd6dc Mon Sep 17 00:00:00 2001 From: Anna Gringauze Date: Mon, 13 Feb 2023 13:46:26 -0800 Subject: [PATCH 2/3] Move test-only code out of the SDK layout --- dwds/CHANGELOG.md | 7 +- dwds/lib/sdk_configuration.dart | 10 ++ .../services/expression_compiler_service.dart | 10 +- dwds/lib/src/utilities/sdk_configuration.dart | 145 ++++------------ dwds/pubspec.yaml | 2 +- .../expression_compiler_service_test.dart | 5 +- dwds/test/fixtures/context.dart | 1 + dwds/test/fixtures/sdk_asset_generator.dart | 13 +- .../test/fixtures/test_sdk_configuration.dart | 44 +++++ dwds/test/fixtures/test_sdk_layout.dart | 159 ++++++++++++++++++ dwds/test/fixtures/utilities.dart | 46 ----- dwds/test/sdk_asset_generator_test.dart | 55 ++---- dwds/test/sdk_configuration_test.dart | 97 +++++------ frontend_server_common/lib/src/devfs.dart | 8 +- webdev/lib/src/serve/webdev_server.dart | 2 + 15 files changed, 336 insertions(+), 268 deletions(-) create mode 100644 dwds/lib/sdk_configuration.dart create mode 100644 dwds/test/fixtures/test_sdk_configuration.dart create mode 100644 dwds/test/fixtures/test_sdk_layout.dart diff --git a/dwds/CHANGELOG.md b/dwds/CHANGELOG.md index 607ce974c..6dcf8613d 100644 --- a/dwds/CHANGELOG.md +++ b/dwds/CHANGELOG.md @@ -1,4 +1,4 @@ -## 17.0.1-dev +## 18.0.0-dev - Cleanup `getObject` code for lists and maps. - Now works with offset `0` and `null` count. @@ -9,6 +9,11 @@ - Update `package:dds` constraint to `^2.7.1`. - Fill `BoundField.name` for records. - Display records as a container of fields. +- Remove test-only code from `sdk_configuration.dart`. + +**Breaking changes** +- Require `sdkConfigurationProvider` in `ExpressionCompilerService` + constructor. ## 17.0.0 diff --git a/dwds/lib/sdk_configuration.dart b/dwds/lib/sdk_configuration.dart new file mode 100644 index 000000000..1135d373a --- /dev/null +++ b/dwds/lib/sdk_configuration.dart @@ -0,0 +1,10 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +export 'src/utilities/sdk_configuration.dart' + show + SdkLayout, + SdkConfiguration, + SdkConfigurationProvider, + DefaultSdkConfigurationProvider; diff --git a/dwds/lib/src/services/expression_compiler_service.dart b/dwds/lib/src/services/expression_compiler_service.dart index c3482cbe9..639e21880 100644 --- a/dwds/lib/src/services/expression_compiler_service.dart +++ b/dwds/lib/src/services/expression_compiler_service.dart @@ -236,17 +236,15 @@ class ExpressionCompilerService implements ExpressionCompiler { final List experiments; final bool _verbose; - final SdkConfigurationProvider _sdkConfigurationProvider; + final SdkConfigurationProvider sdkConfigurationProvider; ExpressionCompilerService( this._address, this._port, { bool verbose = false, - SdkConfigurationProvider sdkConfigurationProvider = - const DefaultSdkConfigurationProvider(), + required this.sdkConfigurationProvider, this.experiments = const [], - }) : _verbose = verbose, - _sdkConfigurationProvider = sdkConfigurationProvider; + }) : _verbose = verbose; @override Future compileExpressionToJs( @@ -271,7 +269,7 @@ class ExpressionCompilerService implements ExpressionCompiler { await _port, moduleFormat, soundNullSafety, - await _sdkConfigurationProvider.configuration, + await sdkConfigurationProvider.configuration, experiments, _verbose, ); diff --git a/dwds/lib/src/utilities/sdk_configuration.dart b/dwds/lib/src/utilities/sdk_configuration.dart index 0402ba3cb..dce469196 100644 --- a/dwds/lib/src/utilities/sdk_configuration.dart +++ b/dwds/lib/src/utilities/sdk_configuration.dart @@ -32,145 +32,74 @@ abstract class SdkConfigurationProvider { Future get configuration; } -/// Sdk layout. +/// Dart SDK layout. /// /// Contains definition of the default SDK layout. /// We keep all the path constants in one place for ease of update. class SdkLayout { - static final sdkDir = p.dirname(p.dirname(Platform.resolvedExecutable)); - static final defaultSdkLayout = createDefault(sdkDir); - - static SdkLayout createDefault(String sdkDirectory) { - final sdkJsWeakFileName = 'dart_sdk.js'; - final sdkJsMapWeakFileName = 'dart_sdk.js.map'; - final sdkJsSoundFileName = 'dart_sdk_sound.js'; - final sdkJsMapSoundFileName = 'dart_sdk_sound.js.map'; - final sdkSummarySoundFileName = 'ddc_outline.dill'; - final sdkSummaryWeakFileName = 'ddc_outline_unsound.dill'; - final sdkFullDillSoundFileName = 'ddc_platform.dill'; - final sdkFullDillWeakFileName = 'ddc_platform_unsound.dill'; - - final sdkSummaryDirectory = p.join(sdkDirectory, 'lib', '_internal'); - final sdkJsDirectory = - p.join(sdkDirectory, 'lib', 'dev_compiler', 'kernel', 'amd'); - - final soundSummaryPath = - p.join(sdkSummaryDirectory, sdkSummarySoundFileName); - final soundFullDillPath = - p.join(sdkSummaryDirectory, sdkFullDillSoundFileName); - final soundJsPath = p.join(sdkJsDirectory, sdkJsSoundFileName); - final soundJsMapPath = p.join(sdkJsDirectory, sdkJsMapSoundFileName); - - final weakSummaryPath = p.join(sdkSummaryDirectory, sdkSummaryWeakFileName); - final weakFullDillPath = - p.join(sdkSummaryDirectory, sdkFullDillWeakFileName); - final weakJsPath = p.join(sdkJsDirectory, sdkJsWeakFileName); - final weakJsMapPath = p.join(sdkJsDirectory, sdkJsMapWeakFileName); - - final librariesPath = p.join(sdkDirectory, 'lib', 'libraries.json'); - final dartdevcSnapshotPath = - p.join(sdkDirectory, 'bin', 'snapshots', 'dartdevc.dart.snapshot'); - final kernelWorkerSnapshotPath = - p.join(sdkDirectory, 'bin', 'snapshots', 'kernel_worker.dart.snapshot'); - - return SdkLayout( - sdkJsWeakFileName: sdkJsWeakFileName, - sdkJsMapWeakFileName: sdkJsMapWeakFileName, - sdkJsSoundFileName: sdkJsSoundFileName, - sdkJsMapSoundFileName: sdkJsMapSoundFileName, - sdkSummarySoundFileName: sdkSummarySoundFileName, - sdkSummaryWeakFileName: sdkSummaryWeakFileName, - sdkFullDillSoundFileName: sdkFullDillSoundFileName, - sdkFullDillWeakFileName: sdkFullDillWeakFileName, - sdkDirectory: sdkDirectory, - soundSummaryPath: soundSummaryPath, - soundFullDillPath: soundFullDillPath, - soundJsPath: soundJsPath, - soundJsMapPath: soundJsMapPath, - weakSummaryPath: weakSummaryPath, - weakFullDillPath: weakFullDillPath, - weakJsPath: weakJsPath, - weakJsMapPath: weakJsMapPath, - librariesPath: librariesPath, - dartdevcSnapshotPath: dartdevcSnapshotPath, - kernelWorkerSnapshotPath: kernelWorkerSnapshotPath, - ); - } - - final String sdkJsWeakFileName; - final String sdkJsMapWeakFileName; - final String sdkJsSoundFileName; - final String sdkJsMapSoundFileName; - final String sdkSummarySoundFileName; - final String sdkSummaryWeakFileName; - final String sdkFullDillSoundFileName; - final String sdkFullDillWeakFileName; + static final defaultSdkDirectory = + p.dirname(p.dirname(Platform.resolvedExecutable)); + static SdkLayout defaultSdkLayout = + SdkLayout.createDefault(defaultSdkDirectory); final String sdkDirectory; - final String soundSummaryPath; - final String soundFullDillPath; - final String soundJsPath; - final String soundJsMapPath; - final String weakSummaryPath; - final String weakFullDillPath; - final String weakJsPath; - final String weakJsMapPath; + final String dartdevcSnapshotPath; - final String librariesPath; + SdkLayout.createDefault(String sdkDirectory) + : this( + sdkDirectory: sdkDirectory, + soundSummaryPath: p.join( + sdkDirectory, + 'lib', + '_internal', + 'ddc_outline.dill', + ), + weakSummaryPath: p.join( + sdkDirectory, + 'lib', + '_internal', + 'ddc_outline_unsound.dill', + ), + dartdevcSnapshotPath: p.join( + sdkDirectory, + 'bin', + 'snapshots', + 'dartdevc.dart.snapshot', + ), + ); - final String dartdevcSnapshotPath; - final String kernelWorkerSnapshotPath; - - SdkLayout({ - required this.sdkJsWeakFileName, - required this.sdkJsMapWeakFileName, - required this.sdkJsSoundFileName, - required this.sdkJsMapSoundFileName, - required this.sdkSummarySoundFileName, - required this.sdkSummaryWeakFileName, - required this.sdkFullDillSoundFileName, - required this.sdkFullDillWeakFileName, + const SdkLayout({ required this.sdkDirectory, required this.soundSummaryPath, - required this.soundFullDillPath, - required this.soundJsPath, - required this.soundJsMapPath, required this.weakSummaryPath, - required this.weakFullDillPath, - required this.weakJsPath, - required this.weakJsMapPath, - required this.librariesPath, required this.dartdevcSnapshotPath, - required this.kernelWorkerSnapshotPath, }); } -/// Data class describing the SDK layout. +/// Dart SDK configuration. /// /// Provides helpers to convert paths to uris that work on all platforms. /// -/// Call [validate] method to make sure the files in the configuration -/// layout exist before reading the files. class SdkConfiguration { static final defaultSdkLayout = SdkLayout.defaultSdkLayout; static final defaultConfiguration = - SdkConfiguration.fromSdkLayout(defaultSdkLayout); + SdkConfiguration.fromSdkLayout(SdkLayout.defaultSdkLayout); - String? sdkDirectory; - String? weakSdkSummaryPath; - String? soundSdkSummaryPath; - String? compilerWorkerPath; + final String? sdkDirectory; + final String? weakSdkSummaryPath; + final String? soundSdkSummaryPath; + final String? compilerWorkerPath; - SdkConfiguration({ + const SdkConfiguration({ this.sdkDirectory, this.weakSdkSummaryPath, this.soundSdkSummaryPath, this.compilerWorkerPath, }); - SdkConfiguration.empty() : this(); + const SdkConfiguration.empty() : this(); SdkConfiguration.fromSdkLayout(SdkLayout sdkLayout) : this( diff --git a/dwds/pubspec.yaml b/dwds/pubspec.yaml index 1e08f1074..43119a178 100644 --- a/dwds/pubspec.yaml +++ b/dwds/pubspec.yaml @@ -1,6 +1,6 @@ name: dwds # Every time this changes you need to run `dart run build_runner build`. -version: 17.0.1-dev +version: 18.0.0-dev description: >- A service that proxies between the Chrome debug protocol and the Dart VM service protocol. diff --git a/dwds/test/expression_compiler_service_test.dart b/dwds/test/expression_compiler_service_test.dart index cf7ac9b14..75eb4aa96 100644 --- a/dwds/test/expression_compiler_service_test.dart +++ b/dwds/test/expression_compiler_service_test.dart @@ -13,7 +13,6 @@ import 'package:dwds/src/services/expression_compiler_service.dart'; import 'package:dwds/src/utilities/sdk_configuration.dart'; import 'package:dwds/src/utilities/server.dart'; import 'package:logging/logging.dart'; -import 'package:path/path.dart' as p; import 'package:shelf/shelf.dart'; import 'package:test/test.dart'; @@ -49,8 +48,8 @@ void main() async { final packages = outputDir.uri.resolve('package_config.json'); final kernel = outputDir.uri.resolve('try.full.dill'); final executable = Platform.resolvedExecutable; - final binDir = p.dirname(executable); - final dartdevc = p.join(binDir, 'snapshots', 'dartdevc.dart.snapshot'); + final dartdevc = + SdkConfiguration.defaultConfiguration.compilerWorkerPath!; // redirect logs for testing _output = StreamController.broadcast(); diff --git a/dwds/test/fixtures/context.dart b/dwds/test/fixtures/context.dart index ecfc485f8..9eca00156 100644 --- a/dwds/test/fixtures/context.dart +++ b/dwds/test/fixtures/context.dart @@ -38,6 +38,7 @@ import 'package:webkit_inspection_protocol/webkit_inspection_protocol.dart'; import 'logging.dart'; import 'server.dart'; +import 'test_sdk_configuration.dart'; import 'utilities.dart'; final _exeExt = Platform.isWindows ? '.exe' : ''; diff --git a/dwds/test/fixtures/sdk_asset_generator.dart b/dwds/test/fixtures/sdk_asset_generator.dart index 3aa376d91..83f977ab6 100644 --- a/dwds/test/fixtures/sdk_asset_generator.dart +++ b/dwds/test/fixtures/sdk_asset_generator.dart @@ -1,12 +1,13 @@ import 'dart:convert'; import 'dart:io'; -import 'package:dwds/src/utilities/sdk_configuration.dart'; import 'package:file/file.dart'; import 'package:file/local.dart'; import 'package:logging/logging.dart'; import 'package:path/path.dart' as p; +import 'test_sdk_layout.dart'; + /// Generates sdk.js, sdk.map, sdk full dill, and sdk summary files. /// /// Generates following missing assets if needed: @@ -19,7 +20,7 @@ class SdkAssetGenerator { final FileSystem fileSystem; final bool verboseCompiler; - late final SdkLayout sdkLayout; + late final TestSdkLayout sdkLayout; SdkAssetGenerator({ this.fileSystem = const LocalFileSystem(), @@ -69,8 +70,8 @@ class SdkAssetGenerator { // Files to generate final jsPath = soundNullSafety - ? p.join(outputDir.path, sdkLayout.sdkJsSoundFileName) - : p.join(outputDir.path, sdkLayout.sdkJsWeakFileName); + ? p.join(outputDir.path, sdkLayout.soundJsFileName) + : p.join(outputDir.path, sdkLayout.weakJsFileName); final jsMapPath = p.setExtension(jsPath, '.js.map'); final fullDillPath = p.setExtension(jsPath, '.dill'); @@ -158,8 +159,8 @@ class SdkAssetGenerator { // Generate missing files. outputDir = fileSystem.systemTempDirectory.createTempSync(); final summaryPath = soundNullSafety - ? p.join(outputDir.path, sdkLayout.sdkSummarySoundFileName) - : p.join(outputDir.path, sdkLayout.sdkSummaryWeakFileName); + ? p.join(outputDir.path, sdkLayout.soundSummaryFileName) + : p.join(outputDir.path, sdkLayout.weakSummaryFileName); _logger.info('Generating SDK summary files...'); diff --git a/dwds/test/fixtures/test_sdk_configuration.dart b/dwds/test/fixtures/test_sdk_configuration.dart new file mode 100644 index 000000000..29c35bb6d --- /dev/null +++ b/dwds/test/fixtures/test_sdk_configuration.dart @@ -0,0 +1,44 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// TODO:(annagrin) Move to a test_common package. +import 'package:dwds/src/utilities/sdk_configuration.dart'; + +import 'sdk_asset_generator.dart'; +import 'test_sdk_layout.dart'; + +/// Implementation for SDK configuration for tests that can generate +/// missing assets. +/// +/// - Generate SDK js, source map, and full dill for weak and sound +/// modes (normally included in flutter SDK or produced by build). +/// - Need to generate SDK summary for weak null safety mode as it +/// is not provided by the SDK installation. +/// +/// TODO(annagrin): update to only generating missing sound artifacts +/// for frontend server after we have no uses of weak null safety. +class TestSdkConfigurationProvider extends SdkConfigurationProvider { + final bool _verboseCompiler; + SdkConfiguration? _configuration; + + final sdkLayout = TestSdkLayout.defaultSdkLayout; + + TestSdkConfigurationProvider({bool verboseCompiler = false}) + : _verboseCompiler = verboseCompiler; + + @override + Future get configuration async => + _configuration ??= await _create(); + + /// Generate missing assets in the default SDK layout. + Future _create() async { + final assetGenerator = SdkAssetGenerator( + sdkLayout: sdkLayout, + verboseCompiler: _verboseCompiler, + ); + + await assetGenerator.generateSdkAssets(); + return TestSdkLayout.defaultSdkConfiguration; + } +} diff --git a/dwds/test/fixtures/test_sdk_layout.dart b/dwds/test/fixtures/test_sdk_layout.dart new file mode 100644 index 000000000..488fdd009 --- /dev/null +++ b/dwds/test/fixtures/test_sdk_layout.dart @@ -0,0 +1,159 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// TODO:(annagrin) Move to a test_common package. +import 'package:dwds/src/utilities/sdk_configuration.dart'; +import 'package:path/path.dart' as p; + +/// Test Dart SDK layout. +/// +/// Contains definition of the default SDK layout required for tests. +/// We keep all the path constants in one place for ease of update. +class TestSdkLayout { + static final defaultSdkDirectory = SdkLayout.defaultSdkDirectory; + static TestSdkLayout defaultSdkLayout = + TestSdkLayout.createDefault(defaultSdkDirectory); + static SdkConfiguration defaultSdkConfiguration = + createConfiguration(defaultSdkLayout); + + factory TestSdkLayout.createDefault(String sdkDirectory) => + TestSdkLayout.createDefaultFromSdkLayout( + SdkLayout.createDefault(sdkDirectory)); + + factory TestSdkLayout.createDefaultFromSdkLayout(SdkLayout sdkLayout) => + TestSdkLayout( + sdkDirectory: sdkLayout.sdkDirectory, + soundSummaryPath: sdkLayout.soundSummaryPath, + soundFullDillPath: p.join( + sdkLayout.sdkDirectory, + 'lib', + '_internal', + 'ddc_platform.dill', + ), + soundJsPath: p.join( + sdkLayout.sdkDirectory, + 'lib', + 'dev_compiler', + 'kernel', + 'amd', + 'dart_sdk.js', + ), + soundJsMapPath: p.join( + sdkLayout.sdkDirectory, + 'lib', + 'dev_compiler', + 'kernel', + 'amd', + 'dart_sdk.js.map', + ), + weakSummaryPath: sdkLayout.weakSummaryPath, + weakFullDillPath: p.join( + sdkLayout.sdkDirectory, + 'lib', + '_internal', + 'ddc_platform_unsound.dill', + ), + weakJsPath: p.join( + sdkLayout.sdkDirectory, + 'lib', + 'dev_compiler', + 'kernel', + 'amd', + 'dart_sdk_unsound.js', + ), + weakJsMapPath: p.join( + sdkLayout.sdkDirectory, + 'lib', + 'dev_compiler', + 'kernel', + 'amd', + 'dart_sdk_unsound.js.map', + ), + requireJsPath: p.join( + sdkLayout.sdkDirectory, + 'lib', + 'dev_compiler', + 'amd', + 'require.js', + ), + stackTraceMapperPath: p.join( + sdkLayout.sdkDirectory, + 'lib', + 'dev_compiler', + 'web', + 'dart_stack_trace_mapper.js', + ), + dartPath: p.join(sdkLayout.sdkDirectory, 'bin', 'dart'), + frontendServerSnapshotPath: p.join( + sdkLayout.sdkDirectory, + 'bin', + 'snapshots', + 'frontend_server.dart.snapshot', + ), + dartdevcSnapshotPath: sdkLayout.dartdevcSnapshotPath, + kernelWorkerSnapshotPath: p.join( + sdkLayout.sdkDirectory, + 'bin', + 'snapshots', + 'kernel_worker.dart.snapshot', + ), + ); + + final String sdkDirectory; + + String get soundJsFileName => p.basename(soundJsPath); + String get soundJsMapFileName => p.basename(soundJsMapPath); + String get soundSummaryFileName => p.basename(soundSummaryPath); + String get soundFullDillFileName => p.basename(soundFullDillPath); + + final String soundJsPath; + final String soundJsMapPath; + final String soundSummaryPath; + final String soundFullDillPath; + + String get weakJsFileName => p.basename(weakJsPath); + String get weakJsMapFileName => p.basename(weakJsMapPath); + String get weakSummaryFileName => p.basename(weakSummaryPath); + String get weakFullDillFileName => p.basename(weakFullDillPath); + + final String weakJsPath; + final String weakJsMapPath; + final String weakSummaryPath; + final String weakFullDillPath; + + final String requireJsPath; + final String stackTraceMapperPath; + + final String dartPath; + final String frontendServerSnapshotPath; + final String dartdevcSnapshotPath; + final String kernelWorkerSnapshotPath; + + const TestSdkLayout({ + required this.sdkDirectory, + required this.soundJsPath, + required this.soundJsMapPath, + required this.soundSummaryPath, + required this.soundFullDillPath, + required this.weakJsPath, + required this.weakJsMapPath, + required this.weakSummaryPath, + required this.weakFullDillPath, + required this.requireJsPath, + required this.stackTraceMapperPath, + required this.dartPath, + required this.frontendServerSnapshotPath, + required this.dartdevcSnapshotPath, + required this.kernelWorkerSnapshotPath, + }); + + /// Creates configuration from sdk layout. + static SdkConfiguration createConfiguration(TestSdkLayout sdkLayout) => + SdkConfiguration( + sdkDirectory: sdkLayout.sdkDirectory, + weakSdkSummaryPath: sdkLayout.weakSummaryPath, + soundSdkSummaryPath: sdkLayout.soundSummaryPath, + compilerWorkerPath: sdkLayout.dartdevcSnapshotPath, + ); +} diff --git a/dwds/test/fixtures/utilities.dart b/dwds/test/fixtures/utilities.dart index 18e5a2a2e..1f153da02 100644 --- a/dwds/test/fixtures/utilities.dart +++ b/dwds/test/fixtures/utilities.dart @@ -7,11 +7,8 @@ import 'dart:io'; import 'package:build_daemon/client.dart'; import 'package:build_daemon/constants.dart'; import 'package:build_daemon/data/server_log.dart'; -import 'package:dwds/src/utilities/sdk_configuration.dart'; import 'package:path/path.dart' as p; -import 'sdk_asset_generator.dart'; - const webdevDirName = 'webdev'; const dwdsDirName = 'dwds'; const fixturesDirName = 'fixtures'; @@ -156,46 +153,3 @@ Future retryFnAsync( failureMessage: failureMessage, ); } - -/// Implementation for SDK configuration for tests that can generate -/// missing assets. -/// -/// - Generate SDK js, source map, and full dill for weak and sound -/// modes (normally included in flutter SDK or produced by build). -/// - Need to generate SDK summary for weak null safety mode as it -/// is not provided by the SDK installation. -/// -/// TODO(annagrin): update to only generating missing sound artifacts -/// for frontend server after we have no uses of weak null safety. -class TestSdkConfigurationProvider extends SdkConfigurationProvider { - final bool _verboseCompiler; - SdkConfiguration? _configuration; - - TestSdkConfigurationProvider({bool verboseCompiler = false}) - : _verboseCompiler = verboseCompiler; - - @override - Future get configuration async => - _configuration ??= await _create(); - - /// Generate missing assets in the default SDK layout. - Future _create() async { - final sdk = SdkConfiguration.defaultConfiguration; - final sdkLayout = SdkConfiguration.defaultSdkLayout; - - final assetGenerator = SdkAssetGenerator( - sdkLayout: sdkLayout, - verboseCompiler: _verboseCompiler, - ); - - if (sdkLayout.soundSummaryPath != sdk.soundSdkSummaryPath) { - throw StateError('Invalid asset path ${sdkLayout.soundSummaryPath}'); - } - if (sdkLayout.weakSummaryPath != sdk.weakSdkSummaryPath) { - throw StateError('Invalid asset path ${sdkLayout.weakSummaryPath}'); - } - - await assetGenerator.generateSdkAssets(); - return sdk; - } -} diff --git a/dwds/test/sdk_asset_generator_test.dart b/dwds/test/sdk_asset_generator_test.dart index d23be5f3e..833f9a420 100644 --- a/dwds/test/sdk_asset_generator_test.dart +++ b/dwds/test/sdk_asset_generator_test.dart @@ -7,12 +7,12 @@ import 'dart:io'; -import 'package:dwds/src/utilities/sdk_configuration.dart'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; import 'fixtures/logging.dart'; import 'fixtures/sdk_asset_generator.dart'; +import 'fixtures/test_sdk_layout.dart'; void main() { group('SDK asset generator', () { @@ -39,26 +39,28 @@ void main() { tempDir = Directory.systemTemp.createTempSync(); sdkDirectory = tempDir.path; - soundSdkSummaryPath = _soundSdkSummaryPath(sdkDirectory); - compilerWorkerPath = _compilerWorkerPath(sdkDirectory); + final copySdkLayout = TestSdkLayout.createDefault(sdkDirectory); + + soundSdkSummaryPath = copySdkLayout.soundSummaryPath; + compilerWorkerPath = copySdkLayout.dartdevcSnapshotPath; // Copy the SDK directory into a temp directory. - await _copy(SdkLayout.sdkDir, sdkDirectory); + await _copy(TestSdkLayout.defaultSdkDirectory, sdkDirectory); // Simulate missing sound assets. - soundSdkFullDillPath = _soundSdkFullDillPath(sdkDirectory); - soundSdkJsPath = _soundSdkJsPath(sdkDirectory); - soundSdkJsMapPath = _soundSdkJsMapPath(sdkDirectory); + soundSdkFullDillPath = copySdkLayout.soundFullDillPath; + soundSdkJsPath = copySdkLayout.soundJsPath; + soundSdkJsMapPath = copySdkLayout.soundJsMapPath; _deleteIfExists(soundSdkFullDillPath); _deleteIfExists(soundSdkJsPath); _deleteIfExists(soundSdkJsMapPath); // Simulate missing weak assets. - weakSdkSummaryPath = _weakSdkSummaryPath(sdkDirectory); - weakSdkFullDillPath = _weakSdkFullDillPath(sdkDirectory); - weakSdkJsPath = _weakSdkJsPath(sdkDirectory); - weakSdkJsMapPath = _weakSdkJsMapPath(sdkDirectory); + weakSdkSummaryPath = copySdkLayout.weakSummaryPath; + weakSdkFullDillPath = copySdkLayout.weakFullDillPath; + weakSdkJsPath = copySdkLayout.weakJsPath; + weakSdkJsMapPath = copySdkLayout.weakJsMapPath; _deleteIfExists(weakSdkSummaryPath); _deleteIfExists(weakSdkFullDillPath); @@ -72,8 +74,8 @@ void main() { test('Can generate missing SDK assets and validate SDK configuration', () async { - final sdkLayout = SdkLayout.createDefault(sdkDirectory); - final configuration = SdkConfiguration.fromSdkLayout(sdkLayout); + final sdkLayout = TestSdkLayout.createDefault(sdkDirectory); + final configuration = TestSdkLayout.createConfiguration(sdkLayout); final assetGenerator = SdkAssetGenerator(sdkLayout: sdkLayout, verboseCompiler: true); @@ -111,33 +113,6 @@ void main() { }); } -String _weakSdkSummaryPath(String sdkDir) => - p.join(sdkDir, 'lib', '_internal', 'ddc_outline_unsound.dill'); - -String _soundSdkSummaryPath(String sdkDir) => - p.join(sdkDir, 'lib', '_internal', 'ddc_outline.dill'); - -String _weakSdkFullDillPath(String sdkDir) => - p.join(sdkDir, 'lib', '_internal', 'ddc_platform_unsound.dill'); - -String _soundSdkFullDillPath(String sdkDir) => - p.join(sdkDir, 'lib', '_internal', 'ddc_platform.dill'); - -String _weakSdkJsPath(String sdkDir) => - p.join(sdkDir, 'lib', 'dev_compiler', 'kernel', 'amd', 'dart_sdk.js'); - -String _soundSdkJsPath(String sdkDir) => - p.join(sdkDir, 'lib', 'dev_compiler', 'kernel', 'amd', 'dart_sdk_sound.js'); - -String _weakSdkJsMapPath(String sdkDir) => - p.join(sdkDir, 'lib', 'dev_compiler', 'kernel', 'amd', 'dart_sdk.js.map'); - -String _soundSdkJsMapPath(String sdkDir) => p.join( - sdkDir, 'lib', 'dev_compiler', 'kernel', 'amd', 'dart_sdk_sound.js.map'); - -String _compilerWorkerPath(String sdkDir) => - p.join(sdkDir, 'bin', 'snapshots', 'dartdevc.dart.snapshot'); - Matcher _exists = predicate((String path) => File(path).existsSync()); void _deleteIfExists(String path) { diff --git a/dwds/test/sdk_configuration_test.dart b/dwds/test/sdk_configuration_test.dart index 2daebfc72..22ae6023f 100644 --- a/dwds/test/sdk_configuration_test.dart +++ b/dwds/test/sdk_configuration_test.dart @@ -25,7 +25,7 @@ void main() { }); test('Cannot validate an empty configuration layout', () async { - final emptyConfiguration = SdkConfiguration(); + final emptyConfiguration = SdkConfiguration.empty(); expect(() => emptyConfiguration.validateSdkDir(), _throwsDoesNotExistException); expect(() => emptyConfiguration.validate(), _throwsDoesNotExistException); @@ -49,10 +49,12 @@ void main() { await DefaultSdkConfigurationProvider().configuration; final sdkDirectory = outputDir.path; - final summariesDir = p.join(sdkDirectory, 'summaries'); - final weakSdkSummaryPath = p.join(summariesDir, 'ddc_sdk.dill'); - final soundSdkSummaryPath = - p.join(summariesDir, 'ddc_outline_sound.dill'); + final sdkLayout = TestSdkLayout(sdkDirectory); + final sdkConfiguration = TestSdkLayout.createConfiguration(sdkLayout); + + final weakSdkSummaryPath = sdkLayout.weakSummaryPath; + final soundSdkSummaryPath = sdkLayout.soundSummaryPath; + final summariesDir = p.dirname(soundSdkSummaryPath); Directory(summariesDir).createSync(recursive: true); File(defaultSdkConfiguration.weakSdkSummaryPath!) @@ -60,20 +62,13 @@ void main() { File(defaultSdkConfiguration.soundSdkSummaryPath!) .copySync(soundSdkSummaryPath); - final workerDir = p.join(sdkDirectory, 'snapshots'); - final compilerWorkerPath = p.join(workerDir, 'dartdevc.dart.snapshot'); + final compilerWorkerPath = sdkLayout.compilerWorkerPath; + final workerDir = p.dirname(compilerWorkerPath); Directory(workerDir).createSync(recursive: true); File(defaultSdkConfiguration.compilerWorkerPath!) .copySync(compilerWorkerPath); - final sdkConfiguration = SdkConfiguration( - sdkDirectory: sdkDirectory, - soundSdkSummaryPath: soundSdkSummaryPath, - weakSdkSummaryPath: weakSdkSummaryPath, - compilerWorkerPath: compilerWorkerPath, - ); - expect(sdkConfiguration.sdkDirectory, equals(sdkDirectory)); expect(sdkConfiguration.weakSdkSummaryPath, equals(weakSdkSummaryPath)); expect(sdkConfiguration.soundSdkSummaryPath, equals(soundSdkSummaryPath)); @@ -84,20 +79,10 @@ void main() { }); test('Cannot validate non-existing configuration layout', () async { - final sdkDir = outputDir.path; - final summariesDir = p.join(sdkDir, 'fakesummaries'); - final weakSdkSummaryPath = p.join(summariesDir, 'ddc_sdk.dill'); - final soundSdkSummaryPath = - p.join(summariesDir, 'ddc_outline_sound.dill'); - final workerDir = p.join(sdkDir, 'fakesnapshots'); - final compilerWorkerPath = p.join(workerDir, 'dartdevc.dart.snapshot'); - - final sdkConfiguration = SdkConfiguration( - sdkDirectory: sdkDir, - soundSdkSummaryPath: soundSdkSummaryPath, - weakSdkSummaryPath: weakSdkSummaryPath, - compilerWorkerPath: compilerWorkerPath, - ); + final sdkDirectory = outputDir.path; + + final sdkLayout = TestSdkLayout(sdkDirectory); + final sdkConfiguration = TestSdkLayout.createConfiguration(sdkLayout); sdkConfiguration.validateSdkDir(); expect(() => sdkConfiguration.validate(), _throwsDoesNotExistException); @@ -109,46 +94,52 @@ void main() { final root = '/root'; final sdkDirectory = root; - final soundSdkSummaryPath = _soundSdkSummaryPath(sdkDirectory); - final weakSdkSummaryPath = _weakSdkSummaryPath(sdkDirectory); - final librariesPath = _librariesPath(sdkDirectory); - final compilerWorkerPath = _compilerWorkerPath(root); + + final sdkLayout = SdkLayout.createDefault(sdkDirectory); + final sdkConfiguration = SdkConfiguration.fromSdkLayout(sdkLayout); + final soundSdkSummaryPath = sdkLayout.soundSummaryPath; + final weakSdkSummaryPath = sdkLayout.weakSummaryPath; + final compilerWorkerPath = sdkLayout.dartdevcSnapshotPath; setUp(() async { fs = MemoryFileSystem(); await fs.directory(sdkDirectory).create(recursive: true); await fs.file(soundSdkSummaryPath).create(recursive: true); await fs.file(weakSdkSummaryPath).create(recursive: true); - await fs.file(librariesPath).create(recursive: true); await fs.file(compilerWorkerPath).create(recursive: true); }); test('Can create and validate default SDK configuration', () async { - final configuration = SdkConfiguration( - sdkDirectory: sdkDirectory, - soundSdkSummaryPath: soundSdkSummaryPath, - weakSdkSummaryPath: weakSdkSummaryPath, - compilerWorkerPath: compilerWorkerPath, - ); - - expect(configuration.sdkDirectory, equals(sdkDirectory)); - expect(configuration.soundSdkSummaryPath, equals(soundSdkSummaryPath)); - expect(configuration.weakSdkSummaryPath, equals(weakSdkSummaryPath)); - expect(configuration.compilerWorkerPath, equals(compilerWorkerPath)); + expect(sdkConfiguration.sdkDirectory, equals(sdkDirectory)); + expect(sdkConfiguration.soundSdkSummaryPath, equals(soundSdkSummaryPath)); + expect(sdkConfiguration.weakSdkSummaryPath, equals(weakSdkSummaryPath)); + expect(sdkConfiguration.compilerWorkerPath, equals(compilerWorkerPath)); - configuration.validateSdkDir(fileSystem: fs); - configuration.validate(fileSystem: fs); + sdkConfiguration.validateSdkDir(fileSystem: fs); + sdkConfiguration.validate(fileSystem: fs); }); }); } -String _weakSdkSummaryPath(String sdkDir) => - p.join(sdkDir, 'lib', '_internal', 'ddc_sdk.dill'); +class TestSdkLayout { + final String sdkDirectory; -String _soundSdkSummaryPath(String sdkDir) => - p.join(sdkDir, 'lib', '_internal', 'ddc_outline_sound.dill'); + static SdkConfiguration createConfiguration(TestSdkLayout sdkLayout) => + SdkConfiguration( + sdkDirectory: sdkLayout.sdkDirectory, + soundSdkSummaryPath: sdkLayout.soundSummaryPath, + weakSdkSummaryPath: sdkLayout.weakSummaryPath, + compilerWorkerPath: sdkLayout.compilerWorkerPath, + ); + + TestSdkLayout(this.sdkDirectory); -String _librariesPath(String sdkDir) => p.join(sdkDir, 'lib', 'libraries.json'); + String get weakSummaryPath => + p.join(sdkDirectory, 'summaries', 'unsound.dill'); -String _compilerWorkerPath(String binDir) => - p.join(binDir, 'snapshots', 'dartdevc.dart.snapshot'); + String get soundSummaryPath => + p.join(sdkDirectory, 'summaries', 'sound.dill'); + + String get compilerWorkerPath => + p.join(sdkDirectory, 'snapshots', 'test.snapshot'); +} diff --git a/frontend_server_common/lib/src/devfs.dart b/frontend_server_common/lib/src/devfs.dart index 22c021205..fd00c052f 100644 --- a/frontend_server_common/lib/src/devfs.dart +++ b/frontend_server_common/lib/src/devfs.dart @@ -139,28 +139,28 @@ class WebDevFS { dartWebSdkPath, 'kernel', 'amd', - 'dart_sdk.js', + 'dart_sdk_unsound.js', )); File get dartSdkSound => fileSystem.file(fileSystem.path.join( dartWebSdkPath, 'kernel', 'amd', - 'dart_sdk_sound.js', + 'dart_sdk.js', )); File get dartSdkSourcemap => fileSystem.file(fileSystem.path.join( dartWebSdkPath, 'kernel', 'amd', - 'dart_sdk.js.map', + 'dart_sdk_unsound.js.map', )); File get dartSdkSourcemapSound => fileSystem.file(fileSystem.path.join( dartWebSdkPath, 'kernel', 'amd', - 'dart_sdk_sound.js.map', + 'dart_sdk.js.map', )); File get stackTraceMapper => fileSystem.file(fileSystem.path.join( diff --git a/webdev/lib/src/serve/webdev_server.dart b/webdev/lib/src/serve/webdev_server.dart index 54789bb86..c084ebee6 100644 --- a/webdev/lib/src/serve/webdev_server.dart +++ b/webdev/lib/src/serve/webdev_server.dart @@ -9,6 +9,7 @@ import 'package:build_daemon/data/build_status.dart' as daemon; import 'package:dds/devtools_server.dart'; import 'package:dwds/data/build_result.dart'; import 'package:dwds/dwds.dart'; +import 'package:dwds/sdk_configuration.dart'; import 'package:http/http.dart' as http; import 'package:http/io_client.dart'; import 'package:http_multi_server/http_multi_server.dart'; @@ -130,6 +131,7 @@ class WebDevServer { options.port, verbose: options.configuration.verbose, experiments: options.configuration.experiments, + sdkConfigurationProvider: const DefaultSdkConfigurationProvider(), ); } var shouldServeDevTools = From 556b9ad9d6d2c6117ed81e45afdcc305a34383eb Mon Sep 17 00:00:00 2001 From: Anna Gringauze Date: Mon, 13 Feb 2023 13:55:05 -0800 Subject: [PATCH 3/3] build --- dwds/lib/src/injected/client.js | 132 ++++++++++++++++---------------- dwds/lib/src/version.dart | 2 +- 2 files changed, 69 insertions(+), 65 deletions(-) diff --git a/dwds/lib/src/injected/client.js b/dwds/lib/src/injected/client.js index 53d06e750..33438abd8 100644 --- a/dwds/lib/src/injected/client.js +++ b/dwds/lib/src/injected/client.js @@ -1,4 +1,4 @@ -// Generated by dart2js (NullSafetyMode.sound, csp, deferred-serialization, intern-composite-values), the Dart to JavaScript compiler version: 3.0.0-187.0.dev. +// Generated by dart2js (NullSafetyMode.sound, csp, deferred-serialization, intern-composite-values), the Dart to JavaScript compiler version: 3.0.0-218.0.dev. // The code supports the following hooks: // dartPrint(message): // if this function is defined it is called instead of the Dart [print] @@ -2132,17 +2132,18 @@ return A.createRuntimeType(rti == null ? A.instanceType(object) : rti); }, createRuntimeType(rti) { - var s, starErasedRecipe, starErasedRti, - type = rti._cachedRuntimeType; - if (type != null) - return type; - s = rti._canonicalRecipe; - starErasedRecipe = s.replace(/\*/g, ""); + var t1 = rti._cachedRuntimeType; + return t1 == null ? rti._cachedRuntimeType = A._createRuntimeType(rti) : t1; + }, + _createRuntimeType(rti) { + var starErasedRti, t1, + s = rti._canonicalRecipe, + starErasedRecipe = s.replace(/\*/g, ""); if (starErasedRecipe === s) return rti._cachedRuntimeType = new A._Type(rti); starErasedRti = A._Universe_eval(init.typeUniverse, starErasedRecipe, true); - type = starErasedRti._cachedRuntimeType; - return rti._cachedRuntimeType = type == null ? starErasedRti._cachedRuntimeType = new A._Type(starErasedRti) : type; + t1 = starErasedRti._cachedRuntimeType; + return t1 == null ? starErasedRti._cachedRuntimeType = A._createRuntimeType(starErasedRti) : t1; }, typeLiteral(recipe) { return A.createRuntimeType(A._Universe_eval(init.typeUniverse, recipe, false)); @@ -7572,30 +7573,6 @@ } return dartProxy; }, - _convertDartFunctionFast(f) { - var ret, - existing = f.$dart_jsFunction; - if (existing != null) - return existing; - ret = function(_call, f) { - return function() { - return _call(f, Array.prototype.slice.apply(arguments)); - }; - }(A._callDartFunctionFast, f); - ret[$.$get$DART_CLOSURE_PROPERTY_NAME()] = f; - f.$dart_jsFunction = ret; - return ret; - }, - _callDartFunctionFast(callback, $arguments) { - type$.List_dynamic._as($arguments); - return A.Function_apply(type$.Function._as(callback), $arguments, null); - }, - allowInterop(f, $F) { - if (typeof f == "function") - return f; - else - return $F._as(A._convertDartFunctionFast(f)); - }, JsObject__convertDataTree__convert: function JsObject__convertDataTree__convert(t0) { this._convertedObjects = t0; }, @@ -7622,6 +7599,30 @@ }, _JsArray_JsObject_ListMixin: function _JsArray_JsObject_ListMixin() { }, + _convertDartFunctionFast(f) { + var ret, + existing = f.$dart_jsFunction; + if (existing != null) + return existing; + ret = function(_call, f) { + return function() { + return _call(f, Array.prototype.slice.apply(arguments)); + }; + }(A._callDartFunctionFast, f); + ret[$.$get$DART_CLOSURE_PROPERTY_NAME()] = f; + f.$dart_jsFunction = ret; + return ret; + }, + _callDartFunctionFast(callback, $arguments) { + type$.List_dynamic._as($arguments); + return A.Function_apply(type$.Function._as(callback), $arguments, null); + }, + allowInterop(f, $F) { + if (typeof f == "function") + return f; + else + return $F._as(A._convertDartFunctionFast(f)); + }, promiseToFuture(jsPromise, $T) { var t1 = new A._Future($.Zone__current, $T._eval$1("_Future<0>")), completer = new A._AsyncCompleter(t1, $T._eval$1("_AsyncCompleter<0>")); @@ -8014,7 +8015,7 @@ t2.add$1(0, new A.DoubleSerializer(A.BuiltList_BuiltList$from([B.Type_double_K1J], t1))); t2.add$1(0, new A.DurationSerializer(A.BuiltList_BuiltList$from([B.Type_Duration_SnA], t1))); t2.add$1(0, new A.IntSerializer(A.BuiltList_BuiltList$from([B.Type_int_tHn], t1))); - t2.add$1(0, new A.Int64Serializer(A.BuiltList_BuiltList$from([B.Type_Int64_gc6], t1))); + t2.add$1(0, new A.Int64Serializer(A.BuiltList_BuiltList$from([B.Type_Int64_ww8], t1))); t2.add$1(0, new A.JsonObjectSerializer(A.BuiltList_BuiltList$from([B.Type_JsonObject_gyf, B.Type_BoolJsonObject_8HQ, B.Type_ListJsonObject_yPV, B.Type_MapJsonObject_bBG, B.Type_NumJsonObject_H9C, B.Type_StringJsonObject_GAC], t1))); t2.add$1(0, new A.NullSerializer(A.BuiltList_BuiltList$from([B.Type_Null_Yyn], t1))); t2.add$1(0, new A.NumSerializer(A.BuiltList_BuiltList$from([B.Type_num_cv7], t1))); @@ -8458,38 +8459,28 @@ }, safeUnawaited_closure: function safeUnawaited_closure() { }, - Int32__decodeDigit(c) { - if (c >= 48 && c <= 57) - return c - 48; - else if (c >= 97 && c <= 122) - return c - 97 + 10; - else if (c >= 65 && c <= 90) - return c - 65 + 10; - else - return -1; - }, - Int64__parseRadix(s, radix) { - var i, negative, d0, d1, d2, c, digit, d00, d10, _null = null, - t1 = s.length; - if (0 < t1 && s[0] === "-") { + Int64__parseRadix(s, radix, throwOnError) { + var i, negative, t1, d0, d1, d2, digit, d00, d10; + if (B.JSString_methods.startsWith$1(s, "-")) { i = 1; negative = true; } else { i = 0; negative = false; } + t1 = s.length; if (i >= t1) - throw A.wrapException(A.FormatException$("No digits in '" + s + "'", _null, _null)); + throw A.wrapException(A.FormatException$("No digits", s, i)); for (d0 = 0, d1 = 0, d2 = 0; i < t1; ++i, d1 = d10, d0 = d00) { - c = B.JSString_methods._codeUnitAt$1(s, i); - digit = A.Int32__decodeDigit(c); - if (digit < 0 || digit >= radix) - throw A.wrapException(A.FormatException$("Non-radix char code: " + c, _null, _null)); - d0 = d0 * radix + digit; - d00 = d0 & 4194303; - d1 = d1 * radix + B.JSInt_methods._shrOtherPositive$1(d0, 22); - d10 = d1 & 4194303; - d2 = d2 * radix + (d1 >>> 22) & 1048575; + digit = A.decodeDigit(B.JSString_methods._codeUnitAt$1(s, i)); + if (digit < radix) { + d0 = d0 * radix + digit; + d00 = d0 & 4194303; + d1 = d1 * radix + B.JSInt_methods._shrOtherPositive$1(d0, 22); + d10 = d1 & 4194303; + d2 = d2 * radix + (d1 >>> 22) & 1048575; + } else + throw A.wrapException(A.FormatException$("Not radix digit", s, i)); } if (negative) return A.Int64__sub(0, 0, 0, d0, d1, d2); @@ -8515,7 +8506,7 @@ return value; else if (A._isInt(value)) return A.Int64_Int64(value); - throw A.wrapException(A.ArgumentError$value(value, null, null)); + throw A.wrapException(A.ArgumentError$value(value, "other", "not an int, Int32 or Int64")); }, Int64__toRadixStringUnsigned(radix, d0, d1, d2, sign) { var d4, d3, fatRadix, chunk1, chunk2, chunk3, q, q0, q1, q2, q3, chunk10, residue; @@ -9056,6 +9047,17 @@ } throw "Unable to print message: " + String(string); }, + decodeDigit(c) { + var letter, + digit = c ^ 48; + if (digit < 10) + return digit; + letter = (c | 32) - 97; + if (letter >= 0) + return letter + 10; + else + return 255; + }, UuidUtil_mathRNG() { var i, t1, b = new Uint8Array(16), @@ -15077,7 +15079,7 @@ }; A.Base64Codec.prototype = { normalize$3(_, source, start, end) { - var inverseAlphabet, t1, i, sliceStart, buffer, firstPadding, firstPaddingSourceIndex, paddingCount, i0, char, i1, digit1, digit2, char0, value, t2, t3, endLength, $length, + var inverseAlphabet, t1, i, sliceStart, buffer, firstPadding, firstPaddingSourceIndex, paddingCount, i0, char, i1, digit1, digit2, char0, value, t2, endLength, $length, _s31_ = "Invalid base64 encoding length "; end = A.RangeError_checkValidRange(start, end, source.length); inverseAlphabet = $.$get$_Base64Decoder__inverseAlphabet(); @@ -15127,8 +15129,8 @@ t2 = buffer; } else t2 = buffer; - t3 = t2._contents += B.JSString_methods.substring$2(source, sliceStart, i); - t2._contents = t3 + A.Primitives_stringFromCharCode(char); + t2._contents += B.JSString_methods.substring$2(source, sliceStart, i); + t2._contents += A.Primitives_stringFromCharCode(char); sliceStart = i0; continue; } @@ -21793,7 +21795,9 @@ return this.serialize$3$specifiedType(serializers, int64, B.FullType_null_List_empty_false); }, deserialize$3$specifiedType(serializers, serialized, specifiedType) { - return A.Int64__parseRadix(A._asString(serialized), 10); + var t1 = A.Int64__parseRadix(A._asString(serialized), 10, true); + t1.toString; + return t1; }, deserialize$2(serializers, serialized) { return this.deserialize$3$specifiedType(serializers, serialized, B.FullType_null_List_empty_false); @@ -26965,7 +26969,7 @@ B.Type_Float64List_LB7 = A.typeLiteral("Float64List"); B.Type_Int16List_uXf = A.typeLiteral("Int16List"); B.Type_Int32List_O50 = A.typeLiteral("Int32List"); - B.Type_Int64_gc6 = A.typeLiteral("Int64"); + B.Type_Int64_ww8 = A.typeLiteral("Int64"); B.Type_Int8List_ekJ = A.typeLiteral("Int8List"); B.Type_JSObject_8k0 = A.typeLiteral("JSObject"); B.Type_JsonObject_gyf = A.typeLiteral("JsonObject"); diff --git a/dwds/lib/src/version.dart b/dwds/lib/src/version.dart index 98abd762f..378dae623 100644 --- a/dwds/lib/src/version.dart +++ b/dwds/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '17.0.1-dev'; +const packageVersion = '18.0.0-dev';