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

Side by Side Diff: lib/src/package.dart

Issue 1956543002: Fix a lockfile freshness checking bug. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « lib/src/entrypoint.dart ('k') | test/must_pub_get_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:io'; 5 import 'dart:io';
6 6
7 import 'package:barback/barback.dart'; 7 import 'package:barback/barback.dart';
8 import 'package:path/path.dart' as p; 8 import 'package:path/path.dart' as p;
9 import 'package:pub_semver/pub_semver.dart'; 9 import 'package:pub_semver/pub_semver.dart';
10 10
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 PackageDep.magic(String name) 475 PackageDep.magic(String name)
476 : super.magic(name), 476 : super.magic(name),
477 constraint = Version.none; 477 constraint = Version.none;
478 478
479 String toString() { 479 String toString() {
480 if (isRoot) return "$name $constraint (root)"; 480 if (isRoot) return "$name $constraint (root)";
481 if (isMagic) return name; 481 if (isMagic) return name;
482 return "$name $constraint from $source ($description)"; 482 return "$name $constraint from $source ($description)";
483 } 483 }
484 484
485 int get hashCode => name.hashCode ^ source.hashCode; 485 int get hashCode => name.hashCode ^ source.hashCode ^ constraint.hashCode;
486 486
487 bool operator ==(other) { 487 bool operator ==(other) {
488 // TODO(rnystrom): We're assuming here that we don't need to delve into the 488 // TODO(rnystrom): We're assuming here that we don't need to delve into the
489 // description. 489 // description.
490 return other is PackageDep && 490 return other is PackageDep &&
491 other.name == name && 491 other.name == name &&
492 other.source == source && 492 other.source == source &&
493 other.constraint == constraint; 493 other.constraint == constraint;
494 } 494 }
495 } 495 }
OLDNEW
« no previous file with comments | « lib/src/entrypoint.dart ('k') | test/must_pub_get_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698