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

Issue 228703006: Add “pub cache repair” to forcibly re-install previously cached packages. (Closed)

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

Description

Add “pub cache repair” to forcibly re-install previously cached packages. BUG=https://code.google.com/p/dart/issues/detail?id=5391 RELNOTE=Add "pub cache repair" command to re-install cached packages. R=nweiz@google.com Committed: https://code.google.com/p/dart/source/detail?r=35111

Patch Set 1 #

Total comments: 19

Patch Set 2 : Revise. #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+465 lines, -60 lines) Patch
M sdk/lib/_internal/pub/lib/src/command/cache.dart View 2 chunks +3 lines, -1 line 0 comments Download
M sdk/lib/_internal/pub/lib/src/command/cache_add.dart View 1 chunk +1 line, -1 line 0 comments Download
A sdk/lib/_internal/pub/lib/src/command/cache_repair.dart View 1 1 chunk +50 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/package.dart View 1 1 chunk +12 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/source.dart View 1 2 chunks +26 lines, -4 lines 0 comments Download
M sdk/lib/_internal/pub/lib/src/source/git.dart View 1 3 chunks +45 lines, -1 line 2 comments Download
M sdk/lib/_internal/pub/lib/src/source/hosted.dart View 1 5 chunks +118 lines, -40 lines 4 comments Download
M sdk/lib/_internal/pub/lib/src/source_registry.dart View 1 2 chunks +10 lines, -1 line 0 comments Download
M sdk/lib/_internal/pub/lib/src/system_cache.dart View 2 chunks +6 lines, -2 lines 0 comments Download
A + sdk/lib/_internal/pub/test/cache/repair/empty_cache_test.dart View 1 1 chunk +4 lines, -6 lines 0 comments Download
A sdk/lib/_internal/pub/test/cache/repair/handles_failure_test.dart View 1 1 chunk +58 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/test/cache/repair/reinstalls_git_packages_test.dart View 1 1 chunk +68 lines, -0 lines 0 comments Download
A sdk/lib/_internal/pub/test/cache/repair/reinstalls_hosted_packages_test.dart View 1 1 chunk +56 lines, -0 lines 0 comments Download
M sdk/lib/_internal/pub/test/pub_test.dart View 4 chunks +8 lines, -4 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
Bob Nystrom
Hi, Sharon! Any chance we can get some docs for this? It's possible for packages ...
6 years, 8 months ago (2014-04-10 17:57:17 UTC) #1
nweiz
https://codereview.chromium.org/228703006/diff/1/sdk/lib/_internal/pub/lib/src/command/cache_repair.dart File sdk/lib/_internal/pub/lib/src/command/cache_repair.dart (right): https://codereview.chromium.org/228703006/diff/1/sdk/lib/_internal/pub/lib/src/command/cache_repair.dart#newcode40 sdk/lib/_internal/pub/lib/src/command/cache_repair.dart:40: // TODO(rnystrom): Allow specifying the server. It's weird that ...
6 years, 8 months ago (2014-04-10 20:24:33 UTC) #2
Bob Nystrom
Thanks! https://codereview.chromium.org/228703006/diff/1/sdk/lib/_internal/pub/lib/src/command/cache_repair.dart File sdk/lib/_internal/pub/lib/src/command/cache_repair.dart (right): https://codereview.chromium.org/228703006/diff/1/sdk/lib/_internal/pub/lib/src/command/cache_repair.dart#newcode40 sdk/lib/_internal/pub/lib/src/command/cache_repair.dart:40: // TODO(rnystrom): Allow specifying the server. On 2014/04/10 ...
6 years, 8 months ago (2014-04-14 23:16:00 UTC) #3
nweiz
lgtm https://codereview.chromium.org/228703006/diff/20001/sdk/lib/_internal/pub/lib/src/source/git.dart File sdk/lib/_internal/pub/lib/src/source/git.dart (right): https://codereview.chromium.org/228703006/diff/20001/sdk/lib/_internal/pub/lib/src/source/git.dart#newcode157 sdk/lib/_internal/pub/lib/src/source/git.dart:157: log.error("Failed to reset ${log.bold(package.name)} " We should probably ...
6 years, 8 months ago (2014-04-15 00:59:26 UTC) #4
Bob Nystrom
Committed patchset #2 manually as r35111 (presubmit successful).
6 years, 8 months ago (2014-04-16 17:04:17 UTC) #5
Bob Nystrom
6 years, 8 months ago (2014-04-16 17:07:44 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/228703006/diff/20001/sdk/lib/_internal/pub/li...
File sdk/lib/_internal/pub/lib/src/source/git.dart (right):

https://codereview.chromium.org/228703006/diff/20001/sdk/lib/_internal/pub/li...
sdk/lib/_internal/pub/lib/src/source/git.dart:157: log.error("Failed to reset
${log.bold(package.name)} "
On 2014/04/15 00:59:26, nweiz wrote:
> We should probably only have this nice handling for GitExceptions. Unexpected
> exceptions should be reported as such.

Done.

https://codereview.chromium.org/228703006/diff/20001/sdk/lib/_internal/pub/li...
File sdk/lib/_internal/pub/lib/src/source/hosted.dart (right):

https://codereview.chromium.org/228703006/diff/20001/sdk/lib/_internal/pub/li...
sdk/lib/_internal/pub/lib/src/source/hosted.dart:126: return _download(url,
package.name, package.version, package.dir).then((_) {
On 2014/04/15 00:59:26, nweiz wrote:
> Long line.

Done.

https://codereview.chromium.org/228703006/diff/20001/sdk/lib/_internal/pub/li...
sdk/lib/_internal/pub/lib/src/source/hosted.dart:131: "${package.version} from
$url. Error:\n$error");
On 2014/04/15 00:59:26, nweiz wrote:
> I'd omit "from $url" if it's http://pub.dartlang.org.

Done.

Powered by Google App Engine
This is Rietveld 408576698