Stop downloading sky_services and flutter_services (#6583)
These aren't needed anymore.
This commit is contained in:
parent
7e539fea01
commit
70eb4929af
@ -74,11 +74,6 @@ dependencies:
|
||||
args.add(name.substring(0, name.length - 5));
|
||||
}
|
||||
|
||||
findSkyServicesLibraryNames().forEach((String libName) {
|
||||
args.add('--include-external');
|
||||
args.add(libName);
|
||||
});
|
||||
|
||||
process = await Process.start('pub', args, workingDirectory: 'dev/docs');
|
||||
printStream(process.stdout);
|
||||
printStream(process.stderr);
|
||||
@ -131,21 +126,6 @@ void putRedirectInOldIndexLocation() {
|
||||
new File('$kDocRoot/flutter/index.html').writeAsStringSync(metaTag);
|
||||
}
|
||||
|
||||
List<String> findSkyServicesLibraryNames() {
|
||||
Directory skyServicesLocation = new Directory('bin/cache/pkg/sky_services/lib');
|
||||
if (!skyServicesLocation.existsSync()) {
|
||||
throw 'Did not find sky_services package location in ${skyServicesLocation.path}.';
|
||||
}
|
||||
return skyServicesLocation.listSync(followLinks: false, recursive: true)
|
||||
.where((FileSystemEntity entity) {
|
||||
return entity is File && entity.path.endsWith('.mojom.dart');
|
||||
}).map((FileSystemEntity entity) {
|
||||
String basename = path.basename(entity.path);
|
||||
basename = basename.substring(0, basename.length-('.dart'.length));
|
||||
return basename.replaceAll('.', '_');
|
||||
});
|
||||
}
|
||||
|
||||
List<String> findPackageNames() {
|
||||
return findPackages().map((Directory dir) => path.basename(dir.path)).toList();
|
||||
}
|
||||
|
@ -15,8 +15,6 @@ dependencies:
|
||||
async: "^1.10.0"
|
||||
http_parser: ">=0.0.1 <4.0.0"
|
||||
|
||||
flutter_services:
|
||||
path: ../../bin/cache/pkg/flutter_services
|
||||
sky_engine:
|
||||
path: ../../bin/cache/pkg/sky_engine
|
||||
|
||||
|
@ -245,14 +245,12 @@ class FlutterEngine {
|
||||
FlutterEngine(this.cache);
|
||||
|
||||
static const String kName = 'engine';
|
||||
static const String kFlutterServices = 'flutter_services';
|
||||
static const String kSkyEngine = 'sky_engine';
|
||||
static const String kSkyServices = 'sky_services';
|
||||
static const String kSdkBundle = 'sdk.ds';
|
||||
|
||||
final Cache cache;
|
||||
|
||||
List<String> _getPackageDirs() => const <String>[kSkyEngine, kSkyServices, kFlutterServices];
|
||||
List<String> _getPackageDirs() => const <String>[kSkyEngine];
|
||||
|
||||
List<String> _getEngineDirs() {
|
||||
List<String> dirs = <String>[
|
||||
@ -345,9 +343,8 @@ class FlutterEngine {
|
||||
|
||||
Status summaryStatus = logger.startProgress('Building Dart SDK summary...');
|
||||
try {
|
||||
String flutterServicesPath = path.join(pkgDir.path, kFlutterServices);
|
||||
String skyEnginePath = path.join(pkgDir.path, kSkyEngine);
|
||||
buildSkyEngineSdkSummary(skyEnginePath, flutterServicesPath, kSdkBundle);
|
||||
buildSkyEngineSdkSummary(skyEnginePath, kSdkBundle);
|
||||
} finally {
|
||||
summaryStatus.stop(showElapsedTime: true);
|
||||
}
|
||||
|
@ -161,9 +161,6 @@ Future<String> _buildAotSnapshot(
|
||||
return null;
|
||||
}
|
||||
|
||||
String mojoPkg = _getSdkExtensionPath(packageMap, 'mojo');
|
||||
String mojoInternalPath = path.join(mojoPkg, 'sdk_ext', 'internal.dart');
|
||||
|
||||
String skyEnginePkg = _getSdkExtensionPath(packageMap, 'sky_engine');
|
||||
String uiPath = path.join(skyEnginePkg, 'dart_ui', 'ui.dart');
|
||||
String jniPath = path.join(skyEnginePkg, 'dart_jni', 'jni.dart');
|
||||
@ -173,7 +170,6 @@ Future<String> _buildAotSnapshot(
|
||||
genSnapshot,
|
||||
vmEntryPoints,
|
||||
ioEntryPoints,
|
||||
mojoInternalPath,
|
||||
uiPath,
|
||||
jniPath,
|
||||
vmServicePath,
|
||||
@ -218,7 +214,6 @@ Future<String> _buildAotSnapshot(
|
||||
'--vm_isolate_snapshot=$vmIsolateSnapshot',
|
||||
'--isolate_snapshot=$isolateSnapshot',
|
||||
'--packages=${packageMap.packagesPath}',
|
||||
'--url_mapping=dart:mojo.internal,$mojoInternalPath',
|
||||
'--url_mapping=dart:ui,$uiPath',
|
||||
'--url_mapping=dart:jni,$jniPath',
|
||||
'--url_mapping=dart:vmservice_sky,$vmServicePath',
|
||||
|
@ -3,7 +3,6 @@ import 'dart:io' as io;
|
||||
|
||||
import 'package:analyzer/file_system/file_system.dart';
|
||||
import 'package:analyzer/file_system/physical_file_system.dart';
|
||||
import 'package:analyzer/source/sdk_ext.dart';
|
||||
import 'package:analyzer/src/context/builder.dart'; // ignore: implementation_imports
|
||||
import 'package:analyzer/src/dart/sdk/sdk.dart'; // ignore: implementation_imports
|
||||
import 'package:analyzer/src/generated/engine.dart'; // ignore: implementation_imports
|
||||
@ -13,27 +12,20 @@ import 'package:analyzer/src/summary/pub_summary.dart'; // ignore: implementatio
|
||||
import 'package:flutter_tools/src/base/logger.dart';
|
||||
import 'package:flutter_tools/src/dart/pub.dart';
|
||||
import 'package:flutter_tools/src/globals.dart';
|
||||
import 'package:package_config/packages.dart';
|
||||
import 'package:path/path.dart' as pathos;
|
||||
import 'package:yaml/src/yaml_node.dart'; // ignore: implementation_imports
|
||||
|
||||
/// Given the [skyEnginePath] and [flutterServicesPath], locate corresponding
|
||||
/// `_embedder.yaml` and `_sdkext`, compose the full embedded Dart SDK, and
|
||||
/// build the [outBundleName] file with its linked summary.
|
||||
void buildSkyEngineSdkSummary(
|
||||
String skyEnginePath, String flutterServicesPath, String outBundleName) {
|
||||
/// 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) {
|
||||
ResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
|
||||
|
||||
ContextBuilder builder = new ContextBuilder(resourceProvider, null, null);
|
||||
Packages packages = builder.createPackageMap(flutterServicesPath);
|
||||
Map<String, List<Folder>> packageMap = builder.convertPackagesToMap(packages);
|
||||
if (packageMap == null) {
|
||||
printError('The expected .packages was not found in $flutterServicesPath.');
|
||||
return;
|
||||
}
|
||||
packageMap['sky_engine'] = <Folder>[
|
||||
resourceProvider.getFolder(pathos.join(skyEnginePath, 'lib'))
|
||||
];
|
||||
Map<String, List<Folder>> packageMap = <String, List<Folder>>{
|
||||
'sky_engine': <Folder>[
|
||||
resourceProvider.getFolder(pathos.join(skyEnginePath, 'lib'))
|
||||
]
|
||||
};
|
||||
|
||||
//
|
||||
// Read the `_embedder.yaml` file.
|
||||
@ -46,22 +38,10 @@ void buildSkyEngineSdkSummary(
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Read the `_sdkext` file.
|
||||
//
|
||||
SdkExtUriResolver extResolver = new SdkExtUriResolver(packageMap);
|
||||
Map<String, String> urlMappings = extResolver.urlMappings;
|
||||
if (embedderYamls.length != 1) {
|
||||
printError('Exactly one extension library was expected in $packageMap, '
|
||||
'but $urlMappings found.');
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Create the EmbedderSdk instance.
|
||||
//
|
||||
EmbedderSdk sdk = new EmbedderSdk(resourceProvider, embedderYamls);
|
||||
sdk.addExtensions(urlMappings);
|
||||
sdk.analysisOptions = new AnalysisOptionsImpl()..strongMode = true;
|
||||
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user