Skip to content

Commit e4b968a

Browse files
scheglovCommit Queue
authored andcommitted
Fine. Filter out dart:core requirements by default from printing.
Change-Id: I6ed69672987741acae26a55e1e943d573f8ee81b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425883 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Paul Berry <[email protected]>
1 parent d47213b commit e4b968a

File tree

2 files changed

+17
-78
lines changed

2 files changed

+17
-78
lines changed

pkg/analyzer/test/src/dart/analysis/driver_test.dart

Lines changed: 6 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -7263,12 +7263,6 @@ void f (B b) {
72637263
topLevels
72647264
dart:core
72657265
int: #M4
7266-
interfaces
7267-
dart:core
7268-
int
7269-
methods
7270-
isEven: #M5
7271-
isEven=: <null>
72727266
[status] idle
72737267
''',
72747268
updateFiles: () {
@@ -7292,13 +7286,13 @@ void f (B b) {
72927286
manifest
72937287
A: #M0
72947288
declaredMembers
7295-
_foo.getter: #M6
7289+
_foo.getter: #M5
72967290
B: #M2
72977291
f: #M3
72987292
requirements
72997293
topLevels
73007294
dart:core
7301-
String: #M7
7295+
String: #M6
73027296
[future] getErrors T2
73037297
ErrorsResult #1
73047298
path: /home/test/lib/test.dart
@@ -7314,17 +7308,7 @@ void f (B b) {
73147308
requirements
73157309
topLevels
73167310
dart:core
7317-
String: #M7
7318-
interfaces
7319-
dart:core
7320-
Object
7321-
methods
7322-
isEven: <null>
7323-
isEven=: <null>
7324-
String
7325-
methods
7326-
isEven: <null>
7327-
isEven=: <null>
7311+
String: #M6
73287312
[status] idle
73297313
''',
73307314
);
@@ -8212,11 +8196,6 @@ void f(A a) {
82128196
package:test/a.dart
82138197
A: #M0
82148198
interfaces
8215-
dart:core
8216-
Object
8217-
methods
8218-
foo: <null>
8219-
foo=: <null>
82208199
package:test/a.dart
82218200
A
82228201
methods
@@ -8926,12 +8905,6 @@ void f (B b) {
89268905
topLevels
89278906
dart:core
89288907
int: #M4
8929-
interfaces
8930-
dart:core
8931-
int
8932-
methods
8933-
isEven: #M5
8934-
isEven=: <null>
89358908
[status] idle
89368909
''',
89378910
updateFiles: () {
@@ -8955,13 +8928,13 @@ void f (B b) {
89558928
manifest
89568929
A: #M0
89578930
declaredMembers
8958-
_foo.method: #M6
8931+
_foo.method: #M5
89598932
B: #M2
89608933
f: #M3
89618934
requirements
89628935
topLevels
89638936
dart:core
8964-
String: #M7
8937+
String: #M6
89658938
[future] getErrors T2
89668939
ErrorsResult #1
89678940
path: /home/test/lib/test.dart
@@ -8977,17 +8950,7 @@ void f (B b) {
89778950
requirements
89788951
topLevels
89798952
dart:core
8980-
String: #M7
8981-
interfaces
8982-
dart:core
8983-
Object
8984-
methods
8985-
isEven: <null>
8986-
isEven=: <null>
8987-
String
8988-
methods
8989-
isEven: <null>
8990-
isEven=: <null>
8953+
String: #M6
89918954
[status] idle
89928955
''',
89938956
);
@@ -9314,11 +9277,6 @@ class A {}
93149277
package:test/a.dart
93159278
A: #M0
93169279
interfaces
9317-
dart:core
9318-
Object
9319-
methods
9320-
foo: <null>
9321-
foo=: <null>
93229280
package:test/a.dart
93239281
A
93249282
methods
@@ -9626,11 +9584,6 @@ void f(A a) {
96269584
package:test/a.dart
96279585
A: #M0
96289586
interfaces
9629-
dart:core
9630-
Object
9631-
methods
9632-
foo: <null>
9633-
foo=: <null>
96349587
package:test/a.dart
96359588
A
96369589
methods
@@ -10352,11 +10305,6 @@ class A {}
1035210305
package:test/a.dart
1035310306
A: #M0
1035410307
interfaces
10355-
dart:core
10356-
Object
10357-
methods
10358-
foo: <null>
10359-
foo=: <null>
1036010308
package:test/a.dart
1036110309
A
1036210310
methods
@@ -12590,11 +12538,6 @@ void f(A a) {
1259012538
package:test/a.dart
1259112539
A: #M0
1259212540
interfaces
12593-
dart:core
12594-
Object
12595-
methods
12596-
foo: <null>
12597-
foo=: <null>
1259812541
package:test/a.dart
1259912542
A
1260012543
methods
@@ -13050,11 +12993,6 @@ mixin A {}
1305012993
package:test/a.dart
1305112994
A: #M0
1305212995
interfaces
13053-
dart:core
13054-
Object
13055-
methods
13056-
foo: <null>
13057-
foo=: <null>
1305812996
package:test/a.dart
1305912997
A
1306012998
methods
@@ -13362,11 +13300,6 @@ void f(A a) {
1336213300
package:test/a.dart
1336313301
A: #M0
1336413302
interfaces
13365-
dart:core
13366-
Object
13367-
methods
13368-
foo: <null>
13369-
foo=: <null>
1337013303
package:test/a.dart
1337113304
A
1337213305
methods
@@ -13695,11 +13628,6 @@ mixin A {}
1369513628
package:test/a.dart
1369613629
A: #M0
1369713630
interfaces
13698-
dart:core
13699-
Object
13700-
methods
13701-
foo: <null>
13702-
foo=: <null>
1370313631
package:test/a.dart
1370413632
A
1370513633
methods

pkg/analyzer/test/src/dart/analysis/result_printer.dart

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ class BundleRequirementsPrinter {
8585

8686
void _writeInterfaces(RequirementsManifest requirements) {
8787
var libEntries = requirements.interfaces.sorted;
88+
89+
libEntries.removeWhere((entry) {
90+
var ignored = configuration.requirements.ignoredLibraries;
91+
return ignored.contains(entry.key);
92+
});
93+
8894
sink.writeElements('interfaces', libEntries, (libEntry) {
8995
var interfaceEntries = libEntry.value.sorted;
9096
sink.writeElements('${libEntry.key}', interfaceEntries, (interfaceEntry) {
@@ -587,6 +593,7 @@ class DriverEventsPrinterConfiguration {
587593
var withLinkBundleEvents = false;
588594
var withSchedulerStatus = true;
589595
var withStreamResolvedUnitResults = true;
596+
var requirements = RequirementPrinterConfiguration();
590597

591598
var ignoredManifestInstanceMemberNames = <String>{
592599
'==',
@@ -1161,6 +1168,10 @@ class LibraryManifestPrinter {
11611168
}
11621169
}
11631170

1171+
class RequirementPrinterConfiguration {
1172+
var ignoredLibraries = <Uri>{Uri.parse('dart:core')};
1173+
}
1174+
11641175
class ResolvedLibraryResultPrinter {
11651176
final ResolvedLibraryResultPrinterConfiguration configuration;
11661177
final TreeStringSink sink;

0 commit comments

Comments
 (0)