Skip to content

Commit

Permalink
analyzer: ContextBuilderImpl.createContext sdkPath is required
Browse files Browse the repository at this point in the history
Change-Id: Ie510b5af0e26ce407dfab590c01cc31ee73a341c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/393962
Commit-Queue: Konstantin Shcheglov <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
Auto-Submit: Samuel Rawlins <[email protected]>
  • Loading branch information
srawlins authored and Commit Queue committed Nov 6, 2024
1 parent e94de78 commit b082a8e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/analyzer/lib/src/dart/analysis/context_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import 'package:analyzer/src/summary/package_bundle_reader.dart';
import 'package:analyzer/src/summary/summary_sdk.dart';
import 'package:analyzer/src/summary2/macro.dart';
import 'package:analyzer/src/summary2/package_bundle_format.dart';
import 'package:analyzer/src/util/sdk.dart';
import 'package:analyzer/src/workspace/workspace.dart';

/// A utility class used to build an analysis context based on a context root.
Expand Down Expand Up @@ -79,7 +78,7 @@ class ContextBuilderImpl {
PerformanceLog? performanceLog,
bool retainDataForTesting = false,
AnalysisDriverScheduler? scheduler,
String? sdkPath,
required String sdkPath,
String? sdkSummaryPath,
void Function({
required AnalysisOptionsImpl analysisOptions,
Expand All @@ -92,10 +91,6 @@ class ContextBuilderImpl {
MacroSupport? macroSupport,
OwnedFiles? ownedFiles,
}) {
// TODO(scheglov): Remove this, and make `sdkPath` required.
sdkPath ??= getSdkPath();
ArgumentError.checkNotNull(sdkPath, 'sdkPath');

byteStore ??= MemoryByteStore();
performanceLog ??= PerformanceLog(null);

Expand Down

0 comments on commit b082a8e

Please sign in to comment.