Skip to content

Commit

Permalink
Use 'compile js-dev' instead of invoking DDC directly (#2579)
Browse files Browse the repository at this point in the history
* Use 'compile js-dev' instead of directly invoking the dartdevc snapshot.

* Fix snapshot paths.

* Fix parameter.

* Use 'compile js-dev'

* Adjust sdk layout.
  • Loading branch information
a-siva authored Feb 22, 2025
1 parent ee65f5c commit c0ac219
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions dwds/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 24.3.6-dev

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

## 24.3.5
- Allow clients to specify the `packageConfigPath` in `LoadStrategy` class and associated providers.
Expand Down
5 changes: 2 additions & 3 deletions dwds/test/expression_compiler_service_common.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ void testAll({required CompilerOptions compilerOptions}) {
// generated in the SDK, so we use the current SDK layout and
// configuration.
final executable = Platform.resolvedExecutable;
final dartdevc =
SdkConfiguration.defaultConfiguration.compilerWorkerPath!;
// redirect logs for testing
_output = StreamController<String>.broadcast();
output.stream.listen(printOnFailure);
Expand Down Expand Up @@ -110,7 +108,8 @@ void testAll({required CompilerOptions compilerOptions}) {
''');

final args = [
dartdevc,
'compile',
'js-dev',
'try.dart',
'-o',
'try.js',
Expand Down
3 changes: 2 additions & 1 deletion frontend_server_client/example/web_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ void main(List<String> args) async {

_print('compiling the dart sdk');
final sdkCompileResult = await Process.run(Platform.resolvedExecutable, [
p.join(sdkDir, 'bin', 'snapshots', 'dartdevc.dart.snapshot'),
'compile',
'js-dev',
'--multi-root-scheme=org-dartlang-sdk',
'--modules=amd',
'--module-name=dart_sdk',
Expand Down
3 changes: 2 additions & 1 deletion test_common/lib/sdk_asset_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@ class SdkAssetGenerator {

final sdkDirectoryUri = fileSystem.directory(sdkLayout.sdkDirectory).uri;
final args = <String>[
sdkLayout.dartdevcSnapshotPath,
'compile',
'js-dev',
'--compile-sdk',
'--multi-root',
'$sdkDirectoryUri',
Expand Down
2 changes: 1 addition & 1 deletion test_common/lib/test_sdk_layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class TestSdkLayout {
sdkLayout.sdkDirectory,
'bin',
'snapshots',
'kernel_worker.dart.snapshot',
'kernel_worker_aot.dart.snapshot',
),
devToolsDirectory: p.join(
sdkLayout.sdkDirectory,
Expand Down

0 comments on commit c0ac219

Please sign in to comment.