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

Side by Side Diff: lib/src/source.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, 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/solver/version_solver.dart ('k') | lib/src/source/git.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:async'; 5 import 'dart:async';
6 6
7 import 'package:pub_semver/pub_semver.dart'; 7 import 'package:pub_semver/pub_semver.dart';
8 8
9 import 'package.dart'; 9 import 'package.dart';
10 import 'pubspec.dart'; 10 import 'pubspec.dart';
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 /// The name of the source. 53 /// The name of the source.
54 /// 54 ///
55 /// Should be lower-case, suitable for use in a filename, and unique accross 55 /// Should be lower-case, suitable for use in a filename, and unique accross
56 /// all sources. 56 /// all sources.
57 String get name; 57 String get name;
58 58
59 /// Whether this source can choose between multiple versions of the same 59 /// Whether this source can choose between multiple versions of the same
60 /// package during version solving. 60 /// package during version solving.
61 /// 61 ///
62 /// Defaults to `false`. 62 /// Defaults to `false`.
63 final bool hasMultipleVersions = false; 63 bool get hasMultipleVersions => false;
64 64
65 /// Records the system cache to which this source belongs. 65 /// Records the system cache to which this source belongs.
66 /// 66 ///
67 /// This should only be called once for each source, by 67 /// This should only be called once for each source, by
68 /// [SystemCache.register]. It should not be overridden by base classes. 68 /// [SystemCache.register]. It should not be overridden by base classes.
69 BoundSource bind(SystemCache systemCache); 69 BoundSource bind(SystemCache systemCache);
70 70
71 /// Parses a [PackageRef] from a name and a user-provided [description]. 71 /// Parses a [PackageRef] from a name and a user-provided [description].
72 /// 72 ///
73 /// When a [Pubspec] is parsed, it reads in the description for each 73 /// When a [Pubspec] is parsed, it reads in the description for each
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 /// If the source is cached, this will be a path in the system cache. 230 /// If the source is cached, this will be a path in the system cache.
231 String getDirectory(PackageId id); 231 String getDirectory(PackageId id);
232 232
233 /// Stores [pubspec] so it's returned when [describe] is called with [id]. 233 /// Stores [pubspec] so it's returned when [describe] is called with [id].
234 /// 234 ///
235 /// This is notionally protected; it should only be called by subclasses. 235 /// This is notionally protected; it should only be called by subclasses.
236 void memoizePubspec(PackageId id, Pubspec pubspec) { 236 void memoizePubspec(PackageId id, Pubspec pubspec) {
237 _pubspecs[id] = pubspec; 237 _pubspecs[id] = pubspec;
238 } 238 }
239 } 239 }
OLDNEW
« no previous file with comments | « lib/src/solver/version_solver.dart ('k') | lib/src/source/git.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698