dart-sdk/pkg
Danny Tuppeny a95b584101 [dds][dap] Fix global evaluation inside package: files
The initial global evaluation support only worked when the open script was loaded into the VM as a `file:///` URI (eg. things in a `bin/` folder, and not a `lib/` folder). This is because we short-cut resolving file paths to `package:` URIs for most VM functionality (for example setting breakpoints) because it's unnecessary (the VM supports setting breakpoints with file:/// URIs even for `lib/`).

This change forces us to resolve paths to their resolved URIs (eg. `package:` where applicable) in the case where we're looking up a script for global evaluation.

We could enable this lookup for all cases (to remove the additional `force` flag here), but since it's called much more from the other path (breakpoints) we should add caching (which was more than I wanted to change for this fix).

Fixes https://github.com/Dart-Code/Dart-Code/issues/4932

Change-Id: I57a99ec3b7c726d9d120e6cda7d0b938fec397bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346400
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-01-23 16:38:32 +00:00
..
_fe_analyzer_shared Prepare to publish analyzer 6.4.0 and _fe_analyzer_shared 66.0.0 2024-01-22 21:19:59 +00:00
_js_interop_checks Reland "[dart2wasm] Disallow use of old interop libraries" 2024-01-02 21:14:50 +00:00
analysis_server analyzer: Rename some extensions 2024-01-23 16:26:39 +00:00
analysis_server_client [anlaysis_server] Fix flaky verify_sorted test 2024-01-18 16:44:17 +00:00
analyzer analyzer: Rename some extensions 2024-01-23 16:26:39 +00:00
analyzer_cli Macro. Dispose AnalysisContextCollection(s) in analyzer_cli/ 2024-01-19 00:05:17 +00:00
analyzer_plugin final -> var for package:analyzer_plugin 2024-01-12 22:37:40 +00:00
analyzer_utilities final -> var for analyzer_utilities 2024-01-12 22:29:37 +00:00
async_helper
bisect_dart Remove the legacy "_2" tests. \o/ 2023-11-17 20:17:23 +00:00
build_integration
compiler [dart2js] Remove remaining language version overrides 2024-01-23 01:26:09 +00:00
dart2js_info [dart2js] Fix dump-info tests by starting indexing at 0 instead of 1. 2024-01-12 21:51:51 +00:00
dart2js_runtime_metrics
dart2js_tools [pkg] switches the default linting for pkg/ packages to dart_flutter_team_lints 2023-11-11 01:52:16 +00:00
dart2native Also add global owners to CFE/VM packages 2023-11-27 14:35:52 +00:00
dart2wasm [dart2wasm] Add support for testing dart2wasm with JSC 2024-01-22 12:04:37 +00:00
dart_internal
dart_service_protocol_shared Fix streamNotify so that it works with binary data 2023-11-22 21:06:50 +00:00
dartdev Remove explicit enable of inline class 2024-01-19 14:05:48 +00:00
dds [dds][dap] Fix global evaluation inside package: files 2024-01-23 16:38:32 +00:00
dds_service_extensions [package:dds_service_extensions] Prepare to publish version 1.6.3 2023-12-13 16:11:12 +00:00
dev_compiler [ddc] Reset all initialized consts on hot restart 2024-01-22 23:25:18 +00:00
dtd Adding types to DTD service and extension exports 2023-12-27 20:19:39 +00:00
dtd_impl Solidify, test and document DTD errors 2024-01-18 16:07:31 +00:00
expect
front_end Remove redundant if test from InferenceVisitorBase._inferInvocation. 2024-01-23 16:15:01 +00:00
frontend_server [frontend_server/DDC] Expression compilation for JavaScript can pass scriptUri 2024-01-10 10:12:22 +00:00
heap_snapshot [pkg] switches the default linting for pkg/ packages to dart_flutter_team_lints 2023-11-11 01:52:16 +00:00
js [pkg:js] Update changelog to better comment breaking change in 0.7.0 2024-01-05 21:16:11 +00:00
js_ast [js_ast] Fix js_ast printer bugs 2024-01-20 02:06:59 +00:00
js_runtime
js_shared [web] Move Variance to js_shared/lib/ for shared use. 2023-12-22 18:16:01 +00:00
kernel [cfe] Support json_serializable macro 2024-01-23 12:24:49 +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 linter: fix unn parentheses with nullable extended type 2024-01-17 00:10:28 +00:00
meta [meta] Cleanup API docs and clarify superseded annotation status 2024-01-10 02:10:36 +00:00
mmap Revert "[ffi]: Remove pointer elementAt method." 2024-01-22 12:20:48 +00:00
modular_test
native_stack_traces Also add global owners to CFE/VM packages 2023-11-27 14:35:52 +00:00
scrape [scrape] Use dart_flutter_team_lints as base for analysis 2023-12-07 17:57:31 +00:00
smith [dart2wasm] Add support for testing dart2wasm with JSC 2024-01-22 12:04:37 +00:00
sourcemap_testing Include ARM64 when uploading d8. 2023-11-21 17:15:20 +00:00
status_file
telemetry
test_runner [dart2wasm] Add support for testing dart2wasm with JSC 2024-01-22 12:04:37 +00:00
testing Remove unused options from package:testing (batch 2) 2024-01-19 08:15:03 +00:00
vm Revert "[ffi]: Remove pointer elementAt method." 2024-01-22 12:20:48 +00:00
vm_service [ package:vm_service ] Fix get_isolate_rpc_test flakiness 2024-01-18 20:10:40 +00:00
vm_service_interface [vm] Bump service protocol to 4.14 and hide implementation 2024-01-16 18:25:18 +00:00
vm_service_protos Also add global owners to CFE/VM packages 2023-11-27 14:35:52 +00:00
vm_snapshot_analysis Also add global owners to CFE/VM packages 2023-11-27 14:35:52 +00:00
wasm_builder [dart2wasm] Fix table.get/set instruction builders 2023-12-07 15:05:14 +00:00
.gitignore
analysis_options.yaml [pkg] switches the default linting for pkg/ packages to dart_flutter_team_lints 2023-11-11 01:52:16 +00:00
BUILD.gn
OWNERS
pkg.dart [pkg] switches the default linting for pkg/ packages to dart_flutter_team_lints 2023-11-11 01:52:16 +00:00
pkg.status [VM/vm_service] Fix for https://github.com/dart-lang/sdk/issues/54641 2024-01-17 19:19:23 +00:00
README.md

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. Its 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