[dyn_modules] Remove ability to specify library wildcards in dynamic_interface.yaml files
In future this would allow us to automatically include libraries specified in dynamic_interface.yaml into the compilation set as if they were imported from Dart code. Bug: b/452833638 TEST=ci CoreLibraryReviewExempt: no API changes, only pragmas Change-Id: If5705159148cd48f49f21485550747db1365767c Cq-Include-Trybots: luci.dart.try:vm-aot-dyn-linux-debug-x64-try,vm-aot-dyn-linux-product-x64-try,vm-dyn-linux-debug-x64-try,vm-dyn-mac-debug-arm64-try,vm-ffi-dyn-mac-debug-simarm64_arm64-try,vm-ffi-dyn-mac-release-simarm64_arm64-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456401 Reviewed-by: Slava Egorov <vegorov@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
@@ -157,21 +157,6 @@ class DynamicInterfaceSpecification {
|
||||
}
|
||||
|
||||
final String librarySpec = yamlMap['library'] as String;
|
||||
if (librarySpec.endsWith('*')) {
|
||||
// Coverage-ignore-block(suite): Not run.
|
||||
_verifyKeys(yamlMap, const {'library'});
|
||||
final String prefix = baseUri
|
||||
.resolve(librarySpec.substring(0, librarySpec.length - 1))
|
||||
.toString();
|
||||
final List<Library> libs = component.libraries
|
||||
.where((lib) => lib.importUri.toString().startsWith(prefix))
|
||||
.toList();
|
||||
if (libs.isEmpty) {
|
||||
throw 'No libraries found for pattern "$librarySpec"';
|
||||
}
|
||||
result.addAll(libs);
|
||||
return;
|
||||
}
|
||||
final String libraryUri = baseUri.resolve(librarySpec).toString();
|
||||
|
||||
if (yamlMap.containsKey('class')) {
|
||||
|
||||
@@ -51,16 +51,6 @@ dynamic module can override.
|
||||
Library item specifies all _public_ classes and members in the given
|
||||
library. Public members of private classes are not included.
|
||||
|
||||
## Library prefix
|
||||
|
||||
```
|
||||
- library: '<prefix>*'
|
||||
```
|
||||
|
||||
Library prefix item specifies all _public_ classes and members of
|
||||
all libraries with given prefix. Public members of private classes are not included.
|
||||
|
||||
|
||||
## Class
|
||||
|
||||
```
|
||||
@@ -105,9 +95,6 @@ callable:
|
||||
# All public classes and members in `dart:core`.
|
||||
- library: 'dart:core'
|
||||
|
||||
# All public classes and members in `package:flutter`.
|
||||
- library: 'package:flutter/*'
|
||||
|
||||
# Only `foo` in `package:my_app/dyn_interface.dart`.
|
||||
- library: 'package:my_app/dyn_interface.dart'
|
||||
member: foo
|
||||
|
||||
@@ -10,7 +10,8 @@ callable:
|
||||
- library: 'lib3.dart'
|
||||
class: ['A', 'B']
|
||||
- library: 'lib4.dart'
|
||||
- library: 'prefix/lib*'
|
||||
- library: 'prefix/lib1.dart'
|
||||
- library: 'prefix/lib2.dart'
|
||||
|
||||
extendable:
|
||||
- library: 'lib1.dart'
|
||||
|
||||
@@ -32,6 +32,7 @@ class LateError extends Error {
|
||||
: _message = "Local '${localName}' has not been initialized.";
|
||||
|
||||
/// Final variable written more than once.
|
||||
@pragma("vm:entry-point")
|
||||
LateError.fieldAI(String fieldName)
|
||||
: _message = "Field '${fieldName}' has already been initialized.";
|
||||
|
||||
@@ -59,6 +60,7 @@ class LateError extends Error {
|
||||
class ReachabilityError extends Error {
|
||||
final String? _message;
|
||||
|
||||
@pragma("vm:entry-point")
|
||||
ReachabilityError([this._message]);
|
||||
|
||||
String toString() {
|
||||
|
||||
@@ -3,10 +3,51 @@
|
||||
# BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
extendable:
|
||||
- library: 'dart:*'
|
||||
- library: 'dart:async'
|
||||
- library: 'dart:cli'
|
||||
- library: 'dart:collection'
|
||||
- library: 'dart:concurrent'
|
||||
- library: 'dart:convert'
|
||||
- library: 'dart:core'
|
||||
- library: 'dart:developer'
|
||||
- library: 'dart:ffi'
|
||||
- library: 'dart:io'
|
||||
- library: 'dart:isolate'
|
||||
- library: 'dart:math'
|
||||
- library: 'dart:nativewrappers'
|
||||
- library: 'dart:typed_data'
|
||||
- library: 'dart:vmservice_io'
|
||||
|
||||
can-be-overridden:
|
||||
- library: 'dart:*'
|
||||
- library: 'dart:async'
|
||||
- library: 'dart:cli'
|
||||
- library: 'dart:collection'
|
||||
- library: 'dart:concurrent'
|
||||
- library: 'dart:convert'
|
||||
- library: 'dart:core'
|
||||
- library: 'dart:developer'
|
||||
- library: 'dart:ffi'
|
||||
- library: 'dart:io'
|
||||
- library: 'dart:isolate'
|
||||
- library: 'dart:math'
|
||||
- library: 'dart:nativewrappers'
|
||||
- library: 'dart:typed_data'
|
||||
- library: 'dart:vmservice_io'
|
||||
|
||||
callable:
|
||||
- library: 'dart:*'
|
||||
- library: 'dart:async'
|
||||
- library: 'dart:cli'
|
||||
- library: 'dart:collection'
|
||||
- library: 'dart:concurrent'
|
||||
- library: 'dart:convert'
|
||||
- library: 'dart:core'
|
||||
- library: 'dart:developer'
|
||||
- library: 'dart:ffi'
|
||||
- library: 'dart:io'
|
||||
- library: 'dart:isolate'
|
||||
- library: 'dart:math'
|
||||
- library: 'dart:nativewrappers'
|
||||
- library: 'dart:typed_data'
|
||||
- library: 'dart:vmservice_io'
|
||||
- library: 'dart:_internal'
|
||||
member: 'extractTypeArguments'
|
||||
|
||||
Reference in New Issue
Block a user