Files
sdk/runtime/bin
Jens Johansen b32e313620 [vm] Introduce --script_uri_override to support Platform.script in dart run -r
If a script uses `Platform.script` running it with as `dart
<script.dart>` and `dart run <script.dart>` would give the correct
script ("<script.dart>"), but running it with `dart run -r
<script.dart>` would report a dill file in the temp directory which is
not only surprising, but also breaking and for instance running the CFEs
strong_suite.dart via `dart run -r` didn't work.

This CL introduces --script_uri_override to the VM and makes the
resident compiler setup pass it so that when running `dart run -r
<script.dart>`, even though the vm is actually launched from a dill file
that resides in temp, `Platform.script` will actually return
`<script.dart>` - and running the CFEs strong_suite.dart via `dart run
-r` now actually works.

Tested: Added pkg/dartdev/test/commands/run_test.dart and manual testing.
Change-Id: Ia65c01834485fe06af63584baf0448dd5b9ffdb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510343
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2026-06-11 06:34:20 -07:00
..
2026-06-02 16:47:34 -07:00
2025-09-15 01:41:38 -07:00
2024-07-30 18:08:46 +00:00
2023-04-18 20:56:00 +00:00
2026-05-18 11:35:03 -07:00
2026-05-18 11:35:03 -07:00
2026-05-18 11:35:03 -07:00
2026-05-18 11:35:03 -07:00
2025-10-29 07:25:33 -07:00