Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(492)

Unified Diff: lib/src/package.dart

Issue 2184303002: Make pub strong-mode clean. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/log.dart ('k') | lib/src/package_graph.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/package.dart
diff --git a/lib/src/package.dart b/lib/src/package.dart
index d7a87c45e9d3a464493f5d002aa0126cba777f90..d39c3d9a8610eeabbcc6efdd921622011282537e 100644
--- a/lib/src/package.dart
+++ b/lib/src/package.dart
@@ -60,8 +60,8 @@ class Package {
/// All immediate dependencies this package specifies.
///
/// This includes regular, dev dependencies, and overrides.
- Set<PackageDep> get immediateDependencies {
- var deps = {};
+ List<PackageDep> get immediateDependencies {
+ var deps = <String, PackageDep>{};
addToMap(dep) {
deps[dep.name] = dep;
@@ -73,7 +73,7 @@ class Package {
// Make sure to add these last so they replace normal dependencies.
dependencyOverrides.forEach(addToMap);
- return deps.values.toSet();
+ return deps.values.toList();
}
/// Returns a list of asset ids for all Dart executables in this package's bin
@@ -223,7 +223,7 @@ class Package {
// readability than most code in pub. In particular, it avoids using the
// path package, since re-parsing a path is very expensive relative to
// string operations.
- var files;
+ Iterable<String> files;
if (useGitIgnore && _inGitRepo) {
// Later versions of git do not allow a path for ls-files that appears to
// be outside of the repo, so make sure we give it a relative path.
@@ -439,8 +439,8 @@ class PackageId extends PackageName {
/// Creates an ID for a magic package (see [isMagic]).
PackageId.magic(String name)
- : super._magic(name),
- version = Version.none;
+ : version = Version.none,
+ super._magic(name);
/// Creates an ID for the given root package.
PackageId.root(Package package)
@@ -473,8 +473,8 @@ class PackageDep extends PackageName {
: super._(name, source, description);
PackageDep.magic(String name)
- : super._magic(name),
- constraint = Version.none;
+ : constraint = Version.none,
+ super._magic(name);
String toString() {
if (isRoot) return "$name $constraint (root)";
« no previous file with comments | « lib/src/log.dart ('k') | lib/src/package_graph.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698