[XL] Change in dart/sdk[main]: hack pubspec to run tests

0 views
Skip to first unread message

Nicholas Shahan (Gerrit)

unread,
Mar 12, 2026, 4:44:56 PMMar 12
to Jonas Jensen, Ryan Macnak, Commit Queue, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Jonas Jensen

Nicholas Shahan added 7 comments

Patchset-level comments
File-level comment, Patchset 11 (Latest):
Nicholas Shahan . unresolved

This is coming together really well! I left a few pointers in the code, please feel free to ask me more if anything doesn't seem clear.

File pkg/dartpad/lib/src/sandbox.dart
Line 30, Patchset 11 (Latest): <script src="$sandboxJs" data-modules="$modulesAttr"></script>
Nicholas Shahan . unresolved

Here is an example of how we load the compiled JavaScript files in the SDK test runner. We just add them all and listen on the event signaling the loads are complete before we run main.

https://github.com/dart-lang/sdk/blob/87a0f2e3af9f66418d097568c292d9d43825e529/pkg/test_runner/lib/src/browser.dart#L244-L255

File pkg/dartpad_worker/lib/src/tools/compile.dart
Line 80, Patchset 11 (Latest): final options = ddc.Options.fromArguments(
argParser.parse(['--module-name=main']),
);
Nicholas Shahan . unresolved

We would likely want to replicate most of the options we are currently using here:
https://github.com/dart-lang/dart-pad/blob/d9612c185d4c45877331d5e916a288ee995c8372/pkgs/dart_services/lib/src/compiling.dart#L125-L146

Specifically those that are added in the `useNew` code path `'--modules=ddc'` and `'--canary'` are needed when you use the `LibraryBundleCompiler`.

To get hot reload working you will also need to get the newly compiled output .dill file with `'--reload-delta-kernel=...'` so it can be passed to the next generation via `'--reload-last-accepted-kernel=...'`. These can be added later though if you want to just get it loading and hot restart working first.

Line 100, Patchset 11 (Latest): final compiler = ddc.ProgramCompiler(
Nicholas Shahan . unresolved
```suggestion
final compiler = ddc.LibraryBundleCompiler(
```
Line 110, Patchset 11 (Latest): ddc.ModuleFormat.amd,
Nicholas Shahan . unresolved

`options.moduleFormats.single` to ensure we are matching the version we used during the compilation.

File utils/dartpad/BUILD.gn
Line 39, Patchset 11 (Latest): deps = [ "../../utils/ddc:ddc_stable_sdk" ]
Nicholas Shahan . unresolved
```suggestion
deps = [ "../../utils/ddc:ddc_canary_sdk" ]
```
Line 41, Patchset 11 (Latest): sources = [
"$root_gen_dir/utils/ddc/stable/sdk/amd/dart_sdk.js",
"$root_gen_dir/utils/ddc/stable/sdk/amd/dart_sdk.js.map",
]
Nicholas Shahan . unresolved
```suggestion
sources = [
"$root_gen_dir/utils/ddc/canary/sdk/ddc/dart_sdk.js",
"$root_gen_dir/utils/ddc/canary/sdk/ddc/dart_sdk.js.map",
]
```
Open in Gerrit

Related details

Attention is currently required from:
  • Jonas Jensen
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Iae50b086d022e64f1863d632d04bfbb15d4e8004
Gerrit-Change-Number: 486781
Gerrit-PatchSet: 11
Gerrit-Owner: Jonas Jensen <jon...@google.com>
Gerrit-Reviewer: Jonas Jensen <jon...@google.com>
Gerrit-CC: Nicholas Shahan <nsh...@google.com>
Gerrit-CC: Ryan Macnak <rma...@google.com>
Gerrit-Attention: Jonas Jensen <jon...@google.com>
Gerrit-Comment-Date: Thu, 12 Mar 2026 20:44:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages