Skip to content

Commit 3a3b3e4

Browse files
scheglovcommit-bot@chromium.org
authored andcommitted
Remove support for FileContentOverlay from ContextBuilder.
Change-Id: I23b9481ac6a841675e401579ff60bfb383865f8b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199361 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
1 parent 20526d4 commit 3a3b3e4

File tree

3 files changed

+1
-13
lines changed

3 files changed

+1
-13
lines changed

pkg/analyzer/lib/src/context/builder.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,6 @@ class ContextBuilder {
7373
/// The byte store used by any analysis drivers created through this interface.
7474
late final ByteStore byteStore;
7575

76-
/// The file content overlay used by analysis drivers. If this builder will be
77-
/// used to build analysis contexts, set the [contentCache] instead.
78-
FileContentOverlay? fileContentOverlay;
79-
8076
/// Whether any analysis driver created through this interface should support
8177
/// indexing and search.
8278
bool enableIndex = false;
@@ -119,7 +115,7 @@ class ContextBuilder {
119115
performanceLog,
120116
resourceProvider,
121117
byteStore,
122-
fileContentOverlay,
118+
FileContentOverlay(),
123119
contextRoot,
124120
sf,
125121
options,

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import 'package:analyzer/src/dart/analysis/byte_store.dart';
1111
import 'package:analyzer/src/dart/analysis/context_builder.dart';
1212
import 'package:analyzer/src/dart/analysis/driver.dart';
1313
import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart';
14-
import 'package:analyzer/src/dart/analysis/file_state.dart';
1514
import 'package:analyzer/src/dart/analysis/performance_logger.dart';
1615
import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
1716
import 'package:cli_util/cli_util.dart';
@@ -57,7 +56,6 @@ class AnalysisContextCollectionImpl implements AnalysisContextCollection {
5756
optionsFile: optionsFile,
5857
packagesFile: packagesFile,
5958
);
60-
var fileContentOverlay = FileContentOverlay();
6159
for (var root in roots) {
6260
var contextBuilder = ContextBuilderImpl(
6361
resourceProvider: this.resourceProvider,
@@ -68,7 +66,6 @@ class AnalysisContextCollectionImpl implements AnalysisContextCollection {
6866
declaredVariables: DeclaredVariables.fromMap(declaredVariables ?? {}),
6967
drainStreams: drainStreams,
7068
enableIndex: enableIndex,
71-
fileContentOverlay: fileContentOverlay,
7269
performanceLog: performanceLog,
7370
retainDataForTesting: retainDataForTesting,
7471
sdkPath: sdkPath,

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ import 'package:analyzer/src/dart/analysis/byte_store.dart'
1515
import 'package:analyzer/src/dart/analysis/driver.dart'
1616
show AnalysisDriver, AnalysisDriverScheduler;
1717
import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart';
18-
import 'package:analyzer/src/dart/analysis/file_state.dart'
19-
show FileContentOverlay;
2018
import 'package:analyzer/src/dart/analysis/performance_logger.dart'
2119
show PerformanceLog;
2220
import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
@@ -42,7 +40,6 @@ class ContextBuilderImpl implements ContextBuilder {
4240
DeclaredVariables? declaredVariables,
4341
bool drainStreams = true,
4442
bool enableIndex = false,
45-
FileContentOverlay? fileContentOverlay,
4643
List<String>? librarySummaryPaths,
4744
PerformanceLog? performanceLog,
4845
bool retainDataForTesting = false,
@@ -56,7 +53,6 @@ class ContextBuilderImpl implements ContextBuilder {
5653
ArgumentError.checkNotNull(sdkPath, 'sdkPath');
5754

5855
byteStore ??= MemoryByteStore();
59-
fileContentOverlay ??= FileContentOverlay();
6056
performanceLog ??= PerformanceLog(StringBuffer());
6157

6258
DartSdkManager sdkManager = DartSdkManager(sdkPath);
@@ -85,7 +81,6 @@ class ContextBuilderImpl implements ContextBuilder {
8581
old.ContextBuilder(resourceProvider, sdkManager, options: options);
8682
builder.analysisDriverScheduler = scheduler;
8783
builder.byteStore = byteStore;
88-
builder.fileContentOverlay = fileContentOverlay;
8984
builder.enableIndex = enableIndex;
9085
builder.performanceLog = performanceLog;
9186
builder.retainDataForTesting = retainDataForTesting;

0 commit comments

Comments
 (0)