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

Issue 2044253003: Refactor Source and SourceRegistry. (Closed)

Created:
4 years, 6 months ago by nweiz
Modified:
4 years, 6 months ago
Reviewers:
Bob Nystrom
CC:
reviews_dartlang.org
Base URL:
git@github.com:dart-lang/pub.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Refactor Source and SourceRegistry. This splits Source into two classes, Source and LiveSource. The former is completely independent of the system cache directory, and mostly contains source metadata and logic about manipulating descriptions. SourceRegistry now deals strictly in Sources, with LiveSources being handled by SystemCache. This means that classes like Pubspec and LockFile no longer have transitive references to the system cache directory. This will also make it possible to clean up PackageName equality logic by making PackageNames track their concrete Sources rather than just their source names. See #912 R=rnystrom@google.com Committed: https://github.com/dart-lang/pub/commit/3fb39388c4e1cd872a83ca971f458e0976c758e0

Patch Set 1 #

Patch Set 2 : #

Total comments: 18

Patch Set 3 : Code review changes #

Patch Set 4 : Rename LiveSource to BoundSource. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+662 lines, -602 lines) Patch
M lib/src/barback/asset_environment.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M lib/src/command.dart View 1 chunk +1 line, -3 lines 0 comments Download
M lib/src/command/cache_add.dart View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M lib/src/command/cache_list.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/src/command/cache_repair.dart View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download
M lib/src/command/lish.dart View 3 chunks +2 lines, -3 lines 0 comments Download
M lib/src/command/list_package_dirs.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M lib/src/command/uploader.dart View 2 chunks +1 line, -2 lines 0 comments Download
M lib/src/entrypoint.dart View 1 2 3 7 chunks +11 lines, -10 lines 0 comments Download
M lib/src/global_packages.dart View 1 2 3 11 chunks +18 lines, -19 lines 0 comments Download
M lib/src/lock_file.dart View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M lib/src/package_graph.dart View 1 2 3 4 chunks +4 lines, -8 lines 0 comments Download
M lib/src/solver/backtracking_solver.dart View 1 2 3 10 chunks +29 lines, -25 lines 0 comments Download
M lib/src/solver/version_solver.dart View 1 2 3 5 chunks +7 lines, -6 lines 0 comments Download
M lib/src/source.dart View 1 2 3 6 chunks +85 lines, -86 lines 0 comments Download
M lib/src/source/cached.dart View 1 2 3 1 chunk +4 lines, -3 lines 0 comments Download
M lib/src/source/git.dart View 1 2 3 4 chunks +112 lines, -98 lines 0 comments Download
M lib/src/source/hosted.dart View 1 2 3 15 chunks +169 lines, -154 lines 0 comments Download
M lib/src/source/path.dart View 1 2 3 4 chunks +51 lines, -38 lines 0 comments Download
M lib/src/source/unknown.dart View 1 2 3 3 chunks +25 lines, -13 lines 0 comments Download
M lib/src/source_registry.dart View 1 2 2 chunks +33 lines, -25 lines 0 comments Download
M lib/src/system_cache.dart View 1 2 3 3 chunks +51 lines, -30 lines 0 comments Download
M lib/src/validator/dependency.dart View 2 chunks +2 lines, -3 lines 0 comments Download
M test/dependency_computer/utils.dart View 2 chunks +2 lines, -5 lines 0 comments Download
M test/lock_file_test.dart View 1 2 3 2 chunks +3 lines, -14 lines 0 comments Download
M test/package_list_files_test.dart View 1 chunk +1 line, -2 lines 0 comments Download
M test/pubspec_test.dart View 1 2 3 2 chunks +3 lines, -14 lines 0 comments Download
M test/test_pub.dart View 4 chunks +6 lines, -12 lines 0 comments Download
M test/version_solver_test.dart View 1 2 3 7 chunks +32 lines, -20 lines 0 comments Download

Messages

Total messages: 9 (1 generated)
nweiz
4 years, 6 months ago (2016-06-08 01:28:24 UTC) #1
Bob Nystrom
https://codereview.chromium.org/2044253003/diff/20001/lib/src/entrypoint.dart File lib/src/entrypoint.dart (right): https://codereview.chromium.org/2044253003/diff/20001/lib/src/entrypoint.dart#newcode93 lib/src/entrypoint.dart:93: value: (id) => cache.load(id)); value: cache.load ? https://codereview.chromium.org/2044253003/diff/20001/lib/src/solver/backtracking_solver.dart File ...
4 years, 6 months ago (2016-06-14 23:21:55 UTC) #2
nweiz
https://codereview.chromium.org/2044253003/diff/20001/lib/src/entrypoint.dart File lib/src/entrypoint.dart (right): https://codereview.chromium.org/2044253003/diff/20001/lib/src/entrypoint.dart#newcode93 lib/src/entrypoint.dart:93: value: (id) => cache.load(id)); On 2016/06/14 23:21:55, Bob Nystrom ...
4 years, 6 months ago (2016-06-20 20:46:08 UTC) #3
nweiz
Code review changes
4 years, 6 months ago (2016-06-20 20:47:02 UTC) #4
Bob Nystrom
lgtm https://codereview.chromium.org/2044253003/diff/20001/lib/src/entrypoint.dart File lib/src/entrypoint.dart (right): https://codereview.chromium.org/2044253003/diff/20001/lib/src/entrypoint.dart#newcode93 lib/src/entrypoint.dart:93: value: (id) => cache.load(id)); On 2016/06/20 20:46:08, nweiz ...
4 years, 6 months ago (2016-06-20 21:20:31 UTC) #5
nweiz
https://codereview.chromium.org/2044253003/diff/20001/lib/src/entrypoint.dart File lib/src/entrypoint.dart (right): https://codereview.chromium.org/2044253003/diff/20001/lib/src/entrypoint.dart#newcode93 lib/src/entrypoint.dart:93: value: (id) => cache.load(id)); On 2016/06/20 21:20:31, Bob Nystrom ...
4 years, 6 months ago (2016-06-20 22:03:18 UTC) #6
nweiz
4 years, 6 months ago (2016-06-20 22:03:19 UTC) #7
nweiz
4 years, 6 months ago (2016-06-20 22:17:59 UTC) #9
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
3fb39388c4e1cd872a83ca971f458e0976c758e0 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698