Skip to content

Commit c0ac219

Browse files
authored
Use 'compile js-dev' instead of invoking DDC directly (#2579)
* Use 'compile js-dev' instead of directly invoking the dartdevc snapshot. * Fix snapshot paths. * Fix parameter. * Use 'compile js-dev' * Adjust sdk layout.
1 parent ee65f5c commit c0ac219

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

dwds/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 24.3.6-dev
22

33
- Bump minimum sdk version to 3.7.0
4+
- use 'compile js-dev' instead of directly invoking the ddc snapshot.
45

56
## 24.3.5
67
- Allow clients to specify the `packageConfigPath` in `LoadStrategy` class and associated providers.

dwds/test/expression_compiler_service_common.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ void testAll({required CompilerOptions compilerOptions}) {
5252
// generated in the SDK, so we use the current SDK layout and
5353
// configuration.
5454
final executable = Platform.resolvedExecutable;
55-
final dartdevc =
56-
SdkConfiguration.defaultConfiguration.compilerWorkerPath!;
5755
// redirect logs for testing
5856
_output = StreamController<String>.broadcast();
5957
output.stream.listen(printOnFailure);
@@ -110,7 +108,8 @@ void testAll({required CompilerOptions compilerOptions}) {
110108
''');
111109

112110
final args = [
113-
dartdevc,
111+
'compile',
112+
'js-dev',
114113
'try.dart',
115114
'-o',
116115
'try.js',

frontend_server_client/example/web_client.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ void main(List<String> args) async {
2222

2323
_print('compiling the dart sdk');
2424
final sdkCompileResult = await Process.run(Platform.resolvedExecutable, [
25-
p.join(sdkDir, 'bin', 'snapshots', 'dartdevc.dart.snapshot'),
25+
'compile',
26+
'js-dev',
2627
'--multi-root-scheme=org-dartlang-sdk',
2728
'--modules=amd',
2829
'--module-name=dart_sdk',

test_common/lib/sdk_asset_generator.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ class SdkAssetGenerator {
112112

113113
final sdkDirectoryUri = fileSystem.directory(sdkLayout.sdkDirectory).uri;
114114
final args = <String>[
115-
sdkLayout.dartdevcSnapshotPath,
115+
'compile',
116+
'js-dev',
116117
'--compile-sdk',
117118
'--multi-root',
118119
'$sdkDirectoryUri',

test_common/lib/test_sdk_layout.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class TestSdkLayout {
108108
sdkLayout.sdkDirectory,
109109
'bin',
110110
'snapshots',
111-
'kernel_worker.dart.snapshot',
111+
'kernel_worker_aot.dart.snapshot',
112112
),
113113
devToolsDirectory: p.join(
114114
sdkLayout.sdkDirectory,

0 commit comments

Comments
 (0)