Skip to content

Commit 79c321e

Browse files
scheglovcommit-bot@chromium.org
authored andcommitted
Add 'sdkPath' to AnalysisContextCollection constructor..
Bug: pq/surveyor#29 Change-Id: Ic6cc28e8e33be50b0cab35ad0f2e236bae04de0b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194324 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Phil Quitslund <[email protected]>
1 parent b0a358c commit 79c321e

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

pkg/analyzer/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 1.4.0-dev
22
* Deprecated `TypeProvider.nonSubtypableClasses`.
33
Use `TypeProvider.isNonSubtypableClass` instead.
4+
* Added `sdkPath` to `AnalysisContextCollection` constructor.
45

56
## 1.3.0
67
* Added `Expression.inConstantContext` to API.

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

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,15 @@ abstract class AnalysisContextCollection {
1717
///
1818
/// If a [resourceProvider] is given, then it will be used to access the file
1919
/// system, otherwise the default resource provider will be used.
20-
factory AnalysisContextCollection(
21-
{required List<String> includedPaths,
22-
List<String>? excludedPaths,
23-
ResourceProvider? resourceProvider}) = AnalysisContextCollectionImpl;
20+
///
21+
/// If [sdkPath] is given, then Dart SDK at this path will be used, otherwise
22+
/// the default Dart SDK will be used.
23+
factory AnalysisContextCollection({
24+
required List<String> includedPaths,
25+
List<String>? excludedPaths,
26+
ResourceProvider? resourceProvider,
27+
String? sdkPath,
28+
}) = AnalysisContextCollectionImpl;
2429

2530
/// Return all of the analysis contexts in this collection.
2631
List<AnalysisContext> get contexts;

0 commit comments

Comments
 (0)