Update to Dart SDK 1.22.0-dev.8.0. (#7461)
* Update to Dart SDK `1.22.0-dev.6.0`. * Update SDK summary generation to create spec and strong summaries. * Updated to dev.8.0. * Fixed console out.
This commit is contained in:
@@ -1 +1 @@
|
||||
1.21.0
|
||||
1.22.0-dev.8.0
|
||||
|
||||
@@ -247,7 +247,8 @@ class FlutterEngine {
|
||||
|
||||
static const String kName = 'engine';
|
||||
static const String kSkyEngine = 'sky_engine';
|
||||
static const String kSdkBundle = 'sdk.ds';
|
||||
static const String kSdkBundleSpec = 'spec.sum';
|
||||
static const String kSdkBundleStrong = 'strong.sum';
|
||||
|
||||
final Cache cache;
|
||||
|
||||
@@ -309,7 +310,10 @@ class FlutterEngine {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!fs.file(path.join(pkgDir.path, kSkyEngine, kSdkBundle)).existsSync())
|
||||
if (!fs.file(path.join(pkgDir.path, kSkyEngine, kSdkBundleSpec)).existsSync())
|
||||
return false;
|
||||
|
||||
if (!fs.file(path.join(pkgDir.path, kSkyEngine, kSdkBundleStrong)).existsSync())
|
||||
return false;
|
||||
|
||||
Directory engineDir = cache.getArtifactDirectory(kName);
|
||||
@@ -342,12 +346,20 @@ class FlutterEngine {
|
||||
await pubGet(directory: pkgPath);
|
||||
}
|
||||
|
||||
Status summaryStatus = logger.startProgress('Building Dart SDK summary...');
|
||||
Status summarySpecStatus = logger.startProgress('Building Dart SDK spec summary...');
|
||||
try {
|
||||
String skyEnginePath = path.join(pkgDir.path, kSkyEngine);
|
||||
buildSkyEngineSdkSummary(skyEnginePath, kSdkBundle);
|
||||
buildSkyEngineSdkSummary(skyEnginePath, kSdkBundleSpec, false);
|
||||
} finally {
|
||||
summaryStatus.stop();
|
||||
summarySpecStatus.stop();
|
||||
}
|
||||
|
||||
Status summaryStrongStatus = logger.startProgress('Building Dart SDK strong summary...');
|
||||
try {
|
||||
String skyEnginePath = path.join(pkgDir.path, kSkyEngine);
|
||||
buildSkyEngineSdkSummary(skyEnginePath, kSdkBundleStrong, true);
|
||||
} finally {
|
||||
summaryStrongStatus.stop();
|
||||
}
|
||||
|
||||
Directory engineDir = cache.getArtifactDirectory(kName);
|
||||
|
||||
@@ -7,7 +7,6 @@ import 'dart:collection';
|
||||
import 'package:analyzer/error/error.dart';
|
||||
import 'package:analyzer/file_system/file_system.dart' as file_system;
|
||||
import 'package:analyzer/file_system/physical_file_system.dart';
|
||||
import 'package:analyzer/plugin/options.dart';
|
||||
import 'package:analyzer/source/analysis_options_provider.dart';
|
||||
import 'package:analyzer/source/error_processor.dart';
|
||||
import 'package:analyzer/source/package_map_resolver.dart';
|
||||
@@ -19,7 +18,6 @@ import 'package:analyzer/src/generated/source.dart'; // ignore: implementation_i
|
||||
import 'package:analyzer/src/generated/source_io.dart'; // ignore: implementation_imports
|
||||
import 'package:analyzer/src/task/options.dart'; // ignore: implementation_imports
|
||||
import 'package:cli_util/cli_util.dart' as cli_util;
|
||||
import 'package:linter/src/plugin/linter_plugin.dart'; // ignore: implementation_imports
|
||||
import 'package:package_config/packages.dart' show Packages;
|
||||
import 'package:package_config/src/packages_impl.dart' show MapPackages; // ignore: implementation_imports
|
||||
import 'package:path/path.dart' as path;
|
||||
@@ -138,39 +136,28 @@ class AnalysisDriver {
|
||||
}
|
||||
|
||||
bool _isFiltered(AnalysisError error) {
|
||||
ErrorProcessor processor = ErrorProcessor.getProcessor(context, error);
|
||||
ErrorProcessor processor = ErrorProcessor.getProcessor(context.analysisOptions, error);
|
||||
// Filtered errors are processed to a severity of `null`.
|
||||
return processor != null && processor.severity == null;
|
||||
}
|
||||
|
||||
void _processAnalysisOptions(
|
||||
AnalysisContext context, AnalysisOptions analysisOptions) {
|
||||
List<OptionsProcessor> optionsProcessors =
|
||||
AnalysisEngine.instance.optionsPlugin.optionsProcessors;
|
||||
try {
|
||||
String optionsPath = options.analysisOptionsFile;
|
||||
if (optionsPath != null) {
|
||||
file_system.File file =
|
||||
PhysicalResourceProvider.INSTANCE.getFile(optionsPath);
|
||||
Map<Object, Object> optionMap =
|
||||
analysisOptionsProvider.getOptionsFromFile(file);
|
||||
optionsProcessors.forEach(
|
||||
(OptionsProcessor p) => p.optionsProcessed(context, optionMap));
|
||||
if (optionMap != null) {
|
||||
configureContextOptions(context, optionMap);
|
||||
}
|
||||
AnalysisContext context, AnalysisOptions analysisOptions) {
|
||||
String optionsPath = options.analysisOptionsFile;
|
||||
if (optionsPath != null) {
|
||||
file_system.File file =
|
||||
PhysicalResourceProvider.INSTANCE.getFile(optionsPath);
|
||||
Map<Object, Object> optionMap =
|
||||
analysisOptionsProvider.getOptionsFromFile(file);
|
||||
if (optionMap != null) {
|
||||
applyToAnalysisOptions(context.analysisOptions, optionMap);
|
||||
}
|
||||
} on Exception catch (e) {
|
||||
optionsProcessors.forEach((OptionsProcessor p) => p.onError(e));
|
||||
}
|
||||
}
|
||||
|
||||
void _processPlugins() {
|
||||
List<Plugin> plugins = <Plugin>[];
|
||||
plugins.addAll(AnalysisEngine.instance.requiredPlugins);
|
||||
plugins.add(AnalysisEngine.instance.commandLinePlugin);
|
||||
plugins.add(AnalysisEngine.instance.optionsPlugin);
|
||||
plugins.add(linterPlugin);
|
||||
ExtensionManager manager = new ExtensionManager();
|
||||
manager.processPlugins(plugins);
|
||||
}
|
||||
@@ -276,7 +263,10 @@ class _StdLogger extends Logger {
|
||||
@override
|
||||
void logError(String message, [Exception exception]) =>
|
||||
errorSink.writeln(message);
|
||||
|
||||
@override
|
||||
void logInformation(String message, [Exception exception]) =>
|
||||
outSink.writeln(message);
|
||||
void logInformation(String message, [Exception exception]) {
|
||||
// TODO(pq): remove once addressed in analyzer (http://dartbug.com/28285)
|
||||
if (message != 'No definition of type FutureOr') outSink.writeln(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,8 @@ import '../base/io.dart';
|
||||
|
||||
/// Given the [skyEnginePath], locate corresponding `_embedder.yaml` and compose
|
||||
/// the full embedded Dart SDK, and build the [outBundleName] file with its
|
||||
/// linked summary.
|
||||
void buildSkyEngineSdkSummary(String skyEnginePath, String outBundleName) {
|
||||
/// linked [strong] or spec summary.
|
||||
void buildSkyEngineSdkSummary(String skyEnginePath, String outBundleName, bool strong) {
|
||||
ResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
|
||||
|
||||
Map<String, List<Folder>> packageMap = <String, List<Folder>>{
|
||||
@@ -46,7 +46,7 @@ void buildSkyEngineSdkSummary(String skyEnginePath, String outBundleName) {
|
||||
List<Source> sources = sdk.uris.map(sdk.mapDartUri).toList();
|
||||
|
||||
// Build.
|
||||
List<int> bytes = new SummaryBuilder(sources, sdk.context, true).build();
|
||||
List<int> bytes = new SummaryBuilder(sources, sdk.context, strong).build();
|
||||
String outputPath = pathos.join(skyEnginePath, outBundleName);
|
||||
file.fs.file(outputPath).writeAsBytesSync(bytes);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ dependencies:
|
||||
intl: '>=0.14.0 <0.15.0'
|
||||
json_rpc_2: ^2.0.0
|
||||
json_schema: 1.0.6
|
||||
linter: ^0.1.21
|
||||
linter: 0.1.30-alpha.1
|
||||
meta: ^1.0.4
|
||||
mustache: ^0.2.5
|
||||
package_config: '>=0.1.5 <2.0.0'
|
||||
|
||||
Reference in New Issue
Block a user