mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
[ddc] Rename .dill files
- Makes the names consistent with dart2js and dart2wasm. - Prepares for the upcoming removal of the weak null safety .dill file. Change-Id: Idcf694b27cd4731db8f7ed6f0fdab7766ced08a6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/277183 Reviewed-by: William Hesse <whesse@google.com> Reviewed-by: Bob Nystrom <rnystrom@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com> Reviewed-by: Mayank Patke <fishythefish@google.com>
This commit is contained in:
parent
0f4bf12856
commit
c140324e1e
|
@ -81,8 +81,7 @@ void main() async {
|
|||
var testClassesPath =
|
||||
path.canonicalize(path.join(scriptDirectory, "test_classes.dart"));
|
||||
var ddcOutlinePath = path.canonicalize(path.join(
|
||||
computePlatformBinariesLocation().toFilePath(),
|
||||
"ddc_outline_sound.dill"));
|
||||
computePlatformBinariesLocation().toFilePath(), "ddc_outline.dill"));
|
||||
var dillPath =
|
||||
path.canonicalize(path.join(scriptDirectory, "test_classes.dill"));
|
||||
|
||||
|
|
|
@ -832,7 +832,8 @@ Map<String, String> parseAndRemoveDeclaredVariables(List<String> args) {
|
|||
/// The default path of the kernel summary for the Dart SDK given the
|
||||
/// [soundNullSafety] mode.
|
||||
String defaultSdkSummaryPath({required bool soundNullSafety}) {
|
||||
var outlineDill = soundNullSafety ? 'ddc_outline_sound.dill' : 'ddc_sdk.dill';
|
||||
var outlineDill =
|
||||
soundNullSafety ? 'ddc_outline.dill' : 'ddc_outline_unsound.dill';
|
||||
return p.join(getSdkPath(), 'lib', '_internal', outlineDill);
|
||||
}
|
||||
|
||||
|
|
|
@ -55,9 +55,9 @@ class DevelopmentIncrementalCompiler extends fe.IncrementalCompiler {
|
|||
class SetupCompilerOptions {
|
||||
static final sdkRoot = fe.computePlatformBinariesLocation();
|
||||
static final sdkUnsoundSummaryPath =
|
||||
p.join(sdkRoot.toFilePath(), 'ddc_sdk.dill');
|
||||
p.join(sdkRoot.toFilePath(), 'ddc_outline_unsound.dill');
|
||||
static final sdkSoundSummaryPath =
|
||||
p.join(sdkRoot.toFilePath(), 'ddc_outline_sound.dill');
|
||||
p.join(sdkRoot.toFilePath(), 'ddc_outline.dill');
|
||||
static final librariesSpecificationUri =
|
||||
p.join(p.dirname(p.dirname(getSdkPath())), 'libraries.json');
|
||||
|
||||
|
|
|
@ -738,8 +738,8 @@ class TestProjectConfiguration {
|
|||
|
||||
Uri get sdkRoot => computePlatformBinariesLocation();
|
||||
Uri get sdkSummaryPath => soundNullSafety
|
||||
? sdkRoot.resolve('ddc_outline_sound.dill')
|
||||
: sdkRoot.resolve('ddc_sdk.dill');
|
||||
? sdkRoot.resolve('ddc_outline.dill')
|
||||
: sdkRoot.resolve('ddc_outline_unsound.dill');
|
||||
Uri get librariesPath => sdkRoot.resolve('lib/libraries.json');
|
||||
|
||||
List get inputUris => [
|
||||
|
|
|
@ -14,7 +14,7 @@ import 'package:test/test.dart';
|
|||
bool get verbose => false;
|
||||
|
||||
Uri get sdkRoot => computePlatformBinariesLocation();
|
||||
Uri get sdkSummaryPath => sdkRoot.resolve('ddc_sdk.dill');
|
||||
Uri get sdkSummaryPath => sdkRoot.resolve('ddc_outline_unsound.dill');
|
||||
Uri get librariesPath => sdkRoot.resolve('lib/libraries.json');
|
||||
|
||||
void main(List<String> args) {
|
||||
|
|
|
@ -654,10 +654,11 @@ Future<CompileResult> kernelCompile(String code) async {
|
|||
}
|
||||
|
||||
var root = Uri.file('/memory');
|
||||
var sdkUri = Uri.file('/memory/dart_sdk.dill');
|
||||
var sdkUri = Uri.file('/memory/ddc_outline_unsound.dill');
|
||||
var sdkFile = _fileSystem.entityForUri(sdkUri);
|
||||
if (!await sdkFile.exists()) {
|
||||
var outlineDill = p.join(getSdkPath(), 'lib', '_internal', 'ddc_sdk.dill');
|
||||
var outlineDill =
|
||||
p.join(getSdkPath(), 'lib', '_internal', 'ddc_outline_unsound.dill');
|
||||
sdkFile.writeAsBytesSync(File(outlineDill).readAsBytesSync());
|
||||
}
|
||||
var librariesUri = Uri.file('/memory/libraries.json');
|
||||
|
|
|
@ -40,9 +40,9 @@ class DevelopmentIncrementalCompiler extends IncrementalCompiler {
|
|||
|
||||
class SetupCompilerOptions {
|
||||
static final sdkRoot = computePlatformBinariesLocation();
|
||||
static final sdkUnsoundSummaryPath = p.join(sdkRoot.path, 'ddc_sdk.dill');
|
||||
static final sdkSoundSummaryPath =
|
||||
p.join(sdkRoot.path, 'ddc_outline_sound.dill');
|
||||
static final sdkUnsoundSummaryPath =
|
||||
p.join(sdkRoot.path, 'ddc_outline_unsound.dill');
|
||||
static final sdkSoundSummaryPath = p.join(sdkRoot.path, 'ddc_outline.dill');
|
||||
// TODO(46617) Call getSdkPath() from command.dart instead.
|
||||
static final librariesSpecificationUri =
|
||||
p.join(p.dirname(p.dirname(getSdkPath())), 'libraries.json');
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
This folder contains two types of tests for validating sourcemaps:
|
||||
the debugging behavior and the stacktrace behavior.
|
||||
|
||||
Running the tests requires the compilation of the correct targets. DDC currently also
|
||||
requires `ddc_sdk.dill` inside
|
||||
`{sdkroot}/{out,xcodebuild}/{ReleaseX64,ReleaseARM64}/ddc_sdk.dill`.
|
||||
Running the tests requires the compilation of the correct targets. DDC currently
|
||||
also requires `ddc_outline_unsound.dill` inside
|
||||
`{sdkroot}/{out,xcodebuild}/{ReleaseX64,ReleaseARM64}/ddc_outline_unsound.dill`.
|
||||
|
||||
Except for that, running them should simply be a matter of executing the `*_suite.dart` files.
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ class DevCompilerRunner implements CompilerRunner {
|
|||
var sdkJsFile = findInOutDir('gen/utils/dartdevc/kernel/es6/dart_sdk.js');
|
||||
var jsSdkPath = sdkJsFile.uri;
|
||||
|
||||
var ddcSdkSummary = findInOutDir('ddc_outline.dill');
|
||||
var ddcSdkSummary = findInOutDir('ddc_outline_unsound.dill');
|
||||
|
||||
var packageConfigPath =
|
||||
sdkRoot!.uri.resolve('.dart_tool/package_config.json').toFilePath();
|
||||
|
|
|
@ -24,7 +24,7 @@ void main() {
|
|||
_resolvePath('gen/dartdevc.dart.snapshot'),
|
||||
'--sound-null-safety',
|
||||
'--dart-sdk-summary',
|
||||
_resolvePath('ddc_outline_sound.dill'),
|
||||
_resolvePath('ddc_outline.dill'),
|
||||
];
|
||||
group('DDC: Hello World', () {
|
||||
final argsFile = file('hello_world.args');
|
||||
|
|
|
@ -223,7 +223,7 @@ void main(List<String> args) async {
|
|||
var buildDir = resolveBuildDir(sdkRoot, arch);
|
||||
var requirePath = p.join(sdkRoot, 'third_party', 'requirejs');
|
||||
var sdkOutlineDill = p.join(buildDir,
|
||||
soundNullSafety ? 'ddc_outline_sound.dill' : 'ddc_outline.dill');
|
||||
soundNullSafety ? 'ddc_outline.dill' : 'ddc_outline_unsound.dill');
|
||||
var suffix = soundNullSafety ? p.join('sound', mod) : p.join('kernel', mod);
|
||||
var sdkJsPath = p.join(buildDir, 'gen', 'utils', 'dartdevc', suffix);
|
||||
|
||||
|
|
|
@ -23,17 +23,17 @@ String? computePlatformDillName(
|
|||
case 'dartdevc':
|
||||
switch (nnbdMode) {
|
||||
case NnbdMode.Strong:
|
||||
// DDC is always compiled against the outline so we use it here by
|
||||
// default.
|
||||
return 'ddc_outline_sound.dill';
|
||||
//TODO(johnniwinther): Support using the full dill.
|
||||
//return 'ddc_platform_sound.dill';
|
||||
case NnbdMode.Weak:
|
||||
// DDC is always compiled against the outline so we use it here by
|
||||
// default.
|
||||
return 'ddc_outline.dill';
|
||||
//TODO(johnniwinther): Support using the full dill.
|
||||
//return 'ddc_platform.dill';
|
||||
case NnbdMode.Weak:
|
||||
// DDC is always compiled against the outline so we use it here by
|
||||
// default.
|
||||
return 'ddc_outline_unsound.dill';
|
||||
//TODO(johnniwinther): Support using the full dill.
|
||||
//return 'ddc_platform_unsound.dill';
|
||||
case NnbdMode.Agnostic:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -557,9 +557,9 @@ void main() async {
|
|||
final platformKernel =
|
||||
computePlatformBinariesLocation().resolve('vm_platform_strong.dill');
|
||||
final ddcPlatformKernel =
|
||||
computePlatformBinariesLocation().resolve('ddc_outline_sound.dill');
|
||||
computePlatformBinariesLocation().resolve('ddc_outline.dill');
|
||||
final ddcPlatformKernelWeak =
|
||||
computePlatformBinariesLocation().resolve('ddc_sdk.dill');
|
||||
computePlatformBinariesLocation().resolve('ddc_outline_unsound.dill');
|
||||
final sdkRoot = computePlatformBinariesLocation();
|
||||
|
||||
late Directory tempDir;
|
||||
|
|
|
@ -45,6 +45,7 @@ compiler/test/sourcemaps/source_mapping_operators_test: Slow, Pass
|
|||
compiler/test/sourcemaps/source_mapping_test: Slow, Pass
|
||||
compiler/test/sourcemaps/stacktrace_test: Slow, Pass
|
||||
dartdev/test/commands/analyze_test: Slow, Pass
|
||||
dartdev/test/commands/create_integration_test: Skip # dartbug.com/50700 until build_web_compilers gets updated.
|
||||
dartdev/test/commands/help_test: Slow, Pass
|
||||
dartdev/test/smoke/*: Slow, Pass
|
||||
dev_compiler/test/modular/*: Slow, Pass
|
||||
|
|
|
@ -632,8 +632,8 @@ class DevCompilerConfiguration extends CompilerConfiguration {
|
|||
// For local development we don't have a built SDK yet, so point directly
|
||||
// at the built summary file location.
|
||||
var sdkSummaryFile = _configuration.nnbdMode == NnbdMode.strong
|
||||
? 'ddc_outline_sound.dill'
|
||||
: 'ddc_outline.dill';
|
||||
? 'ddc_outline.dill'
|
||||
: 'ddc_outline_unsound.dill';
|
||||
var sdkSummary = Path(_configuration.buildDirectory)
|
||||
.append(sdkSummaryFile)
|
||||
.absolute
|
||||
|
|
21
sdk/BUILD.gn
21
sdk/BUILD.gn
|
@ -512,31 +512,19 @@ copy("copy_dart2wasm_snapshot") {
|
|||
[ "$root_out_dir/$dart_sdk_output/bin/snapshots/{{source_file_part}}" ]
|
||||
}
|
||||
|
||||
# Copies DDC's SDK weak outline .dill to lib/_internal
|
||||
# TODO(nshahan) Fix the outline to be consistent and merge with below as a
|
||||
# breaking change.
|
||||
copy("copy_dev_compiler_weak_outline") {
|
||||
visibility = [ ":copy_dev_compiler_sdk" ]
|
||||
deps = [
|
||||
":copy_libraries",
|
||||
"../utils/dartdevc:dartdevc_platform",
|
||||
]
|
||||
sources = [ "$root_out_dir/ddc_outline.dill" ]
|
||||
outputs = [ "$root_out_dir/$dart_sdk_output/lib/_internal/ddc_sdk.dill" ]
|
||||
}
|
||||
|
||||
# Copies DDC's SDK full and outline .dill files to lib/_internal.
|
||||
copy("copy_dev_compiler_dills") {
|
||||
visibility = [ ":copy_dev_compiler_sdk" ]
|
||||
deps = [
|
||||
":copy_libraries",
|
||||
"../utils/dartdevc:dartdevc_platform",
|
||||
"../utils/dartdevc:dartdevc_platform_sound",
|
||||
"../utils/dartdevc:dartdevc_platform_unsound",
|
||||
]
|
||||
sources = [
|
||||
"$root_out_dir/ddc_outline_sound.dill",
|
||||
"$root_out_dir/ddc_outline.dill",
|
||||
"$root_out_dir/ddc_outline_unsound.dill",
|
||||
"$root_out_dir/ddc_platform.dill",
|
||||
"$root_out_dir/ddc_platform_sound.dill",
|
||||
"$root_out_dir/ddc_platform_unsound.dill",
|
||||
]
|
||||
outputs =
|
||||
[ "$root_out_dir/$dart_sdk_output/lib/_internal/{{source_file_part}}" ]
|
||||
|
@ -618,7 +606,6 @@ group("copy_dev_compiler_sdk") {
|
|||
":copy_dev_compiler_dills",
|
||||
":copy_dev_compiler_js",
|
||||
":copy_dev_compiler_tools",
|
||||
":copy_dev_compiler_weak_outline",
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
@ -291,9 +291,9 @@ EOF
|
|||
third_party/firefox_jsshell/ \
|
||||
out/ReleaseX64/dart_precompiled_runtime \
|
||||
out/ReleaseX64/gen/utils/dartdevc/kernel/ \
|
||||
out/ReleaseX64/ddc_outline.dill \
|
||||
out/ReleaseX64/ddc_outline_unsound.dill \
|
||||
out/ReleaseX64/gen/utils/dartdevc/sound/ \
|
||||
out/ReleaseX64/ddc_outline_sound.dill \
|
||||
out/ReleaseX64/ddc_outline.dill \
|
||||
sdk \
|
||||
pkg/compiler/test/codesize/swarm \
|
||||
third_party/pkg \
|
||||
|
|
|
@ -16,17 +16,17 @@ declare_args() {
|
|||
patched_sdk_dir = "$target_gen_dir/patched_sdk"
|
||||
sdk_summary = "$target_gen_dir/ddc_sdk.sum"
|
||||
|
||||
sdk_outline_dill = "$root_out_dir/ddc_outline.dill"
|
||||
sdk_full_dill = "$root_out_dir/ddc_platform.dill"
|
||||
sdk_outline_sound_dill = "$root_out_dir/ddc_outline_sound.dill"
|
||||
sdk_full_sound_dill = "$root_out_dir/ddc_platform_sound.dill"
|
||||
sdk_outline_sound_dill = "$root_out_dir/ddc_outline.dill"
|
||||
sdk_full_sound_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"
|
||||
|
||||
application_snapshot("dartdevc") {
|
||||
main_dart = "../../pkg/dev_compiler/bin/dartdevc.dart"
|
||||
|
||||
training_args = [
|
||||
"--dart-sdk-summary",
|
||||
rebase_path(sdk_outline_dill),
|
||||
rebase_path(sdk_outline_unsound_dill),
|
||||
"--no-sound-null-safety",
|
||||
"-o",
|
||||
"dartdevc.js",
|
||||
|
@ -39,10 +39,10 @@ application_snapshot("dartdevc") {
|
|||
|
||||
deps = [
|
||||
":dartdevc_kernel_sdk",
|
||||
":dartdevc_platform",
|
||||
":dartdevc_platform_unsound",
|
||||
]
|
||||
|
||||
inputs = [ sdk_outline_dill ]
|
||||
inputs = [ sdk_outline_unsound_dill ]
|
||||
}
|
||||
|
||||
sdk_root = "../../sdk"
|
||||
|
@ -149,8 +149,8 @@ template("dartdevc_kernel_compile") {
|
|||
sdk_outline = sdk_outline_sound_dill
|
||||
js_gen_dir = "$target_gen_dir/pkg_sound"
|
||||
} else {
|
||||
platform_dep = ":dartdevc_platform"
|
||||
sdk_outline = sdk_outline_dill
|
||||
platform_dep = ":dartdevc_platform_unsound"
|
||||
sdk_outline = sdk_outline_unsound_dill
|
||||
js_gen_dir = "$target_gen_dir/pkg_kernel"
|
||||
}
|
||||
|
||||
|
@ -290,14 +290,14 @@ template("compile_dartdevc_platform") {
|
|||
args += [ "--nnbd-weak" ]
|
||||
|
||||
outputs = [
|
||||
sdk_full_dill,
|
||||
sdk_outline_dill,
|
||||
sdk_full_unsound_dill,
|
||||
sdk_outline_unsound_dill,
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compile_dartdevc_platform("dartdevc_platform") {
|
||||
compile_dartdevc_platform("dartdevc_platform_unsound") {
|
||||
sound_null_safety = false
|
||||
}
|
||||
|
||||
|
@ -315,8 +315,8 @@ template("dartdevc_sdk_js") {
|
|||
platform_input = sdk_full_sound_dill
|
||||
js_gen_dir = "$target_gen_dir/sound"
|
||||
} else {
|
||||
platform_dep = ":dartdevc_platform"
|
||||
platform_input = sdk_full_dill
|
||||
platform_dep = ":dartdevc_platform_unsound"
|
||||
platform_input = sdk_full_unsound_dill
|
||||
js_gen_dir = "$target_gen_dir/kernel"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue