[roll] Update third-party dart packages
Roller-URL: https://ci.chromium.org/b/8789084263508301729
Roller-Owners: flutter-on-fuchsia-team@google.com, godofredoc@google.com
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: Ifffd22c74f607f431fd4c3726e474f8d616b4105
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/dart-pkg/+/803627
Commit-Queue: GI Roller <global-integration-roller@fuchsia-infra.iam.gserviceaccount.com>
diff --git a/args/BUILD.gn b/args/BUILD.gn
index 02d4be2..2200e27 100644
--- a/args/BUILD.gn
+++ b/args/BUILD.gn
@@ -1,4 +1,4 @@
-# This file is generated by package_importer.py for args-2.3.2
+# This file is generated by package_importer.py for args-2.4.0
import("//build/dart/dart_library.gni")
diff --git a/args/CHANGELOG.md b/args/CHANGELOG.md
index 94c7c5a..e605d07 100644
--- a/args/CHANGELOG.md
+++ b/args/CHANGELOG.md
@@ -1,3 +1,9 @@
+## 2.4.0
+
+* Command suggestions will now also suggest based on aliases of a command.
+* Introduce getter `Command.suggestionAliases` for names that cannot be used as
+ aliases, but will trigger suggestions.
+
## 2.3.2
* Require Dart 2.18
diff --git a/args/README.md b/args/README.md
index 33c2b00..379893b 100644
--- a/args/README.md
+++ b/args/README.md
@@ -443,25 +443,10 @@
[ia32] Intel x86
```
-## Contributions, PRs, and publishing
+## Publishing automation
-When contributing to this repo:
-
-- if the package version is a stable semver version (`x.y.z`), the latest
- changes have been published to pub. Please add a new changelog section for
- your change, rev the service portion of the version, append `-dev`, and update
- the pubspec version to agree with the new version
-- if the package version ends in `-dev`, the latest changes are unpublished;
- please add a new changelog entry for your change in the most recent section.
- When we decide to publish the latest changes we'll drop the `-dev` suffix
- from the package version
-- for PRs, the `Publish` bot will perform basic validation of the info in the
- pubspec.yaml and CHANGELOG.md files
-- when the PR is merged into the main branch, if the change includes reving to
- a new stable version, a repo maintainer will tag that commit with the pubspec
- version (e.g., `v1.2.3`); that tag event will trigger the `Publish` bot to
- publish a new version of the package to pub.dev
-
+For information about our publishing automation and release process, see
+https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.
[posix]: https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html#tag_12_02
[gnu]: https://www.gnu.org/prep/standards/standards.html#Command_002dLine-Interfaces
diff --git a/args/lib/command_runner.dart b/args/lib/command_runner.dart
index e2c9192..183264d 100644
--- a/args/lib/command_runner.dart
+++ b/args/lib/command_runner.dart
@@ -220,10 +220,17 @@
SplayTreeSet<Command<T>>((a, b) => distances[a]! - distances[b]!);
for (var command in commands) {
if (command.hidden) continue;
- var distance = _editDistance(name, command.name);
- if (distance <= suggestionDistanceLimit) {
- distances[command] = distance;
- candidates.add(command);
+ for (var alias in [
+ command.name,
+ ...command.aliases,
+ ...command.suggestionAliases
+ ]) {
+ var distance = _editDistance(name, alias);
+ if (distance <= suggestionDistanceLimit) {
+ distances[command] =
+ math.min(distances[command] ?? distance, distance);
+ candidates.add(command);
+ }
}
}
if (candidates.isEmpty) return '';
@@ -412,6 +419,17 @@
/// This is intended to be overridden.
List<String> get aliases => const [];
+ /// Alternate non-functional names for this command.
+ ///
+ /// These names won't be used in the documentation, and also they won't work
+ /// when invoked on the command line. But if an unknown command is used it
+ /// will be matched against this when creating suggestions.
+ ///
+ /// A name does not have to be repeated both here and in [aliases].
+ ///
+ /// This is intended to be overridden.
+ List<String> get suggestionAliases => const [];
+
Command() {
if (!argParser.allowsAnything) {
argParser.addFlag('help',
diff --git a/args/pubspec.yaml b/args/pubspec.yaml
index 589a067..c3b52f8 100644
--- a/args/pubspec.yaml
+++ b/args/pubspec.yaml
@@ -1,5 +1,5 @@
name: args
-version: 2.3.2
+version: 2.4.0
description: >-
Library for defining parsers for parsing raw command-line arguments into a set
of options and values using GNU and POSIX style options.
diff --git a/coverage/BUILD.gn b/coverage/BUILD.gn
index 0f2b3d0..f70403e 100644
--- a/coverage/BUILD.gn
+++ b/coverage/BUILD.gn
@@ -1,11 +1,11 @@
-# This file is generated by package_importer.py for coverage-1.6.2
+# This file is generated by package_importer.py for coverage-1.6.3
import("//build/dart/dart_library.gni")
dart_library("coverage") {
package_name = "coverage"
- language_version = "2.15"
+ language_version = "2.18"
disable_analysis = true
diff --git a/coverage/CHANGELOG.md b/coverage/CHANGELOG.md
index 54a205e..cc1f659 100644
--- a/coverage/CHANGELOG.md
+++ b/coverage/CHANGELOG.md
@@ -1,3 +1,8 @@
+## 1.6.3
+
+- Require Dart 2.18
+- Update `package:vm_service` constraints to '>=9.4.0 <12.0.0'.
+
## 1.6.2
- Update `package:vm_service` constraints to '>=9.4.0 <11.0.0'.
diff --git a/coverage/analysis_options.yaml b/coverage/analysis_options.yaml
index 71eda7f..95df488 100644
--- a/coverage/analysis_options.yaml
+++ b/coverage/analysis_options.yaml
@@ -9,61 +9,15 @@
linter:
rules:
- # these rules are documented on and in the same order as
- # the Dart Lint rules page to make maintenance easier
- # http://dart-lang.github.io/linter/lints/
-
- # === error rules ===
- - avoid_empty_else
- - avoid_slow_async_io
- - comment_references
- - cancel_subscriptions
- # - close_sinks
- - control_flow_in_finally
- - empty_statements
- - hash_and_equals
- - iterable_contains_unrelated_type
- - list_remove_unrelated_type
- - literal_only_boolean_expressions
- - test_types_in_equals
- - throw_in_finally
- - unrelated_type_equality_checks
- - valid_regexps
-
- # === style rules ===
- always_declare_return_types
- # - always_specify_types
- - annotate_overrides
- - avoid_init_to_null
- - avoid_return_types_on_setters
- - await_only_futures
- - camel_case_types
- - constant_identifier_names
- - empty_constructor_bodies
- - implementation_imports
- - library_names
- - library_prefixes
- - no_leading_underscores_for_local_identifiers
- - non_constant_identifier_names
- # - one_member_abstracts
- # - only_throw_errors
- - overridden_fields
+ - avoid_slow_async_io
+ - cancel_subscriptions
+ - comment_references
+ - literal_only_boolean_expressions
- package_api_docs
- - package_prefixed_library_names
- - prefer_equal_for_default_values
- prefer_final_locals
- - prefer_generic_function_type_aliases
- - prefer_is_not_empty
- # - public_member_api_docs
- - slash_for_doc_comments
- sort_constructors_first
- sort_unnamed_constructors_first
- - type_annotate_public_apis # subset of always_specify_types
- - type_init_formals
- - unnecessary_brace_in_string_interps
- - unnecessary_const
- - unnecessary_getters_setters
- - unnecessary_new
-
- # === pub rules ===
- - package_names
+ - test_types_in_equals
+ - throw_in_finally
+ - type_annotate_public_apis
diff --git a/coverage/pubspec.yaml b/coverage/pubspec.yaml
index df9d41d..1411ae8 100644
--- a/coverage/pubspec.yaml
+++ b/coverage/pubspec.yaml
@@ -1,10 +1,10 @@
name: coverage
-version: 1.6.2
+version: 1.6.3
description: Coverage data manipulation and formatting
repository: https://github.com/dart-lang/coverage
environment:
- sdk: '>=2.15.0 <3.0.0'
+ sdk: '>=2.18.0 <3.0.0'
dependencies:
args: ^2.0.0
@@ -13,13 +13,13 @@
path: ^1.8.0
source_maps: ^0.10.10
stack_trace: ^1.10.0
- vm_service: '>=9.4.0 <11.0.0'
+ vm_service: '>=9.4.0 <12.0.0'
dev_dependencies:
benchmark_harness: ^2.2.0
build_runner: ^2.1.10
- lints: ^1.0.0
- mockito: ^5.1.0
+ lints: ^2.0.0
+ mockito: ^5.3.2
test: ^1.16.0
test_descriptor: ^2.0.0
test_process: ^2.0.0
diff --git a/dds/BUILD.gn b/dds/BUILD.gn
index 7953ee2..da30b8a 100644
--- a/dds/BUILD.gn
+++ b/dds/BUILD.gn
@@ -1,4 +1,4 @@
-# This file is generated by package_importer.py for dds-2.7.4
+# This file is generated by package_importer.py for dds-2.7.5
import("//build/dart/dart_library.gni")
diff --git a/dds/CHANGELOG.md b/dds/CHANGELOG.md
index 91a7c0c..108e830 100644
--- a/dds/CHANGELOG.md
+++ b/dds/CHANGELOG.md
@@ -1,3 +1,6 @@
+# 2.7.5
+- Updated `vm_service` version to >=9.0.0 <12.0.0.
+
# 2.7.4
- [DAP] Added support for `,d` (decimal), `,h` (hex) and `,nq` (no quotes) format specifiers to be used as suffixes to evaluation requests.
- [DAP] Added support for `format.hex` in `variablesRequest` and `evaluateRequest`.
diff --git a/dds/lib/src/dap/adapters/dart.dart b/dds/lib/src/dap/adapters/dart.dart
index ec62a80..9a03adc 100644
--- a/dds/lib/src/dap/adapters/dart.dart
+++ b/dds/lib/src/dap/adapters/dart.dart
@@ -443,7 +443,7 @@
/// Capabilities of the DDS instance available in the connected VM Service.
///
/// If the VM Service is not yet connected, does not have a DDS instance, or
- /// the version has not been been fetched, all capabilities will be false.
+ /// the version has not been fetched, all capabilities will be false.
_DdsCapabilities _ddsCapabilities = _DdsCapabilities.empty;
/// The ID of the custom VM Service stream that emits events intended for
@@ -527,7 +527,7 @@
/// to this request.
Future<void> attachImpl();
- /// [attachRequest] is called by the client when it wants us to to attach to
+ /// [attachRequest] is called by the client when it wants us to attach to
/// an existing app. This will only be called once (and only one of this or
/// launchRequest will be called).
@override
@@ -1155,7 +1155,7 @@
/// to this request.
Future<void> launchImpl();
- /// [launchRequest] is called by the client when it wants us to to start the app
+ /// [launchRequest] is called by the client when it wants us to start the app
/// to be run/debug. This will only be called once (and only one of this or
/// [attachRequest] will be called).
@override
@@ -1355,7 +1355,7 @@
sendResponse(SetExceptionBreakpointsResponseBody());
}
- /// Shuts down/detatches from the debugee and cleans up.
+ /// Shuts down/detaches from the debugee and cleans up.
///
/// This is called by [disconnectRequest] and [terminateRequest] but may also
/// be called if the client just disconnects from the server without calling
@@ -1368,7 +1368,7 @@
_dds = null;
}
- /// Shuts down the debug adapter, including terminating/detatching from the
+ /// Shuts down the debug adapter, including terminating/detaching from the
/// debugee if required.
@nonVirtual
Future<void> shutdown() async {
@@ -2100,15 +2100,64 @@
}
}
+ /// Resolves any URI stored in [data] with key [field] to a local file URI via
+ /// the VM Service and adds it to [data] with a 'resolved' prefix.
+ ///
+ /// A resolved URI will not be added if the URI cannot be resolved or is
+ /// already a 'file://' URI.
+ Future<void> resolveToolEventUris(
+ vm.IsolateRef? isolate,
+ Map<String, Object?> data,
+ String field,
+ ) async {
+ final thread = _isolateManager.threadForIsolate(isolate);
+ if (thread == null) {
+ return;
+ }
+
+ final uriString = data[field];
+ if (uriString is! String) {
+ return;
+ }
+ final uri = Uri.tryParse(uriString);
+ if (uri == null) {
+ return;
+ }
+
+ if (uri.isScheme('file')) {
+ return;
+ }
+
+ final path = await thread.resolveUriToPath(uri);
+ if (path != null) {
+ // Convert:
+ // uri -> resolvedUri
+ // fileUri -> resolvedFileUri
+ final resolvedFieldName =
+ 'resolved${field.substring(0, 1).toUpperCase()}${field.substring(1)}';
+ data[resolvedFieldName] = Uri.file(path).toString();
+ }
+ }
+
@protected
@mustCallSuper
Future<void> handleToolEvent(vm.Event event) async {
await debuggerInitialized;
+ // Some events will contain URIs that need to first be mapped to file URIs
+ // so the IDE can understand them.
+ final data = event.extensionData?.data;
+ if (data is Map<String, Object?>) {
+ const uriFieldNames = ['fileUri', 'uri'];
+ for (final fieldName in uriFieldNames) {
+ await resolveToolEventUris(event.isolate, data, fieldName);
+ }
+ }
+
sendEvent(
RawEventBody({
'kind': event.extensionKind,
- 'data': event.extensionData?.data,
+ 'data': data,
}),
eventType: 'dart.toolEvent',
);
diff --git a/dds/lib/src/dap/adapters/mixins.dart b/dds/lib/src/dap/adapters/mixins.dart
index 420c61e..c7cbea8 100644
--- a/dds/lib/src/dap/adapters/mixins.dart
+++ b/dds/lib/src/dap/adapters/mixins.dart
@@ -138,7 +138,7 @@
/// Creates a temp folder for the VM to write the service-info-file into and
/// returns the [File] to use.
File generateVmServiceInfoFile() {
- // Using tmpDir.createTempory() is flakey on Windows+Linux (at least
+ // Using tmpDir.createTemporary() is flakey on Windows+Linux (at least
// on GitHub Actions) complaining the file does not exist when creating a
// watcher. Creating/watching a folder and writing the file into it seems
// to be reliable.
diff --git a/dds/lib/src/dap/protocol_generated.dart b/dds/lib/src/dap/protocol_generated.dart
index e413f0a..1644eaa 100644
--- a/dds/lib/src/dap/protocol_generated.dart
+++ b/dds/lib/src/dap/protocol_generated.dart
@@ -6188,7 +6188,7 @@
/// The client can use this optional information to present the children in a
/// paged UI and fetch them in chunks.
class Variable {
- /// Optional evaluatable name of this variable which can be passed to the
+ /// Optional evaluable name of this variable which can be passed to the
/// 'EvaluateRequest' to fetch the variable's value.
final String? evaluateName;
diff --git a/dds/lib/src/devtools/client.dart b/dds/lib/src/devtools/client.dart
index 629b920..c8543d2 100644
--- a/dds/lib/src/devtools/client.dart
+++ b/dds/lib/src/devtools/client.dart
@@ -147,7 +147,7 @@
}
};
- /// Checks whether two VM Services are equiavlent.
+ /// Checks whether two VM Services are equivalent.
///
/// Checking the whole URI will fail if DevTools converted it from HTTP to
/// WS, so just checks the host, port and first segment of path (token).
@@ -186,7 +186,7 @@
print('DevTools SSE request: $e');
return e;
});
- sink = LoggingMiddlewareSink(sink);
+ sink = LoggingMiddlewareSink<String>(sink);
}
_devToolsPeer = json_rpc.Peer(
diff --git a/dds/pubspec.yaml b/dds/pubspec.yaml
index f297d5f..0c386bf 100644
--- a/dds/pubspec.yaml
+++ b/dds/pubspec.yaml
@@ -1,5 +1,5 @@
name: dds
-version: 2.7.4
+version: 2.7.5
description: >-
A library used to spawn the Dart Developer Service, used to communicate with
a Dart VM Service instance.
@@ -26,7 +26,7 @@
sse: ^4.0.0
stack_trace: ^1.10.0
stream_channel: ^2.0.0
- vm_service: '>=9.0.0 <11.0.0'
+ vm_service: '>=9.0.0 <12.0.0'
web_socket_channel: ^2.0.0
# We use 'any' version constraints here as we get our package versions from
diff --git a/dds/tool/dap/codegen.dart b/dds/tool/dap/codegen.dart
index 22a527c..630cf37 100644
--- a/dds/tool/dap/codegen.dart
+++ b/dds/tool/dap/codegen.dart
@@ -116,7 +116,7 @@
/// Writes a `canParse` function for a DAP spec class.
///
- /// The function checks whether an Object? is a a valid map that contains all
+ /// The function checks whether an Object? is a valid map that contains all
/// required fields and matches the types of the spec class.
///
/// This is used where the spec contains union classes and we need to decide
diff --git a/dds/tool/dap/external_dap_spec/debugAdapterProtocol.json b/dds/tool/dap/external_dap_spec/debugAdapterProtocol.json
index df4f9ad..31c2ef5 100644
--- a/dds/tool/dap/external_dap_spec/debugAdapterProtocol.json
+++ b/dds/tool/dap/external_dap_spec/debugAdapterProtocol.json
@@ -1440,7 +1440,7 @@
{ "$ref": "#/definitions/Request" },
{
"type": "object",
- "description": "Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from a diassembly window. \nTo clear all instruction breakpoints, specify an empty array.\nWhen an instruction breakpoint is hit, a 'stopped' event (with reason 'instruction breakpoint') is generated.\nClients should only call this request if the capability 'supportsInstructionBreakpoints' is true.",
+ "description": "Replaces all existing instruction breakpoints. Typically, instruction breakpoints would be set from a disassembly window. \nTo clear all instruction breakpoints, specify an empty array.\nWhen an instruction breakpoint is hit, a 'stopped' event (with reason 'instruction breakpoint') is generated.\nClients should only call this request if the capability 'supportsInstructionBreakpoints' is true.",
"properties": {
"command": {
"type": "string",
@@ -3370,7 +3370,7 @@
},
"evaluateName": {
"type": "string",
- "description": "Optional evaluatable name of this variable which can be passed to the 'EvaluateRequest' to fetch the variable's value."
+ "description": "Optional evaluable name of this variable which can be passed to the 'EvaluateRequest' to fetch the variable's value."
},
"variablesReference": {
"type": "integer",
diff --git a/package_config.json b/package_config.json
index 5861dbe..0ebdf47 100644
--- a/package_config.json
+++ b/package_config.json
@@ -117,7 +117,7 @@
"rootUri": "./convert/"
},
{
- "languageVersion": "2.15",
+ "languageVersion": "2.18",
"name": "coverage",
"packageUri": "lib/",
"rootUri": "./coverage/"
diff --git a/test/BUILD.gn b/test/BUILD.gn
index d4acc63..a247fb6 100644
--- a/test/BUILD.gn
+++ b/test/BUILD.gn
@@ -1,4 +1,4 @@
-# This file is generated by package_importer.py for test-1.22.2
+# This file is generated by package_importer.py for test-1.23.1
import("//build/dart/dart_library.gni")
diff --git a/test/CHANGELOG.md b/test/CHANGELOG.md
index 84e1f7d..83c819f 100644
--- a/test/CHANGELOG.md
+++ b/test/CHANGELOG.md
@@ -1,3 +1,15 @@
+## 1.23.1
+
+* Fix running paths by absolute path (with drive letter) on windows.
+
+## 1.23.0
+
+* Avoid empty expandable groups for tests without extra output in Github
+ reporter.
+* Add support for CHROME_EXECUTABLE environment variable. This overrides any
+ config file settings.
+* Support running tests by absolute file uri.
+
## 1.22.2
* Don't run `tearDown` until the test body and outstanding work is complete,
diff --git a/test/README.md b/test/README.md
index 14db941..b0877ae 100644
--- a/test/README.md
+++ b/test/README.md
@@ -1,7 +1,10 @@
-[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/dart-lang/test/badge)](https://api.securityscorecards.dev/projects/github.com/dart-lang/test)
+[![pub package](https://img.shields.io/pub/v/test.svg)](https://pub.dev/packages/test)
+[![package publisher](https://img.shields.io/pub/publisher/test.svg)](https://pub.dev/packages/test/publisher)
`test` provides a standard way of writing and running tests in Dart.
+## Using package:test
+
* [Writing Tests](#writing-tests)
* [Running Tests](#running-tests)
* [Sharding Tests](#sharding-tests)
diff --git a/test/lib/src/runner/executable_settings.dart b/test/lib/src/runner/executable_settings.dart
index 84a8c5a..cf073de 100644
--- a/test/lib/src/runner/executable_settings.dart
+++ b/test/lib/src/runner/executable_settings.dart
@@ -36,6 +36,9 @@
/// The path to the executable for the current operating system.
String get executable {
+ final envVariable = Platform.environment['CHROME_EXECUTABLE'];
+ if (envVariable != null) return envVariable;
+
if (Platform.isMacOS) return _macOSExecutable!;
if (!Platform.isWindows) return _linuxExecutable!;
final windowsExecutable = _windowsExecutable!;
diff --git a/test/lib/src/runner/wasm/default_settings.dart b/test/lib/src/runner/wasm/default_settings.dart
index 77c2f53..02c8ee4 100644
--- a/test/lib/src/runner/wasm/default_settings.dart
+++ b/test/lib/src/runner/wasm/default_settings.dart
@@ -14,7 +14,7 @@
macOSExecutable: null,
windowsExecutable: null,
arguments: [
- '--js-flags=--experimental-wasm-gc --wasm-gc-js-interop '
+ '--js-flags=--experimental-wasm-gc '
'--experimental-wasm-stack-switching '
'--experimental-wasm-type-reflection'
]),
diff --git a/test/lib/src/runner/wasm/platform.dart b/test/lib/src/runner/wasm/platform.dart
index 568bfde..437c9bb 100644
--- a/test/lib/src/runner/wasm/platform.dart
+++ b/test/lib/src/runner/wasm/platform.dart
@@ -162,7 +162,7 @@
var testName = htmlEscape.convert(test);
var template = _config.customHtmlTemplatePath ?? _defaultTemplatePath;
var contents = File(template).readAsStringSync();
- var jsRuntime = 'dart2wasm_runtime.mjs';
+ var jsRuntime = p.basename('$test.browser_test.dart.mjs');
var processedContents = contents
// Checked during loading phase that there is only one {{testScript}} placeholder.
.replaceFirst('{{testScript}}', link)
@@ -246,7 +246,7 @@
'${p.toUri(p.relative(dartPath, from: _root)).path}.browser_test.dart';
var wasmUrl = '$baseUrl.wasm';
var jsRuntimeWrapperUrl = '$baseUrl.js';
- var jsRuntimeUrl = p.join(p.dirname(dartPath), 'dart2wasm_runtime.mjs');
+ var jsRuntimeUrl = '$baseUrl.mjs';
var htmlUrl = '$baseUrl.html';
var bootstrapContent = '''
@@ -274,7 +274,7 @@
headers: {'Content-Type': 'application/javascript'});
});
- var jsRuntimePath = p.join(dir, 'dart2wasm_runtime.mjs');
+ var jsRuntimePath = '$baseCompiledPath.mjs';
_wasmHandler.add(jsRuntimeUrl, (request) {
return shelf.Response.ok(File(jsRuntimePath).readAsBytesSync(),
headers: {'Content-Type': 'application/javascript'});
diff --git a/test/pubspec.yaml b/test/pubspec.yaml
index ea887f9..f84a37e 100644
--- a/test/pubspec.yaml
+++ b/test/pubspec.yaml
@@ -1,5 +1,5 @@
name: test
-version: 1.22.2
+version: 1.23.1
description: >-
A full featured library for writing and running Dart tests across platforms.
repository: https://github.com/dart-lang/test/tree/master/pkgs/test
@@ -33,7 +33,7 @@
yaml: ^3.0.0
# Use an exact version until the test_api and test_core package are stable.
test_api: 0.4.18
- test_core: 0.4.22
+ test_core: 0.4.24
dev_dependencies:
fake_async: ^1.0.0
@@ -41,9 +41,3 @@
lints: '>=1.0.0 <3.0.0'
test_descriptor: ^2.0.0
test_process: ^2.0.0
-
-# dependency_overrides:
-# test_core:
-# path: ../test_core
-# test_api:
-# path: ../test_api
diff --git a/test_core/BUILD.gn b/test_core/BUILD.gn
index 43ea1ce..dd6defb 100644
--- a/test_core/BUILD.gn
+++ b/test_core/BUILD.gn
@@ -1,4 +1,4 @@
-# This file is generated by package_importer.py for test_core-0.4.22
+# This file is generated by package_importer.py for test_core-0.4.24
import("//build/dart/dart_library.gni")
diff --git a/test_core/CHANGELOG.md b/test_core/CHANGELOG.md
index 4fe2736..acad370 100644
--- a/test_core/CHANGELOG.md
+++ b/test_core/CHANGELOG.md
@@ -1,10 +1,21 @@
-# 0.4.22
+## 0.4.24
+
+* Fix running paths by absolute path (with drive letter) on windows.
+
+## 0.4.23
+
+* Avoid empty expandable groups for tests without extra output in Github
+ reporter.
+* Support running tests by absolute file uri.
+* Update `vm_service` constraint to `>=6.0.0 <12.0.0`.
+
+## 0.4.22
* Don't run `tearDown` until the test body and outstanding work is complete,
even if the test has already failed.
* Update `vm_service` constraint to `>=6.0.0 <11.0.0`.
-# 0.4.21
+## 0.4.21
* Move `includeTags` and `excludeTags` from `SuiteConfiguration` to
`Configuration`.
@@ -13,24 +24,24 @@
* Fix VM tests which run after some test has changed the working directory.
There are still issues with browser tests after changing directory.
-# 0.4.20
+## 0.4.20
* Fix an issue with the github reporter where tests that fail asynchronously
after they've completed would show up as succeeded tests.
* Support the latest `package:test_api`.
* Refactor `CompilerPool` to be abstract, add wasm compiler pool.
-# 0.4.19
+## 0.4.19
* Support `package:matcher` version `0.12.13`.
* Require Dart SDK version 2.18.
-# 0.4.18
+## 0.4.18
* Support the latest `package:test_api`.
* Support the latest `package:analyzer`.
-# 0.4.17
+## 0.4.17
* Support the latest `package:test_api`.
* Support the latest `package:frontend_server_client`.
diff --git a/test_core/README.md b/test_core/README.md
index 46d64fd..67f21a8 100644
--- a/test_core/README.md
+++ b/test_core/README.md
@@ -1,3 +1,6 @@
+[![pub package](https://img.shields.io/pub/v/test_core.svg)](https://pub.dev/packages/test_core)
+[![package publisher](https://img.shields.io/pub/publisher/test_core.svg)](https://pub.dev/packages/test_core/publisher)
+
A minimal package for writing and running tests as well as extensions for
implementing a custom test runner.
diff --git a/test_core/lib/src/runner.dart b/test_core/lib/src/runner.dart
index ae7d6ee..0c54015 100644
--- a/test_core/lib/src/runner.dart
+++ b/test_core/lib/src/runner.dart
@@ -7,7 +7,6 @@
import 'package:async/async.dart';
import 'package:boolean_selector/boolean_selector.dart';
-import 'package:path/path.dart' as p;
import 'package:stack_trace/stack_trace.dart';
// ignore: deprecated_member_use
import 'package:test_api/backend.dart'
@@ -317,7 +316,8 @@
'Cannot filter by line/column for this test suite, no suite'
'path available.');
}
- var absoluteSuitePath = p.absolute(path);
+ // The absolute path as it will appear in stack traces.
+ var absoluteSuitePath = File(path).absolute.uri.toFilePath();
bool matchLineAndCol(Frame frame) {
if (frame.uri.scheme != 'file' ||
diff --git a/test_core/lib/src/runner/configuration/args.dart b/test_core/lib/src/runner/configuration/args.dart
index fcd2e89..1b3d772 100644
--- a/test_core/lib/src/runner/configuration/args.dart
+++ b/test_core/lib/src/runner/configuration/args.dart
@@ -177,41 +177,47 @@
void _parseTestSelection(
String option, Map<String, Set<TestSelection>> selections) {
- var firstQuestion = option.indexOf('?');
- TestSelection selection;
- String path;
- if (firstQuestion == -1) {
- path = option;
- selection = TestSelection();
- } else if (option.substring(0, firstQuestion).contains('\\')) {
- throw FormatException(
- 'When passing test path queries, you must pass the path in URI '
- 'format (use `/` for directory separators instead of `\\`).');
- } else {
- final uri = Uri.parse(option);
-
- final names = uri.queryParametersAll['name'];
- final fullName = uri.queryParameters['full-name'];
- final line = uri.queryParameters['line'];
- final col = uri.queryParameters['col'];
-
- if (names != null && names.isNotEmpty && fullName != null) {
- throw FormatException(
- 'Cannot specify both "name=<...>" and "full-name=<...>".',
- );
+ if (Platform.isWindows) {
+ // If given a path that starts with what looks like a drive letter, convert it
+ // into a file scheme URI. We can't parse using `Uri.file` because we do
+ // support query parameters which aren't valid file uris.
+ if (option.indexOf(':') == 1) {
+ option = 'file:///$option';
}
- path = uri.path;
- selection = TestSelection(
- testPatterns: fullName != null
- ? {RegExp('^${RegExp.escape(fullName)}\$')}
- : {
- if (names != null)
- for (var name in names) RegExp(name)
- },
- line: line == null ? null : int.parse(line),
- col: col == null ? null : int.parse(col),
+ }
+ final uri = Uri.parse(option);
+ // Decode the path segment. Specifically, on github actions back slashes on
+ // windows end up being encoded into the URI instead of converted into forward
+ // slashes.
+ var path = Uri.decodeComponent(uri.path);
+ // Strip out the leading slash before the drive letter on windows.
+ if (Platform.isWindows &&
+ path.startsWith('/') &&
+ path.length >= 3 &&
+ path[2] == ':') {
+ path = path.substring(1);
+ }
+
+ final names = uri.queryParametersAll['name'];
+ final fullName = uri.queryParameters['full-name'];
+ final line = uri.queryParameters['line'];
+ final col = uri.queryParameters['col'];
+
+ if (names != null && names.isNotEmpty && fullName != null) {
+ throw FormatException(
+ 'Cannot specify both "name=<...>" and "full-name=<...>".',
);
}
+ final selection = TestSelection(
+ testPatterns: fullName != null
+ ? {RegExp('^${RegExp.escape(fullName)}\$')}
+ : {
+ if (names != null)
+ for (var name in names) RegExp(name)
+ },
+ line: line == null ? null : int.parse(line),
+ col: col == null ? null : int.parse(col),
+ );
selections.update(path, (selections) => selections..add(selection),
ifAbsent: () => {selection});
diff --git a/test_core/lib/src/runner/reporter/github.dart b/test_core/lib/src/runner/reporter/github.dart
index d184065..ed9ab5a 100644
--- a/test_core/lib/src/runner/reporter/github.dart
+++ b/test_core/lib/src/runner/reporter/github.dart
@@ -154,15 +154,19 @@
if (_printPlatform) {
name = '[${test.suite.platform.runtime.name}] $name';
}
- _sink.writeln(_GithubMarkup.startGroup('$prefix $name$statusSuffix'));
- for (var message in messages) {
- _sink.writeln(message.text);
+ if (messages.isEmpty && errors.isEmpty) {
+ _sink.writeln('$prefix $name$statusSuffix');
+ } else {
+ _sink.writeln(_GithubMarkup.startGroup('$prefix $name$statusSuffix'));
+ for (var message in messages) {
+ _sink.writeln(message.text);
+ }
+ for (var error in errors) {
+ _sink.writeln('${error.error}');
+ _sink.writeln(error.stackTrace.toString().trimRight());
+ }
+ _sink.writeln(_GithubMarkup.endGroup);
}
- for (var error in errors) {
- _sink.writeln('${error.error}');
- _sink.writeln(error.stackTrace.toString().trimRight());
- }
- _sink.writeln(_GithubMarkup.endGroup);
}
/// A callback called when [test] throws [error].
diff --git a/test_core/lib/src/runner/wasm_compiler_pool.dart b/test_core/lib/src/runner/wasm_compiler_pool.dart
index 08c8955..50efeba 100644
--- a/test_core/lib/src/runner/wasm_compiler_pool.dart
+++ b/test_core/lib/src/runner/wasm_compiler_pool.dart
@@ -32,11 +32,8 @@
var wrapperPath = p.join(dir, 'main.dart');
File(wrapperPath).writeAsStringSync(code);
var outWasmPath = '$path.wasm';
- var outJSPath = p.join(p.dirname(path), 'dart2wasm_runtime.mjs');
var dartBinPath = Platform.resolvedExecutable;
var sdkRoot = p.join(p.dirname(dartBinPath), '../');
- var jsRuntimePath = p.join(sdkRoot, 'bin', 'dart2wasm_runtime.mjs');
- File(jsRuntimePath).copy(outJSPath);
var platformDill =
p.join(sdkRoot, 'lib', '_internal', 'dart2wasm_platform.dill');
var dartPrecompiledRuntimePath = p.join(sdkRoot, 'bin', 'dartaotruntime');
diff --git a/test_core/pubspec.yaml b/test_core/pubspec.yaml
index 88d81b5..aa425ea 100644
--- a/test_core/pubspec.yaml
+++ b/test_core/pubspec.yaml
@@ -1,5 +1,5 @@
name: test_core
-version: 0.4.22
+version: 0.4.24
description: A basic library for writing tests and running them on the VM.
repository: https://github.com/dart-lang/test/tree/master/pkgs/test_core
@@ -25,7 +25,7 @@
source_span: ^1.8.0
stack_trace: ^1.10.0
stream_channel: ^2.1.0
- vm_service: ">=6.0.0 <11.0.0"
+ vm_service: ">=6.0.0 <12.0.0"
yaml: ^3.0.0
# matcher is tightly constrained by test_api
matcher: any
@@ -34,7 +34,3 @@
dev_dependencies:
lints: '>=1.0.0 <3.0.0'
-
-# dependency_overrides:
-# test_api:
-# path: ../test_api