Skip to content

Commit 79aa9ca

Browse files
scheglovCommit Queue
authored andcommitted
Elements. Remove V1 LibraryExportElement.
Change-Id: I7c334034cf3c19101b4f8b7bec7d6da243112941 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423070 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
1 parent a477b7e commit 79aa9ca

File tree

5 files changed

+6
-45
lines changed

5 files changed

+6
-45
lines changed

pkg/analyzer/api.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3130,7 +3130,6 @@ package:analyzer/dart/element/element.dart:
31303130
new (constructor: LibraryElement Function())
31313131
enclosingElement3 (getter: Null)
31323132
exportNamespace (getter: Namespace)
3133-
exportedLibraries (getter: List<LibraryElement>)
31343133
featureSet (getter: FeatureSet)
31353134
identifier (getter: String)
31363135
importedLibraries (getter: List<LibraryElement>)
@@ -3145,12 +3144,6 @@ package:analyzer/dart/element/element.dart:
31453144
topLevelElements (getter: Iterable<Element>)
31463145
typeProvider (getter: TypeProvider)
31473146
typeSystem (getter: TypeSystem)
3148-
LibraryExportElement (class extends Object implements _ExistingElement, deprecated):
3149-
new (constructor: LibraryExportElement Function())
3150-
combinators (getter: List<NamespaceCombinator>)
3151-
exportKeywordOffset (getter: int)
3152-
exportedLibrary (getter: LibraryElement?)
3153-
uri (getter: DirectiveUri)
31543147
LibraryImportElement (class extends Object implements _ExistingElement, deprecated):
31553148
new (constructor: LibraryImportElement Function())
31563149
combinators (getter: List<NamespaceCombinator>)

pkg/analyzer/lib/dart/element/element.dart

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,6 @@ abstract class LibraryElement implements _ExistingElement {
735735
@override
736736
Null get enclosingElement3;
737737

738-
/// The libraries that are exported from this library.
739-
List<LibraryElement> get exportedLibraries;
740-
741738
/// The export [Namespace] of this library.
742739
Namespace get exportNamespace;
743740

@@ -796,25 +793,6 @@ abstract class LibraryElement implements _ExistingElement {
796793
TypeSystem get typeSystem;
797794
}
798795

799-
/// A single export directive within a library.
800-
///
801-
/// Clients may not extend, implement or mix-in this class.
802-
@Deprecated('Use LibraryExport instead')
803-
abstract class LibraryExportElement implements _ExistingElement {
804-
/// The combinators that were specified as part of the `export` directive in
805-
/// the order in which they were specified.
806-
List<NamespaceCombinator> get combinators;
807-
808-
/// The [LibraryElement], if [uri] is a [DirectiveUriWithLibrary].
809-
LibraryElement? get exportedLibrary;
810-
811-
/// The offset of the `export` keyword.
812-
int get exportKeywordOffset;
813-
814-
/// The interpretation of the URI specified in the directive.
815-
DirectiveUri get uri;
816-
}
817-
818796
/// A single import directive within a library.
819797
///
820798
/// Clients may not extend, implement or mix-in this class.

pkg/analyzer/lib/src/dart/element/element.dart

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6651,19 +6651,15 @@ class LibraryElementImpl extends ElementImpl
66516651
}
66526652

66536653
@override
6654-
List<LibraryElementImpl> get exportedLibraries {
6654+
List<LibraryElementImpl> get exportedLibraries2 {
66556655
return fragments
66566656
.expand((fragment) => fragment.libraryExports)
6657-
.map((export) => export.exportedLibrary)
6657+
.map((export) => export.exportedLibrary2)
66586658
.nonNulls
66596659
.toSet()
66606660
.toList();
66616661
}
66626662

6663-
@override
6664-
List<LibraryElement2> get exportedLibraries2 =>
6665-
exportedLibraries.cast<LibraryElement2>();
6666-
66676663
@override
66686664
Namespace get exportNamespace {
66696665
linkedData?.read(this);
@@ -7020,10 +7016,7 @@ class LibraryElementImpl extends ElementImpl
70207016
}
70217017

70227018
class LibraryExportElementImpl extends _ExistingElementImpl
7023-
implements
7024-
// ignore:deprecated_member_use_from_same_package,analyzer_use_new_elements
7025-
LibraryExportElement,
7026-
LibraryExport {
7019+
implements LibraryExport {
70277020
@override
70287021
final List<NamespaceCombinator> combinators;
70297022

@@ -7045,17 +7038,14 @@ class LibraryExportElementImpl extends _ExistingElementImpl
70457038
}
70467039

70477040
@override
7048-
LibraryElementImpl? get exportedLibrary {
7041+
LibraryElementImpl? get exportedLibrary2 {
70497042
var uri = this.uri;
70507043
if (uri is DirectiveUriWithLibraryImpl) {
70517044
return uri.library;
70527045
}
70537046
return null;
70547047
}
70557048

7056-
@override
7057-
LibraryElementImpl? get exportedLibrary2 => exportedLibrary;
7058-
70597049
@override
70607050
String get identifier => 'export@$nameOffset';
70617051

pkg/analyzer/lib/src/fine/requirements.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ class RequirementsManifest {
471471
void _addExports(LibraryElementImpl libraryElement) {
472472
for (var fragment in libraryElement.fragments) {
473473
for (var export in fragment.libraryExports) {
474-
var exportedLibrary = export.exportedLibrary;
474+
var exportedLibrary = export.exportedLibrary2;
475475

476476
// If no library, then there is nothing to re-export.
477477
if (exportedLibrary == null) {

pkg/analyzer/lib/src/summary2/library_builder.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class LibraryBuilder {
102102
for (var (fragmentIndex, fragment) in element.units.indexed) {
103103
for (var (exportIndex, exportElement)
104104
in fragment.libraryExports.indexed) {
105-
var exportedLibrary = exportElement.exportedLibrary;
105+
var exportedLibrary = exportElement.exportedLibrary2;
106106
if (exportedLibrary == null) {
107107
continue;
108108
}

0 commit comments

Comments
 (0)