Commit 0a6b0f9b authored by Hixie's avatar Hixie

Always import our packages when analyzing.

parent 2da6b175
......@@ -6,6 +6,7 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:den_api/den_api.dart';
import 'package:path/path.dart' as path;
import '../artifacts.dart';
......@@ -179,6 +180,18 @@ class AnalyzeCommand extends FlutterCommand {
Map<String, String> packages = <String, String>{};
bool hadInconsistentRequirements = false;
for (Directory directory in pubSpecDirectories.map((path) => new Directory(path))) {
String pubSpecYamlPath = path.join(directory.path, 'pubspec.yaml');
File pubSpecYamlFile = new File(pubSpecYamlPath);
if (pubSpecYamlFile.existsSync()) {
Pubspec pubSpecYaml = await Pubspec.load(pubSpecYamlPath);
String packageName = pubSpecYaml.name;
String packagePath = path.normalize(path.absolute(path.join(directory.path, 'lib')));
if (packages.containsKey(packageName) && packages[packageName] != packagePath) {
logging.warning('Inconsistent requirements for $packageName; using $packagePath (and not ${packages[packageName]}).');
hadInconsistentRequirements = true;
}
packages[packageName] = packagePath;
}
File dotPackages = new File(path.join(directory.path, '.packages'));
if (dotPackages.existsSync()) {
Map<String, String> dependencies = <String, String>{};
......
......@@ -12,6 +12,7 @@ dependencies:
archive: ^1.0.20
args: ^0.13.0
crypto: ^0.9.1
den_api: ^0.1.0
mustache4dart: ^1.0.0
path: ^1.3.0
stack_trace: ^1.4.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment