Skip to content

Commit b45cdff

Browse files
scheglovCommit Queue
authored andcommitted
CQ. Remove more deprecated non-APIs.
Change-Id: I546a30eaa6b18f68349d9941ffc36d8a5368592d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/456861 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
1 parent 53d7d85 commit b45cdff

File tree

6 files changed

+3
-45
lines changed

6 files changed

+3
-45
lines changed

pkg/analyzer/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* Remove deprecated `PartDirective.configurations`.
1515
* Remove deprecated `TypeDefiningElement`.
1616
* Remove deprecated `TypeAliasElement.aliasedElement`.
17+
* Remove deprecated `resolveFile2`.
1718
* Remove deprecated `ErrorCode`.
1819
* Remove deprecated `ErrorSeverity`.
1920
* Remove deprecated `ErrorType`.

pkg/analyzer/api.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,6 @@ package:analyzer/dart/analysis/utilities.dart:
577577
parseFile (function: ParseStringResult Function({required FeatureSet featureSet, required String path, ResourceProvider? resourceProvider, bool throwIfDiagnostics}))
578578
parseString (function: ParseStringResult Function({required String content, FeatureSet? featureSet, String? path, bool throwIfDiagnostics}))
579579
resolveFile (function: Future<SomeResolvedUnitResult> Function({required String path, ResourceProvider? resourceProvider}))
580-
resolveFile2 (function: Future<SomeResolvedUnitResult> Function({required String path, ResourceProvider? resourceProvider}), deprecated)
581580
package:analyzer/dart/ast/ast.dart:
582581
useDeclaringConstructorsAst (static getter: bool)
583582
useDeclaringConstructorsAst= (static setter: bool)

pkg/analyzer/lib/dart/analysis/utilities.dart

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -140,25 +140,6 @@ Future<SomeResolvedUnitResult> resolveFile({
140140
return await context.currentSession.getResolvedUnit(path);
141141
}
142142

143-
/// Return the result of resolving the file at the given [path].
144-
///
145-
/// If a [resourceProvider] is given, it will be used to access the file system.
146-
///
147-
/// Note that if more than one file is going to be resolved then this function
148-
/// is inefficient. Clients should instead use [AnalysisContextCollection] to
149-
/// create one or more contexts and use those contexts to resolve the files.
150-
@Deprecated('Use resolveFile instead')
151-
Future<SomeResolvedUnitResult> resolveFile2({
152-
required String path,
153-
ResourceProvider? resourceProvider,
154-
}) async {
155-
AnalysisContext context = _createAnalysisContext(
156-
path: path,
157-
resourceProvider: resourceProvider,
158-
);
159-
return await context.currentSession.getResolvedUnit(path);
160-
}
161-
162143
/// Return a newly create analysis context in which the file at the given [path]
163144
/// can be analyzed.
164145
///

pkg/analyzer/lib/src/dart/analysis/driver.dart

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,7 @@ class AnalysisDriver {
299299
required this.withFineDependencies,
300300
this.ownedFiles,
301301
this.analysisContext,
302-
@Deprecated("Use 'analysisOptionsMap' instead")
303-
AnalysisOptionsImpl? analysisOptions,
304-
AnalysisOptionsMap? analysisOptionsMap,
302+
required this.analysisOptionsMap,
305303
FileContentCache? fileContentCache,
306304
UnlinkedUnitStore? unlinkedUnitStore,
307305
this.enableIndex = false,
@@ -324,11 +322,6 @@ class AnalysisDriver {
324322
declaredVariables = declaredVariables ?? DeclaredVariables(),
325323
testingData = retainDataForTesting ? TestingData() : null,
326324
_enableLintRuleTiming = enableLintRuleTiming,
327-
// This '!' is temporary. The analysisOptionsMap is effectively
328-
// required but can't be until Google3 is updated.
329-
analysisOptionsMap = analysisOptions == null
330-
? analysisOptionsMap!
331-
: AnalysisOptionsMap.forSharedOptions(analysisOptions),
332325
_saltForUnlinked = _calculateSaltForUnlinked(enableIndex: enableIndex),
333326
_saltForElements = _calculateSaltForElements(
334327
declaredVariables ?? DeclaredVariables(),

pkg/analyzer/lib/src/generated/sdk.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class DartSdkManager {
7777
Map<SdkDescription, DartSdk> sdkMap = HashMap<SdkDescription, DartSdk>();
7878

7979
/// Initialize a newly created manager.
80-
DartSdkManager(this.defaultSdkDirectory, [@deprecated bool? canUseSummaries]);
80+
DartSdkManager(this.defaultSdkDirectory);
8181

8282
/// Return any SDK that has been created, or `null` if no SDKs have been
8383
/// created.

pkg/analyzer/lib/src/generated/timestamped_data.dart

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)