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

Side by Side Diff: sdk/lib/_internal/pub/lib/src/global_packages.dart

Issue 581283003: Get rid of Chain.track in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/entrypoint.dart ('k') | sdk/lib/_internal/pub/lib/src/io.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library pub.global_packages; 5 library pub.global_packages;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:path/path.dart' as p; 10 import 'package:path/path.dart' as p;
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 278
279 return true; 279 return true;
280 } 280 }
281 281
282 /// Finds the active package with [name]. 282 /// Finds the active package with [name].
283 /// 283 ///
284 /// Returns an [Entrypoint] loaded with the active package if found. 284 /// Returns an [Entrypoint] loaded with the active package if found.
285 Future<Entrypoint> find(String name) { 285 Future<Entrypoint> find(String name) {
286 // TODO(rnystrom): Use async/await here when on __ catch is supported. 286 // TODO(rnystrom): Use async/await here when on __ catch is supported.
287 // See: https://github.com/dart-lang/async_await/issues/27 287 // See: https://github.com/dart-lang/async_await/issues/27
288 return syncFuture(() { 288 return new Future.sync(() {
289 var lockFilePath = _getLockFilePath(name); 289 var lockFilePath = _getLockFilePath(name);
290 var lockFile; 290 var lockFile;
291 try { 291 try {
292 lockFile = new LockFile.load(lockFilePath, cache.sources); 292 lockFile = new LockFile.load(lockFilePath, cache.sources);
293 } on IOException catch (error) { 293 } on IOException catch (error) {
294 var oldLockFilePath = p.join(_directory, '$name.lock'); 294 var oldLockFilePath = p.join(_directory, '$name.lock');
295 try { 295 try {
296 // TODO(nweiz): This looks for Dart 1.6's old lockfile location. 296 // TODO(nweiz): This looks for Dart 1.6's old lockfile location.
297 // Remove it when Dart 1.6 is old enough that we don't think anyone 297 // Remove it when Dart 1.6 is old enough that we don't think anyone
298 // will have these lockfiles anymore (issue 20703). 298 // will have these lockfiles anymore (issue 20703).
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 continue; 588 continue;
589 } 589 }
590 590
591 if (match[1] == package) { 591 if (match[1] == package) {
592 log.fine("Deleting old binstub $file"); 592 log.fine("Deleting old binstub $file");
593 deleteEntry(file); 593 deleteEntry(file);
594 } 594 }
595 } 595 }
596 } 596 }
597 } 597 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/entrypoint.dart ('k') | sdk/lib/_internal/pub/lib/src/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698