Skip to content

Commit 6250ee7

Browse files
committed
Read directives with the defining compilation unit
The direct read of the imports, exports, and parts from the library element is deprecated. Unblocks https://dart-review.googlesource.com/c/sdk/+/388643
1 parent da1190d commit 6250ee7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

source_gen/lib/src/library.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,9 @@ class LibraryReader {
3737
Iterable<Element> get allElements => [
3838
element,
3939
...element.topLevelElements,
40-
// ignore: deprecated_member_use
41-
...element.libraryImports,
42-
// ignore: deprecated_member_use
43-
...element.libraryExports,
44-
// ignore: deprecated_member_use
45-
...element.parts,
40+
...element.definingCompilationUnit.libraryImports,
41+
...element.definingCompilationUnit.libraryExports,
42+
...element.definingCompilationUnit.parts,
4643
];
4744

4845
/// All of the declarations in this library annotated with [checker].

0 commit comments

Comments
 (0)