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

Issue 1276673006: Make Source.getDirectory synchronous. (Closed)

Created:
5 years, 4 months ago by nweiz
Modified:
5 years, 4 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

Make Source.getDirectory synchronous. It never really made sense for this to be asynchronous; most sources didn't even do any IO to determine the directory. The only exception was the git source, which would actually *clone a repository* if one didn't exist yet. This heavyweight behavior wasn't a good fit for what looks like a lightweight method anyway. Making this synchronous has a ripple effect of making a bunch of other methods synchronous, too. Hooray for synchrony! R=rnystrom@google.com Committed: https://github.com/dart-lang/pub/commit/a552a06b7f4e2be5a88f47c8513bfb01f1a04acc

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -104 lines) Patch
M lib/src/command/cache_add.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/src/command/list_package_dirs.dart View 4 chunks +9 lines, -16 lines 0 comments Download
M lib/src/entrypoint.dart View 4 chunks +21 lines, -25 lines 0 comments Download
M lib/src/global_packages.dart View 5 chunks +8 lines, -12 lines 0 comments Download
M lib/src/source.dart View 2 chunks +7 lines, -4 lines 0 comments Download
M lib/src/source/cached.dart View 2 chunks +11 lines, -10 lines 0 comments Download
M lib/src/source/git.dart View 1 chunk +18 lines, -19 lines 0 comments Download
M lib/src/source/hosted.dart View 2 chunks +4 lines, -7 lines 0 comments Download
M lib/src/source/path.dart View 1 chunk +1 line, -2 lines 0 comments Download
M lib/src/source/unknown.dart View 1 chunk +1 line, -1 line 0 comments Download
M lib/src/system_cache.dart View 2 chunks +4 lines, -2 lines 0 comments Download
M test/lock_file_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M test/pubspec_test.dart View 1 chunk +1 line, -1 line 0 comments Download
M test/version_solver_test.dart View 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
nweiz
5 years, 4 months ago (2015-08-07 20:14:33 UTC) #1
Bob Nystrom
Love it. LGTM!
5 years, 4 months ago (2015-08-07 21:36:45 UTC) #2
nweiz
5 years, 4 months ago (2015-08-07 21:41:02 UTC) #3
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
a552a06b7f4e2be5a88f47c8513bfb01f1a04acc (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698