dart-sdk/pkg
MarkZ 210e120fbd [ddc] Creating a hot reload and hot restart test suite.
The hot reload runner currently only supports d8, but I plan to add support for Chrome and VM execution.

Notable changes:
* Creates `package:reload_test` with helpers for running this suite.
* Updates the module loader with D8-specific branches and hooks for hot reload/restart.
* Exposes DDC runtime variables via a `HotReloadTestRuntime` API.
* Ports constant equality hot restart tests from webdev/dwds (validated to fail if either cache-clearing mechanism fails).
* Partially rolls DDC's d8 preamble forward (towards dart2js's).
* Wraps D8's timer implementation with custom timeout logic to better match Chrome's timing semantics when executing with native JS async.

Tests for the framework and matrix updates will be added in an upcoming change.

Change-Id: I2773b29f464cfd0330e4c653c05e117ae150b4a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350021
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2024-03-05 00:12:18 +00:00
..
_fe_analyzer_shared [macros] CFE can launch macros when run from AOT. 2024-03-04 18:10:52 +00:00
_js_interop_checks [CFE] Split files needed by package:vm/modular/... into codes folder. 2024-02-27 15:04:27 +00:00
analysis_server Completion. Issue 54870. Suggest members of non-nullable extensions for nullable targets. 2024-03-04 23:53:28 +00:00
analysis_server_client CQ. Enable avoid_redundant_argument_values in analysis_server/ 2024-02-26 19:51:41 +00:00
analyzer Clean up after https://github.com/dart-lang/sdk/issues/54967 is fixed 2024-03-04 23:13:44 +00:00
analyzer_cli Reland Workspace changes. 2024-02-05 17:33:09 +00:00
analyzer_plugin [analysis_server]/[analyzer_plugin] Use specific Dart/YAML edit builders 2024-03-04 22:39:13 +00:00
analyzer_utilities final -> var for analyzer_utilities 2024-01-12 22:29:37 +00:00
async_helper [tests] update await_for_test to test behavior variations. 2024-02-14 21:43:47 +00:00
bisect_dart
build_integration build_integration: prepare for stricter implementation_imports check 2024-02-20 18:47:41 +00:00
compiler Fix typo and a broken link in dart2js pragma annotations docs 2024-02-29 15:41:32 +00:00
dart2js_info [dart2js] Assorted TODO cleanup, bump pubspecs to 3.3.0 2024-02-21 00:02:13 +00:00
dart2js_runtime_metrics [dart2js] Expose JS_TRUE and JS_FALSE via dart2js_runtime_metrics. 2024-02-09 18:38:55 +00:00
dart2js_tools
dart2native [ dart2native ] Remove unused constant 2024-02-08 19:51:11 +00:00
dart2wasm [dart2wasm] Improve internal error message in WasmArrayExt intrinsic generator 2024-02-29 16:21:52 +00:00
dart_internal Bump dart_internal to allow Dart 3.3. 2024-02-14 19:49:32 +00:00
dart_service_protocol_shared
dartdev [ CLI ] Add --write-service-info flag to dart run 2024-02-28 21:38:27 +00:00
dds [dds/dap] Bump package:dap and the version used by DDS 2024-02-29 19:22:19 +00:00
dds_service_extensions [ DDS ] Migrate DDS specific tests from service/ and update package:dds_service_extensions to 1.7.0 2024-01-26 22:45:14 +00:00
dev_compiler [ddc] Creating a hot reload and hot restart test suite. 2024-03-05 00:12:18 +00:00
dtd Fix DTD examples and add specs to ensure their continued function. 2024-02-21 19:05:36 +00:00
dtd_impl Add --unrestricted to DTD command. 2024-02-20 20:08:57 +00:00
expect [gardening] Make test not run in obfuscated/dwarf mode 2024-02-28 10:27:11 +00:00
front_end [macros] CFE can launch macros when run from AOT. 2024-03-04 18:10:52 +00:00
frontend_server [macros] Split out modular parts of package:vm into package:vm/modular. 2024-02-27 13:00:17 +00:00
heap_snapshot
js [pkg:js] Update README and prep for 0.7.1 publish 2024-02-16 18:40:22 +00:00
js_ast [dart2js] Convert some collections of const ints to enums 2024-02-23 19:52:50 +00:00
js_runtime [dart2js] Convert some collections of const ints to enums 2024-02-23 19:52:50 +00:00
js_shared [web] Move Variance to js_shared/lib/ for shared use. 2023-12-22 18:16:01 +00:00
kernel [CFE/VM] Fix location on ffi native procedure; pass reference 2024-03-04 14:26:08 +00:00
language_versioning_2_12_test Upgrade pkg/language_versioning_2_7_test to 2.12/2.13. 2023-12-12 17:45:13 +00:00
linter Augment. Use nullable PropertyAccessorElement.variable2 2024-03-04 19:28:28 +00:00
macros Add package:macros 2024-02-22 15:20:52 +00:00
meta Prepare package:meta for publish 2024-02-05 14:05:29 +00:00
mmap Revert "[ffi]: Remove pointer elementAt method." 2024-01-22 12:20:48 +00:00
modular_test modular_test: prepare for curly_braces lint change 2024-02-20 17:56:29 +00:00
native_stack_traces
reload_test [ddc] Creating a hot reload and hot restart test suite. 2024-03-05 00:12:18 +00:00
scrape [scrape] Use dart_flutter_team_lints as base for analysis 2023-12-07 17:57:31 +00:00
smith [test_runner] Rename host-checked to host-asserts 2024-02-08 22:01:09 +00:00
sourcemap_testing
status_file [test_runner] Rename host-checked to host-asserts 2024-02-08 22:01:09 +00:00
telemetry
test_runner [test_runner] Fix null assertion failure running on RISC-V. 2024-02-28 00:16:52 +00:00
testing [package:testing] Reset the isolates errors fatal option 2024-02-05 14:38:05 +00:00
vm Retire 3.3 experiments in the 3.4 release. 2024-03-04 16:09:31 +00:00
vm_service [VM/Compiler] Mark instructions related to late initialization error checks as synthetic 2024-02-28 20:06:58 +00:00
vm_service_interface [deps] rev crypto, dartdoc, ecosystem, lints, native, sse 2024-02-13 00:30:32 +00:00
vm_service_protos
vm_snapshot_analysis
wasm_builder [dart2wasm] Outline <obj> is/as <type> checks to shared helper functions 2024-02-12 12:06:07 +00:00
.gitignore
analysis_options.yaml
BUILD.gn
OWNERS
pkg.dart
pkg.status [gardening] Mark test as slow 2024-02-19 10:21:38 +00:00
README.md typo fixes: its vs. it's 2024-02-29 11:07:40 +00:00

Package validation

The packages in pkg/ are automatically validated on the LUCI CI bots. The validation is largely done by the tools/package_deps package; it can be tested locally via:

dart tools/package_deps/bin/package_deps.dart

Packages which are published

There are several packages developed in pkg/ which are published to pub. Validation of these packages is particularly important because the pub tools are not used for these packages during development; we get our dependency versions from the DEPS file. It's very easy for the dependencies specified in a package's pubspec file to get out of date wrt the packages and versions actually used.

In order to better ensure we're publishing correct packages, we validate some properties of the pubspec files on our CI system. These validations include:

  • that the dependencies listed in the pubspec are used in the package
  • that all the packages used by the source are listed in the pubspec
  • that we don't use relative path deps to pkg/ or third_party/ packages

Packages which are not published

For packages in pkg/ which we do not intend to be published, we put the following comment in the pubspec.yaml file:

# This package is not intended for consumption on pub.dev. DO NOT publish.
publish_to: none

These pubspecs are still validated by the package validation tool. The contents are more informational as the pubspecs for these packages are not consumed by the pub tool or ecosystem.

We validate:

  • that the dependencies listed in the pubspec are used in the package
  • that all the packages used by the source are listed in the pubspec
  • that a reference to a pkg/ package is done via a relative path dependency