Index: lib/src/analysis_context.dart |
diff --git a/lib/src/analysis_context.dart b/lib/src/analysis_context.dart |
index b2d445129e7e42499b4f6773913789eca4ecdb39..79ec11216f7fdd89ce509c17fbe879457705f58e 100644 |
--- a/lib/src/analysis_context.dart |
+++ b/lib/src/analysis_context.dart |
@@ -10,9 +10,6 @@ import 'package:analyzer/src/generated/sdk_io.dart' show DirectoryBasedDartSdk; |
import 'package:analyzer/src/generated/source.dart' show DartUriResolver; |
import 'package:analyzer/src/generated/source_io.dart'; |
-import '../strong_mode.dart' show StrongModeOptions; |
- |
-import 'checker/resolver.dart'; |
import 'dart_sdk.dart'; |
import 'multi_package_resolver.dart'; |
import 'options.dart'; |
@@ -20,29 +17,22 @@ import 'options.dart'; |
/// Creates an [AnalysisContext] with dev_compiler type rules and inference, |
/// using [createSourceFactory] to set up its [SourceFactory]. |
AnalysisContext createAnalysisContextWithSources( |
- StrongModeOptions strongOptions, SourceResolverOptions srcOptions, |
- {DartUriResolver sdkResolver, List<UriResolver> fileResolvers}) { |
+ SourceResolverOptions srcOptions, |
+ {DartUriResolver sdkResolver, |
+ List<UriResolver> fileResolvers}) { |
AnalysisEngine.instance.useTaskModel = true; |
var srcFactory = createSourceFactory(srcOptions, |
sdkResolver: sdkResolver, fileResolvers: fileResolvers); |
- return createAnalysisContext(strongOptions)..sourceFactory = srcFactory; |
+ return createAnalysisContext()..sourceFactory = srcFactory; |
} |
/// Creates an analysis context that contains our restricted typing rules. |
-AnalysisContext createAnalysisContext(StrongModeOptions options) { |
+AnalysisContext createAnalysisContext() { |
var res = AnalysisEngine.instance.createAnalysisContext(); |
res.analysisOptions.strongMode = true; |
return res; |
} |
-/// Enables dev_compiler inference rules. |
-// TODO(jmesserly): is there a cleaner way to plug this in? |
-void enableDevCompilerInference( |
- AnalysisContextImpl context, StrongModeOptions options) { |
- context.libraryResolverFactory = (c) => |
- new LibraryResolverWithInference(c, options); |
-} |
- |
/// Creates a SourceFactory configured by the [options]. |
/// |
/// Use [options.useMockSdk] to specify the SDK mode, or use [sdkResolver] |