Skip to content

Commit cfeda65

Browse files
srawlinsCommit Queue
authored andcommitted
analyzer: Deprecate AnalysisTarget
Change-Id: Iaca9ffb8f25ada45efabd13622fa4990ca23af3f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417908 Commit-Queue: Samuel Rawlins <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
1 parent 1d99738 commit cfeda65

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

pkg/analyzer/api.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5292,7 +5292,7 @@ package:analyzer/src/lint/config.dart:
52925292
package:analyzer/src/lint/linter.dart:
52935293
LintRule (non-public)
52945294
package:analyzer/src/task/api/model.dart:
5295-
AnalysisTarget (class extends Object):
5295+
AnalysisTarget (class extends Object, deprecated):
52965296
new (constructor: AnalysisTarget Function())
52975297
librarySource (getter: Source?)
52985298
source (getter: Source?)

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import 'package:analyzer/src/dart/constant/evaluation.dart';
5555
import 'package:analyzer/src/dart/resolver/scope.dart' show Namespace;
5656
import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
5757
import 'package:analyzer/src/generated/utilities_dart.dart';
58+
// ignore: deprecated_member_use_from_same_package
5859
import 'package:analyzer/src/task/api/model.dart' show AnalysisTarget;
5960
import 'package:meta/meta.dart';
6061
import 'package:pub_semver/pub_semver.dart';
@@ -390,6 +391,7 @@ abstract class DirectiveUriWithUnit extends DirectiveUriWithSource {
390391
/// represent the semantic structure of the program.
391392
///
392393
/// Clients may not extend, implement or mix-in this class.
394+
// ignore: deprecated_member_use_from_same_package
393395
abstract class Element implements AnalysisTarget {
394396
/// A list of this element's children.
395397
///

pkg/analyzer/lib/src/dart/constant/evaluation.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,11 +519,13 @@ class ConstantEvaluationEngine {
519519
}
520520
}
521521

522+
// ignore: deprecated_member_use_from_same_package
522523
/// Interface for [AnalysisTarget]s for which constant evaluation can be
523524
/// performed.
524525
@AnalyzerPublicApi(
525526
message: 'exposed because it is implemented by various elements')
526527
// TODO(scheglov): consider implementing only in Impl or removing
528+
// ignore: deprecated_member_use_from_same_package
527529
abstract class ConstantEvaluationTarget extends AnalysisTarget {
528530
/// Return the [AnalysisContext] which should be used to evaluate this
529531
/// constant.

pkg/analyzer/lib/src/task/api/model.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import 'package:analyzer/source/source.dart';
1111
/// Instances of this type are used in hashed data structures, so subtypes are
1212
/// required to correctly implement [==] and [hashCode].
1313
@AnalyzerPublicApi(message: 'exposed by Element (superclass)')
14+
@Deprecated('To be removed without replacement')
1415
abstract class AnalysisTarget {
1516
/// If this target is associated with a library, return the source of the
1617
/// library's defining compilation unit; otherwise return `null`.

0 commit comments

Comments
 (0)