dart-sdk/pkg/dev_compiler/pubspec.yaml

54 lines
1 KiB
YAML
Raw Normal View History

name: dev_compiler
# This package is not intended for consumption on pub.dev. DO NOT publish.
publish_to: none
environment:
sdk: '>=2.12.0 <3.0.0'
dependencies:
_fe_analyzer_shared:
path: ../_fe_analyzer_shared
_js_interop_checks:
path: ../_js_interop_checks
args: any
async: any
bazel_worker: any
build_integration:
path: ../build_integration
cli_util: any
collection: ^1.15.0
front_end:
path: ../front_end
kernel:
path: ../kernel
meta:
path: ../meta
path: any
pedantic: ^1.11.0
source_maps: any
source_span: any
dev_dependencies:
browser_launcher: ^1.0.0
expect:
path: ../expect
http_multi_server:
path: ../../third_party/pkg/http_multi_server
js:
path: ../js
modular_test:
path: ../modular_test
package_config: any
sourcemap_testing:
path: ../sourcemap_testing
stack_trace: any
shelf:
path: ../../third_party/pkg/shelf
test: any
testing:
path: ../testing
vm:
path: ../vm
webkit_inspection_protocol: ^1.0.0
[dartdevc] Adapting expression evaluation test suite for end-to-end evaluation. The full workflow for an end-to-end test: 1) Perform test/compiler options pre-initialization. 2) Start an instance of Chrome (with 1 tab) and save a persisted debug connection for use in all tests. 3) For each separate Dart program to be tested: 1) Create inside a temp directory the HTML bootstrapper, DDC-compiled JS sources, and auxiliary JS files (dart_library.js or require.js). 2) Initialize a DDC ProgramCompiler/IncrementalCompiler and perform a full compile of the program, saving the compiler's state for subsequent incremental compiles. 3) Enable the debugger and set a URL breakpoint at the program's main JS entrypoint. 4) For each test for this Dart program: 1) Navigate to the HTML bootstrapper, pausing when the target module is loaded (at the breakpoint set above). 2) Set a breakpoint at a JS location translated from a Dart breakpoint ID via source maps. 3) Resume the debugger, pausing at that breakpoint. Remove the breakpoint. 4) Reconstruct the local JS scope, then evaluate the Dart expression. 5) Evaluate the JS expression inline, then compare results with expectations. 5) Disable the debugger to clear its state. 4) Shut down Chrome and clean up any temporary directories. Other notes: * Supports bootstrapping/compilation on AMD and DDC module systems only (though expression eval is only supported on AMD) * Requires that Dart breakpoint IDs be set declaratively (no support for columns) The test structure/flow is subject to change. While I port existing tests, Dart programs will consist of inline source file strings with simple breakpoints. In the future, we want to allow more complicated Dart programs to be specified (like in the modular test framework) and more complicated expression evaluation test patterns (rather than allowing only a single evaluation per test). Change-Id: I5de7cfa66991fd14b24fa16edd1615f55c041ae3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190962 Commit-Queue: Mark Zhou <markzipan@google.com> Reviewed-by: Anna Gringauze <annagrin@google.com> Reviewed-by: Nicholas Shahan <nshahan@google.com>
2021-03-18 17:41:23 +00:00