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

Side by Side Diff: lib/src/source/unknown.dart

Issue 1276673006: Make Source.getDirectory synchronous. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 4 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/source/path.dart ('k') | lib/src/system_cache.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.source.unknown; 5 library pub.source.unknown;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import '../package.dart'; 9 import '../package.dart';
10 import '../pubspec.dart'; 10 import '../pubspec.dart';
(...skipping 17 matching lines...) Expand all
28 28
29 int get hashCode => name.hashCode; 29 int get hashCode => name.hashCode;
30 30
31 Future<Pubspec> doDescribe(PackageId id) => throw new UnsupportedError( 31 Future<Pubspec> doDescribe(PackageId id) => throw new UnsupportedError(
32 "Cannot describe a package from unknown source '$name'."); 32 "Cannot describe a package from unknown source '$name'.");
33 33
34 Future get(PackageId id, String symlink) => throw new UnsupportedError( 34 Future get(PackageId id, String symlink) => throw new UnsupportedError(
35 "Cannot get an unknown source '$name'."); 35 "Cannot get an unknown source '$name'.");
36 36
37 /// Returns the directory where this package can be found locally. 37 /// Returns the directory where this package can be found locally.
38 Future<String> getDirectory(PackageId id) => throw new UnsupportedError( 38 String getDirectory(PackageId id) => throw new UnsupportedError(
39 "Cannot find a package from an unknown source '$name'."); 39 "Cannot find a package from an unknown source '$name'.");
40 40
41 bool descriptionsEqual(description1, description2) => 41 bool descriptionsEqual(description1, description2) =>
42 description1 == description2; 42 description1 == description2;
43 43
44 /// Unknown sources do no validation. 44 /// Unknown sources do no validation.
45 dynamic parseDescription(String containingPath, description, 45 dynamic parseDescription(String containingPath, description,
46 {bool fromLockFile: false}) => description; 46 {bool fromLockFile: false}) => description;
47 } 47 }
OLDNEW
« no previous file with comments | « lib/src/source/path.dart ('k') | lib/src/system_cache.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698