Validate packages against their SDK constraints.

After running pub install or update, it will look at all of the
selected packages and see if their SDK constraints match the
current SDK. If not, it will show a (hopefully) helpful error
message.
BUG=dartbug.com/6285

Review URL: https://codereview.chromium.org//12092080

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge@18014 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/lib/src/pubspec.dart b/lib/src/pubspec.dart
index 11b840e..492acd3 100644
--- a/lib/src/pubspec.dart
+++ b/lib/src/pubspec.dart
@@ -4,12 +4,13 @@
 
 library pubspec;
 
+import '../../pkg/yaml/lib/yaml.dart';
+
 import 'package.dart';
 import 'source.dart';
 import 'source_registry.dart';
 import 'utils.dart';
 import 'version.dart';
-import '../../pkg/yaml/lib/yaml.dart';
 
 /// The parsed and validated contents of a pubspec file.
 class Pubspec {
@@ -44,6 +45,7 @@
   bool get isEmpty =>
     name == null && version == Version.none && dependencies.isEmpty;
 
+  // TODO(rnystrom): Make this a static method to match corelib.
   /// Parses the pubspec whose text is [contents]. If the pubspec doesn't define
   /// version for itself, it defaults to [Version.none].
   factory Pubspec.parse(String contents, SourceRegistry sources) {