Remove unsound web configurations from test matrix.
This CL also removes references to unsound .dill files from the test
matrix and other build scripts and disables some of the option handling
that would lead to requiring unsound .dill files.
Change-Id: I89f701f8f5e1168bf974b5b44bfbafd5a39954fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/412401
Reviewed-by: Nate Biggs <natebiggs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
diff --git a/BUILD.gn b/BUILD.gn
index be84ea7..c991121 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -206,7 +206,7 @@
group("dart2js_bot") {
deps = [
":create_sdk",
- "utils/compiler:compile_dart2js_platform_unsound",
+ "utils/compiler:compile_dart2js_platform",
]
}
diff --git a/pkg/compiler/test/end_to_end/output_type_test.dart b/pkg/compiler/test/end_to_end/output_type_test.dart
index 5ed82fb..64db3af 100644
--- a/pkg/compiler/test/end_to_end/output_type_test.dart
+++ b/pkg/compiler/test/end_to_end/output_type_test.dart
@@ -57,9 +57,7 @@
}) async {
List<String> options =
List<String>.from(arguments)
- // TODO(nshahan) Should change to sdkPlatformBinariesPath when testing
- // with unsound null safety is no longer needed.
- ..add('--platform-binaries=$buildPlatformBinariesPath')
+ ..add('--platform-binaries=$sdkPlatformBinariesPath')
..add('--libraries-spec=$sdkLibrariesSpecificationUri');
print('--------------------------------------------------------------------');
print('dart2js ${options.join(' ')}');
@@ -112,7 +110,6 @@
'pkg/compiler/test/deferred/data/deferred_helper.dart',
'--out=custom.js',
'--deferred-map=def/deferred.json',
- '--no-sound-null-safety',
'--no-csp',
'--stage=dump-info-all',
],
@@ -140,7 +137,6 @@
await test([
'pkg/compiler/test/deferred/data/deferred_helper.dart',
- '--no-sound-null-safety',
'--csp',
...additionOptionals,
], expectedOutput);
@@ -150,7 +146,6 @@
await test(
[
'pkg/compiler/test/deferred/data/deferred_helper.dart',
- '--no-sound-null-safety',
'--csp',
Flags.writeResources,
...additionOptionals,
diff --git a/pkg/compiler/test/serialization/on_disk_split_test.dart b/pkg/compiler/test/serialization/on_disk_split_test.dart
index 15ba2ac..acae485 100644
--- a/pkg/compiler/test/serialization/on_disk_split_test.dart
+++ b/pkg/compiler/test/serialization/on_disk_split_test.dart
@@ -7,8 +7,6 @@
import 'package:compiler/src/commandline_options.dart';
import 'package:compiler/src/dart2js.dart';
import 'package:compiler/src/util/memory_compiler.dart';
-import 'package:front_end/src/api_unstable/dart2js.dart'
- show computePlatformBinariesLocation;
main(List<String> args) {
asyncTest(() async {
@@ -17,15 +15,9 @@
Uri closedWorldUri = dir.uri.resolve('world.data');
Uri globalInferenceUri = dir.uri.resolve('global.data');
Uri outUri = dir.uri.resolve('out.js');
- String buildRoot =
- computePlatformBinariesLocation(forceBuildDir: true).toFilePath();
var commonArgs = [
Flags.verbose,
'--libraries-spec=$sdkLibrariesSpecificationUri',
- '--no-sound-null-safety',
- // Unsound platform dill files are no longer packaged in the SDK and must
- // be read from the build directory during tests.
- '--platform-binaries=$buildRoot',
'${Flags.closedWorldUri}=$closedWorldUri',
'${Flags.globalInferenceUri}=$globalInferenceUri',
];
diff --git a/pkg/dev_compiler/tool/ddb b/pkg/dev_compiler/tool/ddb
index 1d07018..ca52edc 100755
--- a/pkg/dev_compiler/tool/ddb
+++ b/pkg/dev_compiler/tool/ddb
@@ -138,12 +138,11 @@
var compile = mode == 'compile' || mode == 'all';
var run = mode == 'run' || mode == 'all';
var verbose = options['verbose'] as bool;
- var soundNullSafety = options['sound-null-safety'] as bool;
var emitDebugSymbols = options['emit-debug-symbols'] as bool;
var nonNullAsserts = options['null-assertions'] as bool;
var nativeNonNullAsserts = options.wasParsed('native-null-assertions')
? options['native-null-assertions'] as bool
- : soundNullSafety;
+ : true;
var jsInteropNonNullAsserts = options['interop-null-assertions'] as bool;
var weakNullSafetyErrors = options['weak-null-safety-errors'] as bool;
var ddcModules = options['ddc-modules'] as bool;
@@ -260,12 +259,8 @@
var sdkRoot = p.dirname(p.dirname(ddcPath));
var buildDir = resolveBuildDir(sdkRoot, arch);
var requirePath = p.join(sdkRoot, 'third_party', 'requirejs');
- var sdkOutlineDill = p.join(buildDir,
- soundNullSafety ? 'ddc_outline.dill' : 'ddc_outline_unsound.dill');
- var compileModeDir = [
- canaryFeatures ? 'canary' : 'stable',
- soundNullSafety ? '' : '_unsound',
- ].join();
+ var sdkOutlineDill = p.join(buildDir, 'ddc_outline.dill');
+ var compileModeDir = canaryFeatures ? 'canary' : 'stable';
var sdkJsPath =
p.join(buildDir, 'gen', 'utils', 'ddc', compileModeDir, 'sdk', mod);
var preamblesDir = p.join(
@@ -283,7 +278,7 @@
'--dart-sdk-summary=$sdkOutlineDill',
for (var summary in summaries) '--summary=$summary',
for (var experiment in experiments) '--enable-experiment=$experiment',
- if (soundNullSafety) '--sound-null-safety' else '--no-sound-null-safety',
+ '--sound-null-safety',
if (options['packages'] != null) '--packages=${options['packages']}',
if (emitDebugSymbols) '--emit-debug-symbols',
if (canaryFeatures) '--canary',
@@ -314,7 +309,6 @@
if (run) {
var ddcModuleSdkOptions = canaryFeatures
? '''let sdkOptions = {
- weakNullSafetyWarnings: !($weakNullSafetyErrors || $soundNullSafety),
weakNullSafetyErrors: $weakNullSafetyErrors,
nonNullAsserts: $nonNullAsserts,
nativeNonNullAsserts: $nativeNonNullAsserts,
@@ -322,7 +316,6 @@
};'''
: '''
let sdk = dart_library.import("dart_sdk", "$appname");
-sdk.dart.weakNullSafetyWarnings(!($weakNullSafetyErrors || $soundNullSafety));
sdk.dart.weakNullSafetyErrors($weakNullSafetyErrors);
sdk.dart.nonNullAsserts($nonNullAsserts);
sdk.dart.nativeNonNullAsserts($nativeNonNullAsserts);
@@ -368,8 +361,6 @@
function(sdk, app) {
'use strict';
- sdk.dart.weakNullSafetyWarnings(
- !($weakNullSafetyErrors || $soundNullSafety));
sdk.dart.weakNullSafetyErrors($weakNullSafetyErrors);
sdk.dart.nonNullAsserts($nonNullAsserts);
sdk.dart.nativeNonNullAsserts($nativeNonNullAsserts);
@@ -424,8 +415,6 @@
sdk.dart.global.self = sdk.dart.global;
let main = require(\"./$basename\").$libname.main;
try {
- sdk.dart.weakNullSafetyWarnings(
- !($weakNullSafetyErrors || $soundNullSafety));
sdk.dart.weakNullSafetyErrors($weakNullSafetyErrors);
sdk.dart.nonNullAsserts($nonNullAsserts);
sdk.dart.nativeNonNullAsserts($nativeNonNullAsserts);
diff --git a/pkg/frontend_server/test/frontend_server_test.dart b/pkg/frontend_server/test/frontend_server_test.dart
index 1e1d4ca..80e11e2 100644
--- a/pkg/frontend_server/test/frontend_server_test.dart
+++ b/pkg/frontend_server/test/frontend_server_test.dart
@@ -567,8 +567,6 @@
computePlatformBinariesLocation().resolve('vm_platform_strong.dill');
final Uri ddcPlatformKernel =
computePlatformBinariesLocation().resolve('ddc_outline.dill');
- final Uri ddcPlatformKernelWeak =
- computePlatformBinariesLocation().resolve('ddc_outline_unsound.dill');
final Uri sdkRoot = computePlatformBinariesLocation();
late Directory tempDir;
@@ -2078,7 +2076,7 @@
final List<String> args = <String>[
'--sdk-root=${sdkRoot.toFilePath()}',
'--incremental',
- '--platform=${ddcPlatformKernelWeak.path}',
+ '--platform=${ddcPlatformKernel.path}',
'--output-dill=${dillFile.path}',
'--target=dartdevc',
'--dartdevc-module-format=$moduleFormat',
@@ -2099,122 +2097,6 @@
});
}, skip: 'https://github.com/dart-lang/sdk/issues/43959');
- group('compile to JavaScript weak null safety', () {
- Future<void> runTests(
- {required String moduleFormat, bool canary = false}) async {
- File file = new File('${tempDir.path}/foo.dart')..createSync();
- file.writeAsStringSync("main() {\n}\n");
- File packages =
- new File('${tempDir.path}/.dart_tool/package_config.json')
- ..createSync()
- ..writeAsStringSync(jsonEncode({
- "configVersion": 2,
- "packages": [
- {
- "name": "hello",
- "rootUri": "${tempDir.uri}",
- },
- ],
- }));
- File dillFile = new File('${tempDir.path}/app.dill');
-
- expect(dillFile.existsSync(), false);
-
- final List<String> args = <String>[
- '--sdk-root=${sdkRoot.toFilePath()}',
- '--incremental',
- '--platform=${ddcPlatformKernelWeak.path}',
- '--output-dill=${dillFile.path}',
- '--target=dartdevc',
- '--dartdevc-module-format=$moduleFormat',
- if (canary) '--dartdevc-canary',
- '--packages=${packages.path}',
- 'package:hello/foo.dart'
- ];
-
- expect(await starter(args), 0);
- }
-
- test('AMD module format', () async {
- await runTests(moduleFormat: 'amd');
- });
-
- test('DDC module format and canary', () async {
- await runTests(moduleFormat: 'ddc', canary: true);
- });
- }, skip: 'https://github.com/dart-lang/sdk/issues/43959');
-
- group('compile to JavaScript weak null safety then nonexistent file', () {
- Future<void> runTests(
- {required String moduleFormat, bool canary = false}) async {
- File file = new File('${tempDir.path}/foo.dart')..createSync();
- file.writeAsStringSync("main() {\n}\n");
- File packages =
- new File('${tempDir.path}/.dart_tool/package_config.json')
- ..createSync()
- ..writeAsStringSync(jsonEncode({
- "configVersion": 2,
- "packages": [
- {
- "name": "hello",
- "rootUri": "${tempDir.uri}",
- },
- ],
- }));
- File dillFile = new File('${tempDir.path}/app.dill');
-
- expect(dillFile.existsSync(), false);
-
- String library = 'package:hello/foo.dart';
-
- final List<String> args = <String>[
- '--sdk-root=${sdkRoot.toFilePath()}',
- '--incremental',
- '--platform=${ddcPlatformKernelWeak.path}',
- '--output-dill=${dillFile.path}',
- '--target=dartdevc',
- '--dartdevc-module-format=$moduleFormat',
- if (canary) '--dartdevc-canary',
- '--packages=${packages.path}',
- ];
-
- FrontendServer frontendServer = new FrontendServer();
- Future<int> result = frontendServer.open(args);
- frontendServer.compile(library);
- int count = 0;
- frontendServer.listen((Result compiledResult) {
- CompilationResult result =
- new CompilationResult.parse(compiledResult.status);
- count++;
- if (count == 1) {
- // First request is to 'compile', which results in full JavaScript
- expect(result.errorsCount, equals(0));
- expect(result.filename, dillFile.path);
- frontendServer.accept();
- frontendServer.compile('foo.bar');
- } else {
- expect(count, 2);
- // Second request is to 'compile' nonexistent file, that should
- // fail.
- expect(result.errorsCount, greaterThan(0));
- frontendServer.quit();
- }
- });
-
- expect(await result, 0);
- expect(count, 2);
- frontendServer.close();
- }
-
- test('AMD module format', () async {
- await runTests(moduleFormat: 'amd');
- });
-
- test('DDC module format and canary', () async {
- await runTests(moduleFormat: 'ddc', canary: true);
- });
- }, skip: 'https://github.com/dart-lang/sdk/issues/43959');
-
group('compile to JavaScript with no metadata', () {
Future<void> runTests(
{required String moduleFormat, bool canary = false}) async {
@@ -2719,97 +2601,6 @@
});
});
- group('compile to JavaScript all library bundles with unsound null safety',
- () {
- Future<void> runTests(
- {required String moduleFormat, bool canary = false}) async {
- File file = new File('${tempDir.path}/foo.dart')..createSync();
- file.writeAsStringSync("import 'bar.dart'; "
- "typedef myType = void Function(int); main() { fn is myType; }\n");
- file = new File('${tempDir.path}/bar.dart')..createSync();
- file.writeAsStringSync("void Function(int) fn = (int i) => null;\n");
- String library = 'package:hello/foo.dart';
-
- File dillFile = new File('${tempDir.path}/app.dill');
- File sourceFile = new File('${dillFile.path}.sources');
-
- File packageConfig =
- new File('${tempDir.path}/.dart_tool/package_config.json')
- ..createSync(recursive: true)
- ..writeAsStringSync('''
- {
- "configVersion": 2,
- "packages": [
- {
- "name": "hello",
- "rootUri": "../",
- "packageUri": "./",
- "languageVersion": "2.9"
- }
- ]
- }
- ''');
-
- final List<String> args = <String>[
- '--verbose',
- '--no-sound-null-safety',
- '--sdk-root=${sdkRoot.toFilePath()}',
- '--incremental',
- '--platform=${ddcPlatformKernelWeak.path}',
- '--output-dill=${dillFile.path}',
- '--target=dartdevc',
- '--dartdevc-module-format=$moduleFormat',
- if (canary) '--dartdevc-canary',
- '--packages=${packageConfig.path}'
- ];
-
- FrontendServer frontendServer = new FrontendServer();
- Future<int> result = frontendServer.open(args);
- frontendServer.compile(library);
- int count = 0;
- Completer<bool> expectationCompleter = new Completer<bool>();
- frontendServer.listen((Result compiledResult) {
- CompilationResult result =
- new CompilationResult.parse(compiledResult.status);
- count++;
- // Request to 'compile', which results in full JavaScript and no
- // metadata.
- expect(result.errorsCount, equals(0));
- expect(sourceFile.existsSync(), equals(true));
- expect(result.filename, dillFile.path);
-
- String source = sourceFile.readAsStringSync();
- // Split on the comment at the end of each library bundle.
- List<String> jsLibraryBundles =
- source.split(new RegExp("//# sourceMappingURL=.*.map"));
-
- // Both library bundles should include the unsound null safety check.
- expect(jsLibraryBundles[0],
- contains('dart._checkModuleNullSafetyMode(false);'));
- expect(jsLibraryBundles[1],
- contains('dart._checkModuleNullSafetyMode(false);'));
- frontendServer.accept();
- frontendServer.quit();
- expectationCompleter.complete(true);
- });
-
- await expectationCompleter.future;
- expect(await result, 0);
- expect(count, 1);
- frontendServer.close();
- }
-
- test('AMD module format', () async {
- await runTests(moduleFormat: 'amd');
- });
-
- test('DDC module format and canary', () async {
- await runTests(moduleFormat: 'ddc', canary: true);
- });
- },
- timeout: Timeout.none,
- skip: 'https://github.com/dart-lang/sdk/issues/52775');
-
group('compile to JavaScript, all library bundles with sound null safety',
() {
Future<void> runTests(
diff --git a/pkg/kernel/test/dart_scope_calculator_test.dart b/pkg/kernel/test/dart_scope_calculator_test.dart
index e97ebc1..e0f3bd9 100644
--- a/pkg/kernel/test/dart_scope_calculator_test.dart
+++ b/pkg/kernel/test/dart_scope_calculator_test.dart
@@ -17,7 +17,6 @@
// Patching is bad on outlines, see
// https://github.com/dart-lang/sdk/issues/54117.
if (dill.path.endsWith("_outline.dill")) return false;
- if (dill.path.endsWith("_outline_unsound.dill")) return false;
if (dill.path.contains("/vm_outline_")) return false;
return true;
}).toList();
diff --git a/pkg/test_runner/lib/src/compiler_configuration.dart b/pkg/test_runner/lib/src/compiler_configuration.dart
index 2dbee62..d3ee8f1 100644
--- a/pkg/test_runner/lib/src/compiler_configuration.dart
+++ b/pkg/test_runner/lib/src/compiler_configuration.dart
@@ -621,8 +621,6 @@
/// Configuration for "ddc".
class DevCompilerConfiguration extends CompilerConfiguration {
- final bool _soundNullSafety;
-
/// The output directory under `_configuration.buildDirectory` where DDC build
/// targets are output.
static final String ddcGenDir = 'gen/utils/ddc/';
@@ -637,14 +635,12 @@
bool get _isIA32 => _configuration.architecture == Architecture.ia32;
DevCompilerConfiguration(super.configuration)
- : _soundNullSafety = configuration.nnbdMode == NnbdMode.strong,
- buildOptionsDir = [
+ : buildOptionsDir = [
ddcGenDir,
if (configuration.ddcOptions.contains('--canary'))
'canary'
else
'stable',
- if (configuration.nnbdMode != NnbdMode.strong) '_unsound'
].join(),
super._subclass();
@@ -675,7 +671,7 @@
..._configuration.sharedOptions,
..._configuration.ddcOptions,
..._experimentsArgument(_configuration, testFile),
- if (_soundNullSafety) '--sound-null-safety' else '--no-sound-null-safety',
+ '--sound-null-safety',
// The file being compiled is the last argument.
args.last
];
@@ -692,7 +688,7 @@
options.remove('--null-assertions');
options.remove('--native-null-assertions');
options.remove('--interop-null-assertions');
- if (!_useSdk || !_soundNullSafety) {
+ if (!_useSdk) {
// If we're testing a built SDK, DDC will find its own summary.
//
// Unsound summary files are not longer bundled with the built SDK so they
@@ -700,8 +696,7 @@
//
// For local development we don't have a built SDK yet, so point directly
// at the built summary file location.
- var sdkSummaryFile =
- _soundNullSafety ? 'ddc_outline.dill' : 'ddc_outline_unsound.dill';
+ var sdkSummaryFile = 'ddc_outline.dill';
var sdkSummary = Path(_configuration.buildDirectory)
.append(sdkSummaryFile)
.absolute
@@ -728,12 +723,7 @@
// The summaries are provided here during the compilation of the test and
// the JavaScript will be loaded separately when the test is run.
args.add("-s");
- var outlineFilename = [
- package,
- '_outline',
- if (!_soundNullSafety) '_unsound',
- '.dill'
- ].join();
+ var outlineFilename = '${package}_outline.dill';
var summary = Path(_configuration.buildDirectory)
.append('$ddcGenDir/$outlineFilename')
@@ -787,7 +777,6 @@
arguments.contains('--interop-null-assertions');
var weakNullSafetyErrors =
arguments.contains('--weak-null-safety-errors');
- var weakNullSafetyWarnings = !(weakNullSafetyErrors || _soundNullSafety);
var repositoryUri = Uri.directory(Repository.dir.toNativePath());
var dartLibraryPath = repositoryUri
.resolve('pkg/dev_compiler/lib/js/ddc/ddc_module_loader.js')
@@ -825,7 +814,6 @@
load("$outputFile");
let sdk = dart_library.import("dart_sdk", "$appName");
- sdk.dart.weakNullSafetyWarnings($weakNullSafetyWarnings);
sdk.dart.weakNullSafetyErrors($weakNullSafetyErrors);
sdk.dart.nonNullAsserts($nonNullAsserts);
sdk.dart.nativeNonNullAsserts($nativeNonNullAsserts);
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index bc8f995..16e84ce 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -71,9 +71,7 @@
# ......libraries.json
# ......_internal/
# ........dart2js_platform.dill
-# ........dart2js_platform_unsound.dill
# ........dart2js_server_platform.dill
-# ........dart2js_server_platform_unsound.dill
# ........dart2wasm_outline.dill (if not on ia32)
# ........dart2wasm_platform.dill (if not on ia32)
# ........dart2wasm_js_compatibility_outline.dill (if not on ia32)
diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json
index 493ee15..ac2ca57 100644
--- a/tools/bots/test_matrix.json
+++ b/tools/bots/test_matrix.json
@@ -15,8 +15,6 @@
"js_platform": [
".dart_tool/package_config.json",
"out/ReleaseX64/dart-sdk/",
- "out/ReleaseX64/dart2js_platform_unsound.dill",
- "out/ReleaseX64/ddc_outline_unsound.dill",
"out/ReleaseX64/gen/utils/ddc/",
"pkg/",
"runtime/tests/",
@@ -46,7 +44,6 @@
".dart_tool/package_config.json",
"out/ReleaseX64/dart",
"out/ReleaseX64/dart2js_platform.dill",
- "out/ReleaseX64/dart2js_platform_unsound.dill",
"out/ReleaseX64/ddc_outline.dill",
"out/ReleaseX64/gen/utils/ddc/",
"pkg/",
@@ -438,14 +435,6 @@
"timeout": 240
}
},
- "dart2js-hostasserts-linux-(d8|chrome)-unsound": {
- "options": {
- "builder-tag": "dart2js-weak",
- "host-asserts": true,
- "nnbd": "weak",
- "timeout": 240
- }
- },
"dart2js-hostasserts-minified-fragments-linux-d8": {
"options": {
"dart2js-options": [
@@ -597,13 +586,6 @@
"use-sdk": true
}
},
- "ddc-linux-chrome-unsound": {
- "options": {
- "checked": true,
- "nnbd": "weak",
- "use-sdk": true
- }
- },
"ddc-canary-linux-chrome": {
"options": {
"builder-tag": "canary",
@@ -615,17 +597,6 @@
"use-sdk": true
}
},
- "ddc-canary-linux-chrome-unsound": {
- "options": {
- "builder-tag": "canary",
- "checked": true,
- "ddc-options": [
- "--canary"
- ],
- "nnbd": "weak",
- "use-sdk": true
- }
- },
"ddc-hostasserts-linux-d8": {
"options": {
"checked": true,
@@ -2221,37 +2192,6 @@
},
{
"builders": [
- "ddc-linux-chrome-unsound"
- ],
- "meta": {
- "description": "DDC without sound null safety running in Chrome on Linux."
- },
- "steps": [
- {
- "name": "build dart",
- "script": "tools/build.py",
- "arguments": [
- "ddc_stable_test"
- ]
- },
- {
- "name": "ddc sdk tests unsound",
- "arguments": [
- "-nddc-linux-chrome-unsound",
- "co19",
- "corelib",
- "dartdevc",
- "language",
- "lib",
- "web"
- ],
- "shards": 12,
- "fileset": "js_platform"
- }
- ]
- },
- {
- "builders": [
"ddc-canary-linux-chrome"
],
"meta": {
@@ -2775,46 +2715,6 @@
},
{
"builders": [
- "dart2js-hostasserts-linux-unsound"
- ],
- "meta": {
- "description": "dart2js unsound tests with assertions during compilation"
- },
- "steps": [
- {
- "name": "build dart",
- "script": "tools/build.py",
- "arguments": [
- "create_sdk",
- "dart2js_bot"
- ]
- },
- {
- "name": "dart2js d8 tests",
- "arguments": [
- "-ndart2js-hostasserts-linux-d8-unsound",
- "corelib",
- "language"
- ],
- "shards": 4,
- "fileset": "js_platform_hostasserts"
- },
- {
- "name": "dart2js chrome tests",
- "arguments": [
- "-ndart2js-hostasserts-linux-chrome-unsound",
- "co19",
- "lib",
- "pkg/(dart2js_runtime_metrics|expect)",
- "web"
- ],
- "shards": 10,
- "fileset": "js_platform_hostasserts"
- }
- ]
- },
- {
- "builders": [
"dart2wasm-asserts-linux-chrome"
],
"meta": {
@@ -3408,7 +3308,6 @@
"create_sdk",
"runtime",
"dart2js_platform.dill",
- "dart2js_platform_unsound.dill",
"kernel-service.dart.snapshot"
]
},
@@ -3444,7 +3343,6 @@
"gen_snapshot",
"dartaotruntime",
"dart2js_platform.dill",
- "dart2js_platform_unsound.dill",
"kernel-service.dart.snapshot",
"ddc_stable_test",
"ddc_canary_test",
@@ -3546,9 +3444,7 @@
"arguments": [
"--mode=release",
"--arch=x64",
- "create_sdk",
- "ddc_stable_unsound_sdk",
- "dart2js_platform_unsound.dill"
+ "create_sdk"
]
},
{
diff --git a/tools/bots/try_benchmarks.sh b/tools/bots/try_benchmarks.sh
index 55540db..1730b5e 100755
--- a/tools/bots/try_benchmarks.sh
+++ b/tools/bots/try_benchmarks.sh
@@ -75,7 +75,7 @@
rm -f linux-x64_profile.tar.gz
elif [ "$command" = linux-ia32-build ]; then
# NOTE: These are duplicated in tools/bots/test_matrix.json, keep in sync.
- ./tools/build.py --mode=release --arch=ia32 create_sdk runtime dart2js_platform.dill dart2js_platform_unsound.dill kernel-service.dart.snapshot
+ ./tools/build.py --mode=release --arch=ia32 create_sdk runtime dart2js_platform.dill kernel-service.dart.snapshot
elif [ "$command" = linux-ia32-archive ]; then
export GZIP=-1
strip -w \
@@ -141,7 +141,6 @@
--exclude pkg/front_end/testcases \
-- \
out/ReleaseIA32/dart2js_platform.dill \
- out/ReleaseIA32/dart2js_platform_unsound.dill \
out/ReleaseIA32/vm_outline_strong.dill \
out/ReleaseIA32/vm_platform_strong.dill \
out/ReleaseIA32/gen/kernel_service.dill \
@@ -181,7 +180,7 @@
rm -rf tmp
elif [ "$command" = linux-x64-build ]; then
# NOTE: These are duplicated in tools/bots/test_matrix.json, keep in sync.
- ./tools/build.py --mode=release --arch=x64 create_sdk runtime gen_snapshot dartaotruntime dart2js_platform.dill dart2js_platform_unsound.dill kernel-service.dart.snapshot ddc_stable_test ddc_canary_test dart2wasm_benchmark
+ ./tools/build.py --mode=release --arch=x64 create_sdk runtime gen_snapshot dartaotruntime dart2js_platform.dill kernel-service.dart.snapshot ddc_stable_test ddc_canary_test dart2wasm_benchmark
elif [ "$command" = linux-x64-archive ]; then
export GZIP=-1
strip -w \
@@ -266,7 +265,6 @@
--exclude pkg/front_end/testcases \
-- \
out/ReleaseX64/dart2js_platform.dill \
- out/ReleaseX64/dart2js_platform_unsound.dill \
out/ReleaseX64/dart2wasm_outline.dill \
out/ReleaseX64/dart2wasm_platform.dill \
out/ReleaseX64/vm_outline_strong.dill \
@@ -283,7 +281,6 @@
third_party/firefox_jsshell/ \
out/ReleaseX64/dartaotruntime \
out/ReleaseX64/gen/utils/ddc \
- out/ReleaseX64/ddc_outline_unsound.dill \
out/ReleaseX64/ddc_outline.dill \
sdk \
pkg/compiler/test/codesize/swarm \
@@ -308,21 +305,12 @@
out/ReleaseX64/dart --profile-period=10000 --optimization-counter-threshold=-1 hello.dart
DART_CONFIGURATION=ReleaseX64 pkg/dart2wasm/tool/compile_benchmark hello.dart hello.wasm
DART_CONFIGURATION=ReleaseX64 pkg/dart2wasm/tool/run_benchmark hello.wasm
- out/ReleaseX64/dart-sdk/bin/dart compile js --no-sound-null-safety --platform-binaries=out/ReleaseX64 --out=out.js -m hello.dart
- third_party/d8/linux/x64/d8 --stack_size=1024 sdk/lib/_internal/js_runtime/lib/preambles/seal_native_object.js sdk/lib/_internal/js_runtime/lib/preambles/d8.js out.js
out/ReleaseX64/dart-sdk/bin/dart compile js --sound-null-safety --out=out.js -m hello.dart
third_party/d8/linux/x64/d8 --stack_size=1024 sdk/lib/_internal/js_runtime/lib/preambles/seal_native_object.js sdk/lib/_internal/js_runtime/lib/preambles/d8.js out.js
- out/ReleaseX64/dart-sdk/bin/dart compile js --no-sound-null-safety --platform-binaries=out/ReleaseX64 --out=out.js -m hello.dart
- out/ReleaseX64/dart-sdk/bin/dart --print_metrics compile js --no-sound-null-safety --platform-binaries=out/ReleaseX64 --out=out.js -m hello.dart
- LD_LIBRARY_PATH=third_party/firefox_jsshell/ third_party/firefox_jsshell/js -f sdk/lib/_internal/js_runtime/lib/preambles/seal_native_object.js -f sdk/lib/_internal/js_runtime/lib/preambles/jsshell.js -f out.js
out/ReleaseX64/dart-sdk/bin/dart compile js --sound-null-safety --out=out.js -m hello.dart
LD_LIBRARY_PATH=third_party/firefox_jsshell/ third_party/firefox_jsshell/js -f sdk/lib/_internal/js_runtime/lib/preambles/seal_native_object.js -f sdk/lib/_internal/js_runtime/lib/preambles/jsshell.js -f out.js
- out/ReleaseX64/dart-sdk/bin/dart compile js --no-sound-null-safety --platform-binaries=out/ReleaseX64 --benchmarking-production --out=out.js -m hello.dart
- third_party/d8/linux/x64/d8 --stack_size=1024 sdk/lib/_internal/js_runtime/lib/preambles/seal_native_object.js sdk/lib/_internal/js_runtime/lib/preambles/d8.js out.js
out/ReleaseX64/dart-sdk/bin/dart compile js --sound-null-safety --benchmarking-production --out=out.js -m hello.dart
third_party/d8/linux/x64/d8 --stack_size=1024 sdk/lib/_internal/js_runtime/lib/preambles/seal_native_object.js sdk/lib/_internal/js_runtime/lib/preambles/d8.js out.js
- out/ReleaseX64/dart-sdk/bin/dart compile js --no-sound-null-safety --platform-binaries=out/ReleaseX64 --benchmarking-x --out=out.js -m hello.dart
- third_party/d8/linux/x64/d8 --stack_size=1024 sdk/lib/_internal/js_runtime/lib/preambles/seal_native_object.js sdk/lib/_internal/js_runtime/lib/preambles/d8.js out.js
out/ReleaseX64/dart-sdk/bin/dart pkg/dev_compiler/tool/ddb -r d8 -b third_party/d8/linux/x64/d8 --sound-null-safety hello.dart
out/ReleaseX64/dart-sdk/bin/dart pkg/dev_compiler/tool/ddb -r d8 -b third_party/d8/linux/x64/d8 --sound-null-safety --mode=compile --compile-vm-options=--print-metrics --out out.js hello.dart
out/ReleaseX64/dart-sdk/bin/dart pkg/dev_compiler/tool/ddb -r d8 -b third_party/d8/linux/x64/d8 --canary --sound-null-safety hello.dart
diff --git a/utils/compiler/BUILD.gn b/utils/compiler/BUILD.gn
index 0ff168a..e39348e 100644
--- a/utils/compiler/BUILD.gn
+++ b/utils/compiler/BUILD.gn
@@ -56,13 +56,10 @@
deps = [ ":dart2js_create_snapshot_entry" ]
training_deps = [
":compile_dart2js_platform",
- ":compile_dart2js_platform_unsound",
]
training_inputs = [
"$root_out_dir/dart2js_platform.dill",
- "$root_out_dir/dart2js_platform_unsound.dill",
"$root_out_dir/dart2js_outline.dill",
- "$root_out_dir/dart2js_outline_unsound.dill",
]
main_dart = "$target_gen_dir/dart2js.dart"
training_args = [
@@ -111,23 +108,6 @@
force_product_mode = !dart_debug
}
-compile_platform("compile_dart2js_platform_unsound") {
- single_root_scheme = "org-dartlang-sdk"
- single_root_base = rebase_path("$sdk_root/")
- libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
-
- outputs = [
- "$root_out_dir/dart2js_platform_unsound.dill",
- "$root_out_dir/dart2js_outline_unsound.dill",
- ]
-
- args = [
- "--target=dart2js",
- "--no-defines",
- "dart:core",
- "--nnbd-weak",
- ]
-}
compile_platform("compile_dart2js_platform") {
single_root_scheme = "org-dartlang-sdk"
single_root_base = rebase_path("$sdk_root/")
@@ -144,23 +124,6 @@
"dart:core",
]
}
-compile_platform("compile_dart2js_server_platform_unsound") {
- single_root_scheme = "org-dartlang-sdk"
- single_root_base = rebase_path("$sdk_root/")
- libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
-
- outputs = [
- "$root_out_dir/dart2js_server_platform_unsound.dill",
- "$root_out_dir/dart2js_server_outline_unsound.dill",
- ]
-
- args = [
- "--target=dart2js_server",
- "--no-defines",
- "dart:core",
- "--nnbd-weak",
- ]
-}
compile_platform("compile_dart2js_server_platform") {
single_root_scheme = "org-dartlang-sdk"
single_root_base = rebase_path("$sdk_root/")
diff --git a/utils/ddc/BUILD.gn b/utils/ddc/BUILD.gn
index ad71d56..1e37ba6 100644
--- a/utils/ddc/BUILD.gn
+++ b/utils/ddc/BUILD.gn
@@ -12,8 +12,6 @@
sdk_outline_dill = "$root_out_dir/ddc_outline.dill"
sdk_full_dill = "$root_out_dir/ddc_platform.dill"
-sdk_outline_unsound_dill = "$root_out_dir/ddc_outline_unsound.dill"
-sdk_full_unsound_dill = "$root_out_dir/ddc_platform_unsound.dill"
sdk_root = "../../sdk"
pkg_root = "../../pkg"
@@ -120,7 +118,6 @@
deps = [
":ddc_stable_sdk",
":ddc_stable_test_pkg",
- ":ddc_stable_unsound_sdk",
]
}
@@ -134,8 +131,6 @@
":ddc_canary_sdk",
":ddc_canary_sdk_ddc_module",
":ddc_canary_test_pkg",
- ":ddc_canary_unsound_sdk",
- ":ddc_canary_unsound_sdk_ddc_module",
]
}
@@ -156,11 +151,8 @@
deps = [
":ddc_test_pkg_outline",
":expect_stable_js",
- ":expect_stable_unsound_js",
":js_stable_js",
- ":js_stable_unsound_js",
":meta_stable_js",
- ":meta_stable_unsound_js",
]
}
@@ -170,59 +162,31 @@
":ddc_test_pkg_outline",
":expect_canary_ddc_js",
":expect_canary_js",
- ":expect_canary_unsound_ddc_js",
- ":expect_canary_unsound_js",
":js_canary_ddc_js",
":js_canary_js",
- ":js_canary_unsound_ddc_js",
- ":js_canary_unsound_js",
":meta_canary_ddc_js",
":meta_canary_js",
- ":meta_canary_unsound_ddc_js",
- ":meta_canary_unsound_js",
]
}
group("ddc_test_pkg_outline") {
deps = [
":expect_outline",
- ":expect_outline_unsound",
":js_outline",
- ":js_outline_unsound",
":meta_outline",
- ":meta_outline_unsound",
]
}
template("ddc_compile") {
assert(defined(invoker.package),
"Need 'package' in $target_name (the name of the package)")
- assert(defined(invoker.sound_null_safety),
- "Need 'sound_null_safety' in $target_name.")
assert(defined(invoker.canary), "Need 'canary' in $target_name.")
assert(defined(invoker.modules), "Need 'modules' in $target_name.")
- # Determine one of four possible directories for the JavaScript output to be
- # generated:
- #
- # out/gen/ddc
- # |- canary/pkg
- # |- canary_unsound/pkg
- # |- stable/pkg
- # |- stable_unsound/pkg
if (invoker.canary) {
- js_gen_dir = "$target_gen_dir/canary"
+ js_gen_dir = "$target_gen_dir/canary/pkg"
} else {
- js_gen_dir = "$target_gen_dir/stable"
- }
- if (invoker.sound_null_safety) {
- platform_dep = ":ddc_platform"
- sdk_outline = sdk_outline_dill
- js_gen_dir = "$js_gen_dir/pkg"
- } else {
- platform_dep = ":ddc_platform_unsound"
- sdk_outline = sdk_outline_unsound_dill
- js_gen_dir = "${js_gen_dir}_unsound/pkg"
+ js_gen_dir = "$target_gen_dir/stable/pkg"
}
# Other optional invoker parameters:
@@ -238,16 +202,16 @@
script = "../../pkg/dev_compiler/bin/dartdevc.dart"
package_name = invoker.package
out_dir = rebase_path("$js_gen_dir")
- sdk_path = rebase_path(sdk_outline)
+ sdk_path = rebase_path(sdk_outline_dill)
pkg_root = rebase_path("$root_build_dir/../../pkg")
deps = [
":ddc_files_stamp",
- platform_dep,
+ ":ddc_platform",
]
inputs = [
- sdk_outline,
+ sdk_outline_dill,
"$target_gen_dir/ddc_files.stamp",
]
@@ -291,12 +255,6 @@
args += invoker.args
}
- if (invoker.sound_null_safety) {
- args += [ "--sound-null-safety" ]
- } else {
- args += [ "--no-sound-null-safety" ]
- }
-
if (invoker.canary) {
args += [ "--canary" ]
}
@@ -307,29 +265,18 @@
template("package_kernel_outline") {
assert(defined(invoker.package),
"Need 'package' in $target_name (the name of the package)")
- assert(defined(invoker.sound_null_safety),
- "Need 'sound_null_safety' in $target_name.")
module = invoker.package
output = "$target_gen_dir/${module}_outline"
-
- if (invoker.sound_null_safety) {
- platform_dep = ":ddc_platform"
- sdk_outline = rebase_path(sdk_outline_dill)
- output = "$output.dill"
- } else {
- platform_dep = ":ddc_platform_unsound"
- sdk_outline = rebase_path(sdk_outline_unsound_dill)
- output = "${output}_unsound.dill"
- }
+ sdk_outline = rebase_path(sdk_outline_dill)
package_config =
rebase_path("$root_out_dir/../../.dart_tool/package_config.json")
prebuilt_dart_action(target_name) {
deps = [
+ ":ddc_platform",
"../bazel:kernel_worker_files_stamp",
- platform_dep,
]
script = "../bazel/kernel_worker.dart"
outputs = [ output ]
@@ -344,13 +291,8 @@
"--source",
"package:$module/$module.dart",
"--output",
- rebase_path(output),
+ rebase_path("$output.dill"),
]
- if (invoker.sound_null_safety) {
- args += [ "--sound-null-safety" ]
- } else {
- args += [ "--no-sound-null-safety" ]
- }
if (defined(invoker.extra_libraries)) {
foreach(lib, invoker.extra_libraries) {
args += [
@@ -369,17 +311,6 @@
"legacy/minitest",
"legacy/async_minitest",
]
- sound_null_safety = true
-}
-
-package_kernel_outline("expect_outline_unsound") {
- package = "expect"
- extra_libraries = [
- "async_helper",
- "legacy/minitest",
- "legacy/async_minitest",
- ]
- sound_null_safety = false
}
ddc_compile("expect_stable_js") {
@@ -394,7 +325,6 @@
"amd",
"ddc",
]
- sound_null_safety = true
}
ddc_compile("expect_canary_js") {
@@ -406,7 +336,6 @@
]
canary = true
modules = [ "amd" ]
- sound_null_safety = true
}
ddc_compile("expect_canary_ddc_js") {
@@ -418,58 +347,11 @@
]
canary = true
modules = [ "ddc" ]
- sound_null_safety = true
-}
-
-ddc_compile("expect_stable_unsound_js") {
- package = "expect"
- extra_libraries = [
- "async_helper",
- "legacy/minitest",
- "legacy/async_minitest",
- ]
- canary = false
- modules = [
- "amd",
- "ddc",
- ]
- sound_null_safety = false
-}
-
-ddc_compile("expect_canary_unsound_js") {
- package = "expect"
- extra_libraries = [
- "async_helper",
- "legacy/minitest",
- "legacy/async_minitest",
- ]
- canary = true
- modules = [ "amd" ]
- sound_null_safety = false
-}
-
-ddc_compile("expect_canary_unsound_ddc_js") {
- package = "expect"
- extra_libraries = [
- "async_helper",
- "legacy/minitest",
- "legacy/async_minitest",
- ]
- canary = true
- modules = [ "ddc" ]
- sound_null_safety = false
}
package_kernel_outline("js_outline") {
package = "js"
extra_libraries = [ "js_util" ]
- sound_null_safety = true
-}
-
-package_kernel_outline("js_outline_unsound") {
- package = "js"
- extra_libraries = [ "js_util" ]
- sound_null_safety = false
}
ddc_compile("js_stable_js") {
@@ -480,7 +362,6 @@
"amd",
"ddc",
]
- sound_null_safety = true
}
ddc_compile("js_canary_js") {
@@ -488,7 +369,6 @@
extra_libraries = [ "js_util" ]
canary = true
modules = [ "amd" ]
- sound_null_safety = true
}
ddc_compile("js_canary_ddc_js") {
@@ -496,44 +376,10 @@
extra_libraries = [ "js_util" ]
canary = true
modules = [ "ddc" ]
- sound_null_safety = true
-}
-
-ddc_compile("js_stable_unsound_js") {
- package = "js"
- extra_libraries = [ "js_util" ]
- canary = false
- modules = [
- "amd",
- "ddc",
- ]
- sound_null_safety = false
-}
-
-ddc_compile("js_canary_unsound_js") {
- package = "js"
- extra_libraries = [ "js_util" ]
- canary = true
- modules = [ "amd" ]
- sound_null_safety = false
-}
-
-ddc_compile("js_canary_unsound_ddc_js") {
- package = "js"
- extra_libraries = [ "js_util" ]
- canary = true
- modules = [ "ddc" ]
- sound_null_safety = false
}
package_kernel_outline("meta_outline") {
package = "meta"
- sound_null_safety = true
-}
-
-package_kernel_outline("meta_outline_unsound") {
- package = "meta"
- sound_null_safety = false
}
ddc_compile("meta_stable_js") {
@@ -543,124 +389,60 @@
"amd",
"ddc",
]
- sound_null_safety = true
}
ddc_compile("meta_canary_js") {
package = "meta"
canary = true
modules = [ "amd" ]
- sound_null_safety = true
}
ddc_compile("meta_canary_ddc_js") {
package = "meta"
canary = true
modules = [ "ddc" ]
- sound_null_safety = true
}
-ddc_compile("meta_stable_unsound_js") {
- package = "meta"
- canary = false
- modules = [
- "amd",
- "ddc",
+compile_platform("ddc_platform") {
+ single_root_scheme = "org-dartlang-sdk"
+ single_root_base = rebase_path("$sdk_root/")
+ libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
+
+ args = [
+ "--target=dartdevc",
+ "dart:core",
]
- sound_null_safety = false
-}
-ddc_compile("meta_canary_unsound_js") {
- package = "meta"
- canary = true
- modules = [ "amd" ]
- sound_null_safety = false
-}
-
-ddc_compile("meta_canary_unsound_ddc_js") {
- package = "meta"
- canary = true
- modules = [ "ddc" ]
- sound_null_safety = false
-}
-
-template("compile_ddc_platform") {
- assert(defined(invoker.sound_null_safety),
- "Need 'sound_null_safety' in $target_name.")
-
- compile_platform(target_name) {
- single_root_scheme = "org-dartlang-sdk"
- single_root_base = rebase_path("$sdk_root/")
- libraries_specification_uri = "org-dartlang-sdk:///lib/libraries.json"
-
- args = [
- "--target=dartdevc",
- "dart:core",
- ]
-
- if (invoker.sound_null_safety) {
- args += [ "--nnbd-strong" ]
-
- outputs = [
- sdk_full_dill,
- sdk_outline_dill,
- ]
- } else {
- args += [ "--nnbd-weak" ]
-
- outputs = [
- sdk_full_unsound_dill,
- sdk_outline_unsound_dill,
- ]
- }
- }
-}
-
-compile_ddc_platform("ddc_platform") {
- sound_null_safety = true
-}
-
-compile_ddc_platform("ddc_platform_unsound") {
- sound_null_safety = false
+ outputs = [
+ sdk_full_dill,
+ sdk_outline_dill,
+ ]
}
# Compiles the DDC SDK JavaScript modules from the platform .dill file.
template("ddc_compile_sdk") {
- assert(defined(invoker.sound_null_safety),
- "Need 'sound_null_safety' in $target_name.")
assert(defined(invoker.canary), "Need 'canary' in $target_name.")
assert(defined(invoker.modules), "Need 'modules' in $target_name.")
- # Determine one of four possible directories for the JavaScript output to be
+ # Determine one of two possible directories for the JavaScript output to be
# generated:
#
# out/gen/ddc
# |- canary/sdk
- # |- canary_unsound/sdk
# |- stable/sdk
- # |- stable_unsound/sdk
if (invoker.canary) {
- js_gen_dir = "$target_gen_dir/canary"
+ js_gen_dir = "$target_gen_dir/canary/sdk"
} else {
- js_gen_dir = "$target_gen_dir/stable"
- }
- if (invoker.sound_null_safety) {
- platform_dep = ":ddc_platform"
- platform_input = sdk_full_dill
- js_gen_dir = "$js_gen_dir/sdk"
- } else {
- platform_dep = ":ddc_platform_unsound"
- platform_input = sdk_full_unsound_dill
- js_gen_dir = "${js_gen_dir}_unsound/sdk"
+ js_gen_dir = "$target_gen_dir/stable/sdk"
}
prebuilt_dart_action(target_name) {
deps = [
":ddc_files_stamp",
- platform_dep,
+ ":ddc_platform",
]
- inputs = [ platform_input ]
+ inputs = [ sdk_full_dill ]
outputs = []
args = []
@@ -695,15 +477,9 @@
# These JavaScript files and source maps are no longer packaged into the
# released SDK.
rebase_path("$target_gen_dir/../../../dart-sdk"),
- rebase_path("$platform_input"),
+ rebase_path("$sdk_full_dill"),
]
- if (invoker.sound_null_safety) {
- args += [ "--sound-null-safety" ]
- } else {
- args += [ "--no-sound-null-safety" ]
- }
-
if (invoker.canary) {
args += [ "--canary" ]
}
@@ -718,18 +494,6 @@
"es6",
"ddc",
]
- sound_null_safety = true
-}
-
-ddc_compile_sdk("ddc_stable_unsound_sdk") {
- canary = false
- modules = [
- "amd",
- "common",
- "es6",
- "ddc",
- ]
- sound_null_safety = false
}
ddc_compile_sdk("ddc_canary_sdk") {
@@ -739,7 +503,6 @@
"common",
"es6",
]
- sound_null_safety = true
}
# Compiles the DDC SDK JavaScript modules from the platform .dill file in the
@@ -751,27 +514,4 @@
ddc_compile_sdk("ddc_canary_sdk_ddc_module") {
canary = true
modules = [ "ddc" ]
- sound_null_safety = true
-}
-
-ddc_compile_sdk("ddc_canary_unsound_sdk") {
- canary = true
- modules = [
- "amd",
- "common",
- "es6",
- ]
- sound_null_safety = false
-}
-
-# Compiles the DDC SDK JavaScript modules from the platform .dill file in the
-# "ddc" module format only.
-#
-# This allows for them to be built individually (only passing one `--modules`
-# flag value) so that when also passing the `--canary` flag it will trigger
-# DDC to enable the option for the new library bundle format.
-ddc_compile_sdk("ddc_canary_unsound_sdk_ddc_module") {
- canary = true
- modules = [ "ddc" ]
- sound_null_safety = false
}