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

Issue 10690032: Make VersionSolver source- and description-aware. (Closed)

Created:
8 years, 5 months ago by nweiz
Modified:
8 years, 5 months ago
Reviewers:
Bob Nystrom
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Make VersionSolver source- and description-aware. Committed: https://code.google.com/p/dart/source/detail?r=9260

Patch Set 1 #

Total comments: 14

Patch Set 2 : Code review changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+392 lines, -142 lines) Patch
M utils/pub/entrypoint.dart View 1 1 chunk +1 line, -2 lines 0 comments Download
M utils/pub/git_source.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M utils/pub/package.dart View 1 4 chunks +19 lines, -7 lines 0 comments Download
M utils/pub/pubspec.dart View 1 chunk +1 line, -1 line 0 comments Download
M utils/pub/repo_source.dart View 1 chunk +4 lines, -1 line 0 comments Download
A utils/pub/root_source.dart View 1 1 chunk +35 lines, -0 lines 0 comments Download
M utils/pub/source.dart View 3 chunks +23 lines, -11 lines 0 comments Download
M utils/pub/utils.dart View 1 chunk +5 lines, -0 lines 0 comments Download
M utils/pub/version_solver.dart View 1 13 chunks +217 lines, -90 lines 0 comments Download
M utils/tests/pub/lock_file_test.dart View 1 chunk +2 lines, -2 lines 0 comments Download
M utils/tests/pub/pubspec_test.dart View 1 chunk +1 line, -0 lines 0 comments Download
M utils/tests/pub/version_solver_test.dart View 1 9 chunks +82 lines, -26 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
nweiz
8 years, 5 months ago (2012-06-28 23:54:06 UTC) #1
Bob Nystrom
A couple of minor suggestions. Assuming you make those, LGTM! https://chromiumcodereview.appspot.com/10690032/diff/1/utils/pub/package.dart File utils/pub/package.dart (right): https://chromiumcodereview.appspot.com/10690032/diff/1/utils/pub/package.dart#newcode190 ...
8 years, 5 months ago (2012-06-29 17:24:40 UTC) #2
nweiz
8 years, 5 months ago (2012-06-29 18:45:08 UTC) #3
https://chromiumcodereview.appspot.com/10690032/diff/1/utils/pub/package.dart
File utils/pub/package.dart (right):

https://chromiumcodereview.appspot.com/10690032/diff/1/utils/pub/package.dart...
utils/pub/package.dart:190: PackageId withVersion(Version version) =>
On 2012/06/29 17:24:40, Bob Nystrom wrote:
> "with" is a bit confusing here. Maybe "atVersion" or "usingVersion"?

Done.

https://chromiumcodereview.appspot.com/10690032/diff/1/utils/pub/root_source....
File utils/pub/root_source.dart (right):

https://chromiumcodereview.appspot.com/10690032/diff/1/utils/pub/root_source....
utils/pub/root_source.dart:32: throw "Can't install from a root source.";
On 2012/06/29 17:24:40, Bob Nystrom wrote:
> Throw an UnsupportedOperationException.

Done.

https://chromiumcodereview.appspot.com/10690032/diff/1/utils/pub/version_solv...
File utils/pub/version_solver.dart (right):

https://chromiumcodereview.appspot.com/10690032/diff/1/utils/pub/version_solv...
utils/pub/version_solver.dart:168: final Source source;
On 2012/06/29 17:24:40, Bob Nystrom wrote:
> Can we replace these three fields with just a PackageId?

It's invalid for a PackageId to have a null version, which can happen for
ChangeVersion.

https://chromiumcodereview.appspot.com/10690032/diff/1/utils/pub/version_solv...
utils/pub/version_solver.dart:224: * Get the dependencies of [id].
On 2012/06/29 17:24:40, Bob Nystrom wrote:
> Comment doesn't line up with parameters.

Done.

https://chromiumcodereview.appspot.com/10690032/diff/1/utils/tests/pub/versio...
File utils/tests/pub/version_solver_test.dart (right):

https://chromiumcodereview.appspot.com/10690032/diff/1/utils/tests/pub/versio...
utils/tests/pub/version_solver_test.dart:109: }, error: sourceMismatch);
On 2012/06/29 17:24:40, Bob Nystrom wrote:
> Can you also add another test for sourceMismatch that doesn't involve the
> semi-magic root source?

Done.

https://chromiumcodereview.appspot.com/10690032/diff/1/utils/tests/pub/versio...
utils/tests/pub/version_solver_test.dart:269: Package mockPackage(String name,
String version, Map dependencyStrings) {
On 2012/06/29 17:24:40, Bob Nystrom wrote:
> "name" -> "description"

Done.

https://chromiumcodereview.appspot.com/10690032/diff/1/utils/tests/pub/versio...
utils/tests/pub/version_solver_test.dart:288: name.replaceFirst(new
RegExp(@"-[^-]+$"), "");
On 2012/06/29 17:24:40, Bob Nystrom wrote:
> Please document this. It wasn't clear to me at first that "shared-x" and
> "shared-y" were the same package.

Done.

Powered by Google App Engine
This is Rietveld 408576698