From 2bea904f898272001e69e83a504536a133ee7f3f Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Thu, 10 Oct 2024 12:38:59 -0700 Subject: [PATCH] Read parts with the defining compilation unit (#728) The direct read of parts from the library element is deprecated. Retain ignores for reading imports and exports since they will be restored without a deprecation. Unblocks https://dart-review.googlesource.com/c/sdk/+/388643 --- source_gen/lib/src/library.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source_gen/lib/src/library.dart b/source_gen/lib/src/library.dart index 97c96e64..cd7dc601 100644 --- a/source_gen/lib/src/library.dart +++ b/source_gen/lib/src/library.dart @@ -41,8 +41,7 @@ class LibraryReader { ...element.libraryImports, // ignore: deprecated_member_use ...element.libraryExports, - // ignore: deprecated_member_use - ...element.parts, + ...element.definingCompilationUnit.parts, ]; /// All of the declarations in this library annotated with [checker].